3.8 Task function for RTOS

The format of the task functions for RTOS is almost the same in the CA78K0R and CC-RL.

 

The format of the CA78K0R is as follows.

#pragma rtos_task [task-function-name]

The format of the CC-RL is as follows.

#pragma rtos_task [(] task-function-name [, ... ][)]

function-declaration

 

-

Task function names can be omitted in the format of the CA78K0R and so the CA78K0R has a facility that prevents the user from defining ext_tsk which is used by the task functions for RTOS. Since the same facility is not available in the CC-RL, if the task function name is omitted, the CcnvCA78K0R outputs a message and comments out the #pragma directive.

 

[Examples]

Pattern 1

Before conversion

#pragma rtos_task task1

After conversion

#pragma rtos_task task1

Pattern 2

Before conversion

#pragma rtos_task

After conversion

// #pragma rtos_task