====== OSA : OS_Task_Pause ====== **OS_Task_Pause (OST_TASK_POINTER tp)**\\ === === Pause task. The paused task will not get control until it is continued by the service ##[[en:osa:ref:allservices:OS_Task_Continue|OS_Task_Continue]]##(). Before calling this service you should be sure that variable //tp// was initialized. The macro **this_task** or the service ##[[en:osa:ref:allservices:OS_Task_GetCur|OS_Task_GetCur]]##() can be used to perform this operation on current task. When a task pauses itself, the kernel gets control immediately. === Call allowed: === Everywhere === Parameters: === {| class = "fpl" |- |//''tp''// |Pointer to task descriptor (##[[en:osa:ref:description:data_types#OST_TASK_POINTER|OST_TASK_POINTER]]##) |} === Returns: === nothing === Example: === void Task (void) { for (;;) { /*...*/ OS_Task_Pause(tp); // Pause external task /*...*/ // Do time critical operations OS_Task_Continue(tp); // Continue paused task /*...*/ } } === Old style name === **OS_PauseTask**\\ === See also === * [[en:osa:ref:allservices:OS_Task_Create|OS_Task_Create]] * [[en:osa:ref:allservices:OS_Task_Replace|OS_Task_Replace]] * [[en:osa:ref:allservices:OS_Task_Delete|OS_Task_Delete]] * [[en:osa:ref:allservices:OS_Task_Define|OS_Task_Define]] * [[en:osa:ref:allservices:OS_Task_GetCur|OS_Task_GetCur]] * [[en:osa:ref:allservices:OS_Task_GetCreated|OS_Task_GetCreated]] * [[en:osa:ref:allservices:OS_Task_Pause|OS_Task_Pause]] * [[en:osa:ref:allservices:OS_Task_Continue|OS_Task_Continue]] * [[en:osa:ref:allservices:OS_Task_IsPaused|OS_Task_IsPaused]] * [[en:osa:ref:allservices:OS_Task_GetPriority|OS_Task_GetPriority]] * [[en:osa:ref:allservices:OS_Task_SetPriority|OS_Task_SetPriority]] ---- * [[en:osa:ref:services:alphabetical|Alphabetical]] * [[en:osa:ref:services:brieflist|All services]] ~~UP~~