The os_tsk_prio function changes the execution priority of the task identified by the argument task_id. If the value of new_prio is higher than the priority of the currently executing task, a task switch occurs to enable the task identified by task_id to run. If the value of new_prio is lower than the priority of the currently executing task, then the currently executing task resumes its execution. If the value of task_id is 0, the priority of the currently running task is changed to new_prio. The os_tsk_prio function is in the RL-RTX library. The prototype is defined in rtl.h. Note - The value of new_prio can be anything from 1 to 254.
- The new priority stays in effect until you change it.
- Priority 0 is reserved for the idle task. If priority 0 is specified to the function, it is automatically replaced with the value of 1 by the RTX kernel. Priority 255 is also reserved.
- A higher value for new_prio indicates a higher priority.
|