In general, an attribute set is built by a bitwise OR of the desired components. The set of valid task attribute components is listed below:
RTEMS_NO_FLOATING_POINT
- does not use coprocessor (default)
RTEMS_FLOATING_POINT
- uses numeric coprocessor
RTEMS_LOCAL
- local task (default)
RTEMS_GLOBAL
- global task
Attribute values are specifically designed to be mutually
exclusive, therefore bitwise OR and addition operations are
equivalent as long as each attribute appears exactly once in the
component list. A component listed as a default is not required
to appear in the component list, although it is a good
programming practice to specify default components. If all
defaults are desired, then RTEMS_DEFAULT_ATTRIBUTES
should be used.
This example demonstrates the attribute_set parameter needed to
create a local task which utilizes the numeric coprocessor. The
attribute_set parameter could be RTEMS_FLOATING_POINT
or
RTEMS_LOCAL | RTEMS_FLOATING_POINT
.
The attribute_set parameter can be set to
RTEMS_FLOATING_POINT
because RTEMS_LOCAL
is the default for all created
tasks. If the task were global and used the numeric
coprocessor, then the attribute_set parameter would be
RTEMS_GLOBAL | RTEMS_FLOATING_POINT
.
Copyright © 1988-2008 OAR Corporation