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 or 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 or RTEMS.FLOATING_POINT
.
Copyright © 1988-2008 OAR Corporation