From 5a69fe3be0b36553d80f5843dfca8fcb6c795542 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 25 Oct 1999 16:36:50 +0000 Subject: Formatting improvements. --- doc/user/Makefile | 2 +- doc/user/conf.t | 29 ++++++++++++++++---------- doc/user/sem.t | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/user/Makefile b/doc/user/Makefile index 715a3fc896..605701b095 100644 --- a/doc/user/Makefile +++ b/doc/user/Makefile @@ -116,7 +116,7 @@ sem.texi: sem.t -n "Message Manager" ${*}.t msg.texi: msg.t - $(BMENU) -p "Semaphore Manager SEMAPHORE_RELEASE - Release a semaphore" \ + $(BMENU) -p "Semaphore Manager SEMAPHORE_FLUSH - Unblock all tasks waiting on a semaphore" \ -u "Top" \ -n "Event Manager" ${*}.t diff --git a/doc/user/conf.t b/doc/user/conf.t index 8c6551f06c..afb95555c3 100644 --- a/doc/user/conf.t +++ b/doc/user/conf.t @@ -861,17 +861,24 @@ in the User Extensions Table is defined in the following @value{LANGUAGE} @ifset is-C @example -typedef User_extensions_routine rtems_extension; -typedef User_extensions_thread_create_extension rtems_task_create_extension; -typedef User_extensions_thread_delete_extension rtems_task_delete_extension; -typedef User_extensions_thread_start_extension rtems_task_start_extension; -typedef User_extensions_thread_restart_extension rtems_task_restart_extension; -typedef User_extensions_thread_switch_extension rtems_task_switch_extension; -typedef User_extensions_thread_begin_extension rtems_task_begin_extension; -typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension; -typedef User_extensions_fatal_extension rtems_fatal_extension; - -typedef User_extensions_Table rtems_extensions_table; +typedef User_extensions_routine rtems_extension; +typedef User_extensions_thread_create_extension + rtems_task_create_extension; +typedef User_extensions_thread_delete_extension + rtems_task_delete_extension; +typedef User_extensions_thread_start_extension + rtems_task_start_extension; +typedef User_extensions_thread_restart_extension + rtems_task_restart_extension; +typedef User_extensions_thread_switch_extension + rtems_task_switch_extension; +typedef User_extensions_thread_begin_extension + rtems_task_begin_extension; +typedef User_extensions_thread_exitted_extension + rtems_task_exitted_extension; +typedef User_extensions_fatal_extension rtems_fatal_extension; + +typedef User_extensions_Table rtems_extensions_table; typedef struct @{ rtems_task_create_extension thread_create; 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. + + -- cgit v1.2.3