30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.1. TASK MANAGEMENT FUNCTIONS 31<br />

tk del tsk<br />

Delete Task<br />

[C Language Interface]<br />

ER ercd = tk_del_tsk ( ID tskid ) ;<br />

[Parameters]<br />

ID tskid Task ID<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E ID<br />

E NOEXS<br />

E OBJ<br />

Normal completion<br />

Invalid ID number (tskid is invalid or cannot be used)<br />

Object does not exist (the task designated in tskid does not exist)<br />

Invalid object state (the task is not in DORMANT state)<br />

[Description]<br />

Deletes the task designated in tskid.<br />

This system call changes the state of the task designated in tskid from DORMANT state to NON-<br />

EXISTENT state (no longer exists in the system), releasing the TCB and stack area that were assigned<br />

to the task. The task ID number is also released. When this system call is issued for a task not in<br />

DORMANT state, error code E OBJ is returned.<br />

This system call cannot designate the invoking task. If the invoking task is designated, error code E OBJ<br />

is returned since the invoking task is not in DORMANT state. The invoking task is deleted not by this<br />

system call but by the tk exd tsk system call.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!