The function names specified with #pragma rtos_task are interpreted as the tasks for Renesas RTOS for the RL78 family.
A task function can be coded without arguments specified, or with only one argument of signed long type specified, but no return values can be specified. |
RTOS service call ext_tsk calls the corresponding internal function of the OS through the br !!addr20 instruction. If ext_tsk is issued at the end of a normal function, no function exit processing is output. |
The code for the body (function definition) of a task function is output to the .text or .textf section. The section name can be changed through #pragma section. |
If a task function for RTOS is specified with __inline or another type of #pragma, a compilation error will occur. |
If a task function for RTOS is called in the same way as a normal function, a compilation error will occur. |
The following shows a sample C source code.
The following shows the assembly source output by compiler.