tk_del_tsk
Delete Task
ER ercd = tk_del_tsk ( ID tskid ) ;
ID tskid Task ID
ER ercd Error code
E_OK Normal completion
E_ID Invalid ID number (tskid is invalid or cannot be used)
E_NOEXS Object does not exist (the task specified in tskid does not exist)
E_OBJ Invalid object state (the task is not in DORMANT state)
Deletes the task specified in tskid.
This system call changes the state of the task specified in tskid from DORMANT state to NONEXISTENT state (no longer exists in the system), releasing the TCB and stack area that were assigned to the task. The task ID number is also released. When this system call is issued for a task not in DORMANT state, error code E_OBJ is returned.
This system call cannot specify the invoking task. If the invoking task is specified, error code E_OBJ is returned since the invoking task is not in DORMANT state. The invoking task is deleted not by this system call but by the tk_exd_tsk system call.

Comments