RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Semaphore Manager SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

9.4.6: SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore

CALLING SEQUENCE:

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

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - semaphore released successfully
RTEMS.INVALID_ID - invalid semaphore id
RTEMS.ILLEGAL_ON_REMOTE_OBJECT - not supported for remote semaphores

DESCRIPTION:

This directive unblocks all tasks waiting on the semaphore specified by id. Since there are tasks blocked on the semaphore, the semaphore's count is not changed by this directive and thus is zero before and after this directive is executed. Tasks which are unblocked as the result of this directive will return from the rtems.semaphore_release directive with a status code of RTEMS.UNSATISFIED to indicate that the semaphore was not obtained.

This directive may unblock any number of tasks. Any of the unblocked tasks may preempt the running task if the running task's preemption mode is enabled and an unblocked task has a higher priority than the running task.

NOTES:

The calling task may be preempted if it causes a higher priority task to be made ready for execution.

If the task to be unblocked resides on a different node from the semaphore, then the waiting task is unblocked, and the proxy used to represent the task is reclaimed.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2004 OAR Corporation