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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

34 CHAPTER 4. T-KERNEL/OS FUNCTIONS<br />

tk exd tsk<br />

Exit and Delete Task<br />

[C Language Interface]<br />

void tk_exd_tsk ( ) ;<br />

[Parameters]<br />

None.<br />

[Return Parameters]<br />

Does not return to the context issuing the system call.<br />

[Error Codes]<br />

The following error can be detected; but since this system call does not return to the context issuing<br />

the system call even when error is detected, an error code cannot be passed directly in a system call<br />

return parameter. The behavior in case an error occurs is implementation-dependent.<br />

E CTX<br />

Context error (issued from task-independent portion or in dispatch disabled state)<br />

[Description]<br />

Terminates the invoking task normally and also deletes it.<br />

This system call changes the state of the invoking task to NON-EXISTENT state (no longer exists in<br />

the system).<br />

[Additional Notes]<br />

When a task terminates by tk exd tsk, the resources acquired by the task up to that time (memory<br />

blocks, semaphores, etc.) are not automatically freed. The user is responsible for releasing such resources<br />

before the task exits.<br />

tk exd tsk is a system call that does not return to the context from which it was called. Even if an<br />

error code is returned when an error of some kind is detected, normally no error checking is performed<br />

in the context from which the system call was invoked, leaving the possibility that the program will<br />

hang. For this reason these system calls do not return even if error is detected.<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!