procedure Semaphore_Delete ( ID : in RTEMS.ID; Result : out RTEMS.Status_Codes );
RTEMS.SUCCESSFUL
- semaphore deleted successfully
RTEMS.INVALID_ID
- invalid semaphore id
RTEMS.ILLEGAL_ON_REMOTE_OBJECT
- cannot delete remote semaphore
RTEMS.RESOURCE_IN_USE
- binary semaphore is in use
This directive deletes the semaphore specified by id
.
All tasks blocked waiting to acquire the semaphore will be
readied and returned a status code which indicates that the
semaphore was deleted. The SMCB for this semaphore is reclaimed
by RTEMS.
The calling task will be preempted if it is enabled by the task's execution mode and a higher priority local task is waiting on the deleted semaphore. The calling task will NOT be preempted if all of the tasks that are waiting on the semaphore are remote tasks.
The calling task does not have to be the task that created the semaphore. Any local task that knows the semaphore id can delete the semaphore.
When a global semaphore is deleted, the semaphore id must be transmitted to every node in the system for deletion from the local copy of the global object table.
The semaphore must reside on the local node, even if
the semaphore was created with the RTEMS.GLOBAL
option.
Proxies, used to represent remote tasks, are reclaimed when the semaphore is deleted.
Copyright © 1988-2008 OAR Corporation