RTEMS ITRON 3.0 API User's Guide
ER del_tsk( ID tskid );
E_OK
- Normal Completion
E_ID
- Invalid ID Number (tskid was invalid or could not be used)
E_NOEXS
- Object does not exist (the task specified by tskid does not exist)
E_OACV
- Object access violation (A tskid less than -4 was specified from a user task. This is implementation dependent.)
E_OBJ
- Invalid object state (the target task is not in DORMANT state)
EN_OBJNO
- An object number which could not be accessed on the target node is specified.
EN_CTXID
- Specified an object on another node when the system call was issued from a task in dispatch disabled state or from a task-independent portion
This system call deletes the task specified by tskid. Specifically, it changes the state of the task specified by tskid from DORMANT into NON-EXISTENT (a virtual state not existing on the system), and then clears the TCB and releases stack. An E_OBJ error results if this system call is used on a task which is not DORMANT.
After deletion, another task having the same ID number can be created.
A task cannot delete itself by this system call. An E_OBJ error will result if a task specifies itself, since such a task cannot be DORMANT. Use the exd_tsk system call rather than this one when a task needs to delete itself.
RTEMS ITRON 3.0 API User's Guide
Copyright © 1988-2008 OAR Corporation