RTEMS Logo

RTEMS 4.6.0pre5 On-Line Library


Semaphore Manager SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore

PREV UP NEXT Bookshelf RTEMS C User's Guide

9.4.6: SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore

CALLING SEQUENCE:

rtems_status_code rtems_semaphore_flush(
  rtems_id id
);

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 C User's Guide

Copyright © 1988-2003 OAR Corporation