RTEMS Logo

RTEMS 4.6.2 On-Line Library


Task Manager ext_tsk - Exit Issuing Task

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

1.4.4: ext_tsk - Exit Issuing Task

CALLING SEQUENCE:

void ext_tsk(void);

STATUS CODES:

E_CTX - Context error (issued from task-independent portions or a task in dispatch disabled state)

* System call may detect this error. The error is not returned to the context issuing the system call. Error codes therefore cannot be returned directly as a return parameter of the system call. The behavior on error detection is implementation dependent.

DESCRIPTION:

This system call causes the issuing task to exit, changing the state of the task into the DORMANT state.

NOTES:

When a task exits due to ext_tsk, that task does not automatically release all the resources (memory blocks, semaphores, etc.) which it had obtained prior to the system call. It is the user's responsibility that all resources are released beforehand.

Ext_tsk is a system call which does not return to the issuing context. Accordingly, even if an error code is returned on detection of some error, it is normal for tasks making this system call not to perform any error checking, and it is in fact possible that a program could run out of control. For this reason, even if an error is detected upon issuing this system call, the error is not returned to the task which issued the system call. If information on detected errors is required it should be left in a messagebuffer used as an error log.

In principle, information concerning a task recorded in the TCB, such as task priority, is reset whenever a task is placed in DORMANT state. For example, its task priority after being restarted would be reset to the initial task priority (itskpri) specified by cre_tsk when it was first created, even if a task's priority was changed using chg_pri, then that task exits using ext_tsk, but later started by sta_tsk. Task priority does not return to what it was when ext_tsk was executed.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation