OS_Task_Pause (OST_TASK_POINTER tp)
Pause task. The paused task will not get control until it is continued by the service OS_Task_Continue().
The macro this_task or the service OS_Task_GetCur() can be used to perform this operation on current task. When a task pauses itself, the kernel gets control immediately.
Everywhere
tp |
Pointer to task descriptor (OST_TASK_POINTER) |
nothing
void Task (void) { for (;;) { /*...*/ OS_Task_Pause(tp); // Pause external task /*...*/ // Do time critical operations OS_Task_Continue(tp); // Continue paused task /*...*/ } }
OS_PauseTask