====== OSA : OS_Task_Replace ====== **OS_Task_Replace (priority, TaskName)**\\ === === {{osa:ref:attr_call_task.png|Allowed only in task}} Replace current task with a new task. Current task will be deleted. === Call allowed: === Only in task === Parameters: === {| class = "fpl" |- |//''priority''// |Task priority of a new task. Allowed values from 0 (highest) to 7 (lowest) |- |//''TaskName''// |Name of C-function to be used as task |} === Returns: === nothing === Example: === void Task_Zero (void) { for (;;) { RB0 = 0; OS_Task_Replace (1, Task_One); } } void Task_One (void) { for (;;) { RB0 = 1; OS_Task_Replace (1, Task_Zero); } } === Old style name === **OS_ReplaceTask**\\ === 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~~