In general, an option is built by a bitwise OR of the
desired option components. The set of valid options for the
rtems_event_receive
directive are listed
in the following table:
RTEMS_WAIT
- task will wait for event (default)
RTEMS_NO_WAIT
- task should not wait
RTEMS_EVENT_ALL
- return after all events (default)
RTEMS_EVENT_ANY
- return after any events
Option values are specifically designed to be
mutually exclusive, therefore bitwise OR and addition operations
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 RTEMS_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
rtems_event_receive
directive should be either
RTEMS_EVENT_ALL | RTEMS_NO_WAIT
or RTEMS_NO_WAIT
. The option parameter can be set to
RTEMS_NO_WAIT
because RTEMS_EVENT_ALL
is the
default condition for rtems_event_receive
.
Copyright © 1988-2000 OAR Corporation