The os_tsk_create function creates the task identified by
the task function pointer argument and then adds the task to
the ready queue. It dynamically assigns a task identifier value (TID)
to the new task.
The priority argument specifies the priority for the task.
The default task priority is 1. Priority 0 is reserved for the Idle
Task. If a value of 0 is specified for the priority, it is
automatically replaced with a value of 1. Priority 255 is also
reserved. If the new task has a higher priority than the currently
executing task, then a task switch occurs immediately to execute the
new task.
The os_tsk_create function is in the RL-RTX library. The
prototype is defined in rtl.h.
Note
The RTK kernel uses the default stack size, which is defined in
rtx_config.c, for the task.
Priority value of 255 represents the most important task.
Return Value
The os_tsk_create function returns the task identifier
value (TID) of the new task. If the function fails, for example due
to an invalid argument, it returns 0.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.