In general, an attribute set is built by a bitwise OR of the desired attribute components. The set of valid message queue attributes is provided in the following table:
RTEMS_FIFO
- tasks wait by FIFO (default)
RTEMS_PRIORITY
- tasks wait by priority
RTEMS_LOCAL
- local message queue (default)
RTEMS_GLOBAL
- global message queue
An attribute listed as a default is not required to
appear in the attribute list, although it is a good programming
practice to specify default attributes. If all defaults are
desired, the attribute RTEMS_DEFAULT_ATTRIBUTES
should be specified on this call.
This example demonstrates the attribute_set parameter
needed to create a local message queue with the task priority
waiting queue discipline. The attribute_set parameter to the
rtems_message_queue_create
directive could be either
RTEMS_PRIORITY
or
RTEMS_LOCAL | RTEMS_PRIORITY
.
The attribute_set parameter can be set to RTEMS_PRIORITY
because RTEMS_LOCAL
is the default for all created
message queues. If a similar message queue were to be known globally, then the
attribute_set parameter would be
RTEMS_GLOBAL | RTEMS_PRIORITY
.
Copyright © 1988-1998 OAR Corporation