OSA : OS_Task_Stop

OS_Task_Stop ()

Allowed only in task

Stop task and delete it from the list of active tasks. A task can only be stopped by itself. To stop another task use service OS_Task_Delete().

Call allowed:

Only in task

Parameters:

None

Returns:

nothing

Example:

void Task (void)
{
    for (;;) {
        /*...*/
        // Free all resources
        /*...*/
        // And stop current task
        OS_Task_Stop();
        /*...*/
    }
}

Old style name

OS_StopTask

See also