summaryrefslogtreecommitdiffstats
path: root/doc/user/sem.t
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-25 16:36:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-25 16:36:50 +0000
commit5a69fe3be0b36553d80f5843dfca8fcb6c795542 (patch)
tree632839530a8125f3e1881ea8f96d6f22df256602 /doc/user/sem.t
parentEnabled Ada95 interrupt support chapter and reformatted a (diff)
downloadrtems-5a69fe3be0b36553d80f5843dfca8fcb6c795542.tar.bz2
Formatting improvements.
Diffstat (limited to 'doc/user/sem.t')
-rw-r--r--doc/user/sem.t61
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/user/sem.t b/doc/user/sem.t
index a7d04aefe6..65aff07a32 100644
--- a/doc/user/sem.t
+++ b/doc/user/sem.t
@@ -26,6 +26,7 @@ semaphore manager are:
@item @code{@value{DIRPREFIX}semaphore_delete} - Delete a semaphore
@item @code{@value{DIRPREFIX}semaphore_obtain} - Acquire a semaphore
@item @code{@value{DIRPREFIX}semaphore_release} - Release a semaphore
+@item @code{@value{DIRPREFIX}semaphore_flush} - Unblock all tasks waiting on a semaphore
@end itemize
@section Background
@@ -758,3 +759,63 @@ calling task having its priority lowered. This will occur if
the calling task holds no other binary semaphores and it has
inherited a higher priority.
+@c
+@c
+@c
+@page
+@subsection SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore
+
+@cindex flush a semaphore
+@cindex unlock all tasks a semaphore
+
+@subheading CALLING SEQUENCE:
+
+@ifset is-C
+@findex rtems_semaphore_flush
+@example
+rtems_status_code rtems_semaphore_flush(
+ rtems_id id
+);
+@end example
+@end ifset
+
+@ifset is-Ada
+@example
+procedure Semaphore_Flush (
+ ID : in RTEMS.ID;
+ Result : out RTEMS.Status_Codes
+);
+@end example
+@end ifset
+
+@subheading DIRECTIVE STATUS CODES:
+@code{@value{RPREFIX}SUCCESSFUL} - semaphore released successfully@*
+@code{@value{RPREFIX}INVALID_ID} - invalid semaphore id@*
+@code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported for remote semaphores
+
+@subheading 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
+@code{@value{DIRPREFIX}semaphore_release} directive with a
+status code of @code{@value{RPREFIX}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.
+
+@subheading 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.
+
+