tk_ext_tsk
Exit Task
void tk_ext_tsk ( ) ;
None
Does not return to the context issuing the system call.
The following error can be detected; but since this system call does not return to the context issuing the system call even when error is detected, an error code cannot be passed directly in a system call return parameter. The behavior in case an error occurs is implementation-dependent.
E_CTX Context error (issued from task-independent portion or in dispatch disabled state)
Exits the invoking task normally and changes its state to DORMANT state.
When a task terminates by tk_ext_tsk, the resources acquired by the task up to that time (memory blocks, semaphores, etc.) are not automatically freed. The user is responsible for releasing such resources before the task exits.
tk_ext_tsk is a system call that does not return to the context from which it was called. Even if an error code is returned when an error of some kind is detected, normally no error checking is performed in the context from which the system call was invoked, leaving the possibility that the program will hang. For this reason these system calls do not return even if error is detected. As a rule, the task priority and other information included in the TCB is reset when the task returns to DORMANT state. If, for example, the task priority is changed by tk_chg_pri and later terminated by tk_ext_tsk, the task priority reverts to the startup priority (itskpri) specified when the task was started. It does not keep the task priority in e.ect at the time tk_ext_tsk was executed. System calls that do not return to the calling context are those named tk ret ? or tk ext ? (tk exd ???).

Comments