The TASK_EXITTED extension is invoked when a task exits the body of the starting procedure by either an implicit or explicit return statement. This user extension have a prototype similar to the following:
rtems_extension user_task_exitted( rtems_tcb *current_task );
where current_task can be used to access the TCB for the currently executing task which has just exitted.
Although exiting of task is often considered to be a
fatal error, this extension allows recovery by either restarting
or deleting the exiting task. If the user does not wish to
recover, then a fatal error may be reported. If the user does
not provide a TASK_EXITTED extension or the provided handler
returns control to RTEMS, then the RTEMS default handler will be
used. This default handler invokes the directive
fatal_error_occurred with the RTEMS_TASK_EXITTED
directive status.
Copyright © 1988-2008 OAR Corporation