rtems_status_code rtems_semaphore_flush( rtems_id id );
RTEMS_SUCCESSFUL
- semaphore released successfully
RTEMS_INVALID_ID
- invalid semaphore id
RTEMS_ILLEGAL_ON_REMOTE_OBJECT
- not supported for remote semaphores
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_obtain
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.
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.
Copyright © 1988-2008 OAR Corporation