Available Languages?:

OSA : OS_Task_Delete

OS_Task_Delete (OST_TASK_POINTER tp)

Stop task and delete it from the list of active tasks. Be careful using this service and do not forget to free all task resources before stopping the task. It is recommended that you clear the pointer to the task descriptor after stopping the task.

Before calling this service you should be sure that variable tp was initialized.

The macro this_task or the service OS_Task_GetCur() can be used to perform this operation on the current task. When a task stops itself, the kernel gets control immediately.

Call allowed:

Only in task

Parameters:

to Pointer to task descriptor (OST_TASK_POINTER*)

Returns:

nothing

Example:

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

Old style name

OS_DeleteTask

See also

 
en/osa/ref/allservices/os_task_delete.txt · Last modified: 07.10.2010 13:57 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki