TSK_yield
2-510
C Interface
Syntax
TSK_yield();
Parameters
Void
Return Value
Void
Description
TSK_yield yields the processor to another task of equal priority.
A task switch occurs when you call TSK_yield if there is an equal priority
task ready to run.
Tasks of higher priority preempt the currently running task without the
need for a call to TSK_yield. If only lower-priority tasks are ready to run
when you call TSK_yield, the current task continues to run. Control does
not pass to a lower-priority task.
Constraints and
Calling Context
❏
When called within an HWI, the code sequence calling TSK_yield
must be either wrapped within an HWI_enter/HWI_exit pair or
invoked by the HWI dispatcher.
❏
TSK_yield cannot be called from the program’s main() function.
See Also
TSK_yield
Yield processor to equal priority task