OAR

RTEMS 4.5.1-pre3 On-Line Library


Task Manager TASK_DELETE - Delete a task

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

5.4.5: TASK_DELETE - Delete a task

CALLING SEQUENCE:

procedure Task_Delete (
   ID     : in     RTEMS.ID;
   Result :    out RTEMS.Status_Codes
);

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - task restarted successfully
RTEMS.INVALID_ID - task id invalid
RTEMS.ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task

DESCRIPTION:

This directive deletes a task, either the calling task or another task, as specified by id. RTEMS stops the execution of the task and reclaims the stack memory, any allocated delay or timeout timers, the TCB, and, if the task is RTEMS.FLOATING_POINT, its floating point context area. RTEMS does not reclaim the following resources: region segments, partition buffers, semaphores, timers, or rate monotonic periods.

NOTES:

A task is responsible for releasing its resources back to RTEMS before deletion. To insure proper deallocation of resources, a task should not be deleted unless it is unable to execute or does not hold any RTEMS resources. If a task holds RTEMS resources, the task should be allowed to deallocate its resources before deletion. A task can be directed to release its resources and delete itself by restarting it with a special argument or by sending it a message, an event, or a signal.

Deletion of the current task (RTEMS.SELF) will force RTEMS to select another task to execute.

When a global task is deleted, the task id must be transmitted to every node in the system for deletion from the local copy of the global object table.

The task must reside on the local node, even if the task was created with the RTEMS.GLOBAL option.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2000 OAR Corporation