forked from Imagelibrary/rtems
Changed bitwise OR's used to build up option and attribute sets
to be correct in either C or Ada. Added the interrupt disable, enable, flash, and is in progress directives. changed "97" to "1997"
This commit is contained in:
@@ -78,9 +78,9 @@ not received. An event condition is used to specify the events
|
||||
which the task desires to receive and the algorithm which will
|
||||
be used to determine when the request is satisfied. An event
|
||||
condition is satisfied based upon one of two algorithms which
|
||||
are selected by the user. The EVENT_ANY algorithm states that
|
||||
are selected by the user. The @code{EVENT_ANY} algorithm states that
|
||||
an event condition is satisfied when at least a single requested
|
||||
event is posted. The EVENT_ALL algorithm states that an event
|
||||
event is posted. The @code{EVENT_ALL} algorithm states that an event
|
||||
condition is satisfied when every requested event is posted.
|
||||
|
||||
@ifinfo
|
||||
@@ -89,16 +89,17 @@ condition is satisfied when every requested event is posted.
|
||||
@subsection Building an Event Set or Condition
|
||||
|
||||
An event set or condition is built by a bitwise OR of
|
||||
the desired events. The set of valid events is EVENT_0 through
|
||||
EVENT_31. If an event is not explicitly specified in the set or
|
||||
the desired events. The set of valid events is @code{EVENT_0} through
|
||||
@code{EVENT_31}. If an event is not explicitly specified in the set or
|
||||
condition, then it is not present. Events are specifically
|
||||
designed to be mutually exclusive, therefore bitwise OR and
|
||||
addition operations are equivalent as long as each event appears
|
||||
exactly once in the event set list.
|
||||
|
||||
For example, when sending the event set consisting of
|
||||
EVENT_6, EVENT_15, and EVENT_31, the event parameter to the
|
||||
event_send directive should be EVENT_6 | EVENT_15 | EVENT_31.
|
||||
@code{EVENT_6}, @code{EVENT_15}, and @code{EVENT_31},
|
||||
the event parameter to the event_send directive should be
|
||||
@code{EVENT_6 @value{OR} EVENT_15 @value{OR} EVENT_31}.
|
||||
|
||||
@ifinfo
|
||||
@node Building an EVENT_RECEIVE Option Set, Event Manager Operations, Building an Event Set or Condition, Event Manager Background
|
||||
@@ -110,10 +111,10 @@ desired option components. The set of valid options for the
|
||||
event_receive directive are listed in the following table:
|
||||
|
||||
@itemize @bullet
|
||||
@item WAIT - task will wait for event (default)
|
||||
@item NO_WAIT - task should not wait
|
||||
@item EVENT_ALL - return after all events (default)
|
||||
@item EVENT_ANY - return after any events
|
||||
@item @code{WAIT} - task will wait for event (default)
|
||||
@item @code{NO_WAIT} - task should not wait
|
||||
@item @code{EVENT_ALL} - return after all events (default)
|
||||
@item @code{EVENT_ANY} - return after any events
|
||||
@end itemize
|
||||
|
||||
Option values are specifically designed to be
|
||||
@@ -122,14 +123,15 @@ are equivalent as long as each option appears exactly once in
|
||||
the component list. An option listed as a default is not
|
||||
required to appear in the option list, although it is a good
|
||||
programming practice to specify default options. If all
|
||||
defaults are desired, the option DEFAULT_OPTIONS should be
|
||||
defaults are desired, the option @code{DEFAULT_OPTIONS} should be
|
||||
specified on this call.
|
||||
|
||||
This example demonstrates the option parameter needed
|
||||
to poll for all events in a particular event condition to
|
||||
arrive. The option parameter passed to the event_receive
|
||||
directive should be either EVENT_ALL | NO_WAIT or NO_WAIT. The
|
||||
option parameter can be set to NO_WAIT because EVENT_ALL is the
|
||||
directive should be either @code{EVENT_ALL @value{OR} NO_WAIT}
|
||||
or @code{NO_WAIT}. The option parameter can be set to
|
||||
@code{NO_WAIT} because @code{EVENT_ALL} is the
|
||||
default condition for event_receive.
|
||||
|
||||
@ifinfo
|
||||
@@ -194,7 +196,7 @@ satisfied, then one of the following situations applies:
|
||||
@item By default, the calling task will wait forever for the
|
||||
event condition to be satisfied.
|
||||
|
||||
@item Specifying the NO_WAIT option forces an immediate return
|
||||
@item Specifying the @code{NO_WAIT} option forces an immediate return
|
||||
with an error status code.
|
||||
|
||||
@item Specifying a timeout limits the period the task will
|
||||
@@ -218,10 +220,11 @@ the calling task but the event set is left unaltered.
|
||||
|
||||
A task can receive all of the currently pending
|
||||
events by calling the event_receive directive with a value of
|
||||
ALL_EVENTS for the input event condition and NO_WAIT | EVENT_ANY
|
||||
@code{ALL_EVENTS} for the input event condition and
|
||||
@code{NO_WAIT @value{OR} EVENT_ANY}
|
||||
for the option set. The pending events are returned to the
|
||||
calling task and the event set is cleared. If no events are
|
||||
pending then the UNSATISFIED status code will be returned.
|
||||
pending then the @code{UNSATISFIED} status code will be returned.
|
||||
|
||||
@ifinfo
|
||||
@node Event Manager Directives, EVENT_SEND - Send event set to a task, Receiving all Pending Events, Event Manager
|
||||
@@ -282,7 +285,7 @@ events, then the events sent are left pending.
|
||||
|
||||
@subheading NOTES:
|
||||
|
||||
Specifying SELF for id results in the event set being
|
||||
Specifying @code{SELF} for id results in the event set being
|
||||
sent to the calling task.
|
||||
|
||||
Identical events sent to a task are not queued. In
|
||||
@@ -330,18 +333,18 @@ procedure Event_Receive (
|
||||
|
||||
@subheading DIRECTIVE STATUS CODES:
|
||||
@code{SUCCESSFUL} - event received successfully@*
|
||||
@code{UNSATISFIED} - input event not satisfied (NO_WAIT)@*
|
||||
@code{UNSATISFIED} - input event not satisfied (@code{NO_WAIT})@*
|
||||
@code{TIMEOUT} - timed out waiting for event
|
||||
|
||||
@subheading DESCRIPTION:
|
||||
|
||||
This directive attempts to receive the event
|
||||
condition specified in event_in. If event_in is set to
|
||||
PENDING_EVENTS, then the current pending events are returned in
|
||||
event_out and left pending. The WAIT and NO_WAIT options in the
|
||||
@code{PENDING_EVENTS}, then the current pending events are returned in
|
||||
event_out and left pending. The @code{WAIT} and @code{NO_WAIT} options in the
|
||||
option_set parameter are used to specify whether or not the task
|
||||
is willing to wait for the event condition to be satisfied.
|
||||
EVENT_ANY and EVENT_ALL are used in the option_set parameter are
|
||||
@code{EVENT_ANY} and @code{EVENT_ALL} are used in the option_set parameter are
|
||||
used to specify whether a single event or the complete event set
|
||||
is necessary to satisfy the event condition. The event_out
|
||||
parameter is returned to the calling task with the value that
|
||||
@@ -350,13 +353,13 @@ corresponds to the events in event_in that were satisfied.
|
||||
If pending events satisfy the event condition, then
|
||||
event_out is set to the satisfied events and the pending events
|
||||
in the event condition are cleared. If the event condition is
|
||||
not satisfied and NO_WAIT is specified, then event_out is set to
|
||||
not satisfied and @code{NO_WAIT} is specified, then event_out is set to
|
||||
the currently satisfied events. If the calling task chooses to
|
||||
wait, then it will block waiting for the event condition.
|
||||
|
||||
If the calling task must wait for the event condition
|
||||
to be satisfied, then the timeout parameter is used to specify
|
||||
the maximum interval to wait. If it is set to NO_TIMEOUT, then
|
||||
the maximum interval to wait. If it is set to @code{NO_TIMEOUT}, then
|
||||
the calling task will wait forever.
|
||||
|
||||
@subheading NOTES:
|
||||
@@ -369,9 +372,9 @@ The following event receive option constants are defined by
|
||||
RTEMS:
|
||||
|
||||
@itemize @bullet
|
||||
@item WAIT task will wait for event (default)
|
||||
@item NO_WAIT task should not wait
|
||||
@item EVENT_ALL return after all events (default)
|
||||
@item EVENT_ANY return after any events
|
||||
@item @code{WAIT} task will wait for event (default)
|
||||
@item @code{NO_WAIT} task should not wait
|
||||
@item @code{EVENT_ALL} return after all events (default)
|
||||
@item @code{EVENT_ANY} return after any events
|
||||
@end itemize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user