In general, an ASR's mode is built by a bitwise OR of the desired mode components. The set of valid mode components is the same as those allowed with the task_create and task_mode directives. A complete list of mode options is provided in the following table:
RTEMS.PREEMPT
is masked by
RTEMS.PREEMPT_MASK
and enables preemption
RTEMS.NO_PREEMPT
is masked by
RTEMS.PREEMPT_MASK
and disables preemption
RTEMS.NO_TIMESLICE
is masked by
RTEMS.TIMESLICE_MASK
and disables timeslicing
RTEMS.TIMESLICE
is masked by
RTEMS.TIMESLICE_MASK
and enables timeslicing
RTEMS.ASR
is masked by
RTEMS.ASR_MASK
and enables ASR processing
RTEMS.NO_ASR
is masked by
RTEMS.ASR_MASK
and disables ASR processing
RTEMS.INTERRUPT_LEVEL(0)
is masked by
RTEMS.INTERRUPT_MASK
and enables all interrupts
RTEMS.INTERRUPT_LEVEL(n)
is masked by
RTEMS.INTERRUPT_MASK
and sets interrupts level n
Mode values are specifically designed to be mutually exclusive, therefore bitwise OR and addition operations are equivalent as long as each mode appears exactly once in the component list. A mode component listed as a default is not required to appear in the mode list, although it is a good programming practice to specify default components. If all defaults are desired, the mode DEFAULT_MODES should be specified on this call.
This example demonstrates the mode parameter used
with the rtems.signal_catch
to establish an ASR which executes at
interrupt level three and is non-preemptible. The mode should
be set to
RTEMS.INTERRUPT_LEVEL(3) or RTEMS.NO_PREEMPT
to indicate the
desired processor mode and interrupt level.
Copyright © 1988-2004 OAR Corporation