RTEMS CPU Kit with SuperCore  4.10.99.0
Defines | Typedefs | Functions | Variables
Modes
RTEMS Classic API

RTEMS thread and RTEMS_ASR modes. More...

Collaboration diagram for Modes:

Defines

#define RTEMS_ALL_MODE_MASKS   0x0000ffff
 The following constants define the individual modes and masks which may be used to compose a mode set and to alter modes.
#define RTEMS_DEFAULT_MODES   0x00000000
 This mode constant is the default mode set.
#define RTEMS_CURRENT_MODE   0
 This mode constant is used when the user wishes to obtain their current execution mode.
#define RTEMS_TIMESLICE_MASK   0x00000200
 This mode constant corresponds to the timeslice enable/disable bit.
#define RTEMS_PREEMPT_MASK   0x00000100
 This mode constant corresponds to the preemption enable/disable bit.
#define RTEMS_ASR_MASK   0x00000400
 This mode constant corresponds to the signal enable/disable bit.
#define RTEMS_INTERRUPT_MASK   CPU_MODES_INTERRUPT_MASK
 This mode constant corresponds to the interrupt enable/disable bits.
#define RTEMS_PREEMPT   0x00000000
 This mode constant is used to indicate preemption is enabled.
#define RTEMS_NO_PREEMPT   0x00000100
 This mode constant is used to indicate preemption is disabled.
#define RTEMS_NO_TIMESLICE   0x00000000
 This mode constant is used to indicate timeslicing is disabled.
#define RTEMS_TIMESLICE   0x00000200
 This mode constant is used to indicate timeslicing is enabled.
#define RTEMS_ASR   0x00000000
 This mode constant is used to indicate signal processing is enabled.
#define RTEMS_NO_ASR   0x00000400
 This mode constant is used to indicate signal processing is disabled.
#define RTEMS_INTERRUPT_LEVEL(_mode_set)   ( (_mode_set) & RTEMS_INTERRUPT_MASK )
 RTEMS_INTERRUPT_LEVEL.

Typedefs

typedef uint32_t Modes_Control
 The following type defines the control block used to manage each a mode set.

Functions

Modes_Control rtems_interrupt_level_body (uint32_t level)
 Body for RTEMS_INTERRUPT_LEVEL Macro.
RTEMS_INLINE_ROUTINE bool _Modes_Mask_changed (Modes_Control mode_set, Modes_Control masks)
 Checks if any of the mode flags in mask are set in mode_set.
RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled (Modes_Control mode_set)
 Checks if mode_set says that Asynchronous Signal Processing is disabled.
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (Modes_Control mode_set)
 Checks if mode_set indicates that preemption is enabled.
RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice (Modes_Control mode_set)
 Checks if mode_set indicates that timeslicing is enabled.
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (Modes_Control mode_set)
 Gets the interrupt level portion of the mode_set.
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (Modes_Control mode_set)
 Sets the current interrupt level to that specified in the mode_set.
RTEMS_INLINE_ROUTINE void _Modes_Change (Modes_Control old_mode_set, Modes_Control new_mode_set, Modes_Control mask, Modes_Control *out_mode_set, Modes_Control *changed)
 Changes the modes in old_mode_set indicated by mask to the requested values in new_mode_set.

Variables

const uint32_t rtems_interrupt_mask
 Interrupt Mask Variable.

Detailed Description

RTEMS thread and RTEMS_ASR modes.

This encapsulates functionality which XXX.

This include file contains all constants and structures associated with the RTEMS thread and RTEMS_ASR modes.


Define Documentation

#define RTEMS_ASR   0x00000000

This mode constant is used to indicate signal processing is enabled.

#define RTEMS_ASR_MASK   0x00000400

This mode constant corresponds to the signal enable/disable bit.

Referenced by _Modes_Is_asr_disabled().

#define RTEMS_INTERRUPT_LEVEL (   _mode_set)    ( (_mode_set) & RTEMS_INTERRUPT_MASK )

RTEMS_INTERRUPT_LEVEL.

This function returns the processor dependent interrupt level which corresponds to the requested interrupt level.

Note:
RTEMS supports 256 interrupt levels using the least significant eight bits of MODES.CONTROL. On any particular CPU, fewer than 256 levels may be supported.
#define RTEMS_INTERRUPT_MASK   CPU_MODES_INTERRUPT_MASK

This mode constant corresponds to the interrupt enable/disable bits.

Referenced by _Modes_Get_interrupt_level().

#define RTEMS_NO_ASR   0x00000400

This mode constant is used to indicate signal processing is disabled.

Referenced by _Modes_Is_asr_disabled().

#define RTEMS_NO_PREEMPT   0x00000100

This mode constant is used to indicate preemption is disabled.

#define RTEMS_NO_TIMESLICE   0x00000000

This mode constant is used to indicate timeslicing is disabled.

#define RTEMS_PREEMPT   0x00000000

This mode constant is used to indicate preemption is enabled.

Referenced by _Modes_Is_preempt().

#define RTEMS_PREEMPT_MASK   0x00000100

This mode constant corresponds to the preemption enable/disable bit.

Referenced by _Modes_Is_preempt().

#define RTEMS_TIMESLICE   0x00000200

This mode constant is used to indicate timeslicing is enabled.

Referenced by _Modes_Is_timeslice().

#define RTEMS_TIMESLICE_MASK   0x00000200

This mode constant corresponds to the timeslice enable/disable bit.

Referenced by _Modes_Is_timeslice().


Function Documentation

RTEMS_INLINE_ROUTINE void _Modes_Change ( Modes_Control  old_mode_set,
Modes_Control  new_mode_set,
Modes_Control  mask,
Modes_Control out_mode_set,
Modes_Control changed 
)

Changes the modes in old_mode_set indicated by mask to the requested values in new_mode_set.

This routine changes the modes in old_mode_set indicated by mask to the requested values in new_mode_set. The resulting mode set is returned in out_mode_set and the modes that changed is returned in changed.

RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control  mode_set)

Gets the interrupt level portion of the mode_set.

This function returns the interrupt level portion of the mode_set.

References RTEMS_INTERRUPT_MASK.

Referenced by _Modes_Set_interrupt_level().

RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( Modes_Control  mode_set)

Checks if mode_set says that Asynchronous Signal Processing is disabled.

This function returns TRUE if mode_set indicates that Asynchronous Signal Processing is disabled, and FALSE otherwise.

References RTEMS_ASR_MASK, and RTEMS_NO_ASR.

RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( Modes_Control  mode_set)

Checks if mode_set indicates that preemption is enabled.

This function returns TRUE if mode_set indicates that preemption is enabled, and FALSE otherwise.

References RTEMS_PREEMPT_MASK, and RTEMS_PREEMPT.

RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( Modes_Control  mode_set)

Checks if mode_set indicates that timeslicing is enabled.

This function returns TRUE if mode_set indicates that timeslicing is enabled, and FALSE otherwise.

References RTEMS_TIMESLICE_MASK, and RTEMS_TIMESLICE.

RTEMS_INLINE_ROUTINE bool _Modes_Mask_changed ( Modes_Control  mode_set,
Modes_Control  masks 
)

Checks if any of the mode flags in mask are set in mode_set.

This function returns TRUE if any of the mode flags in mask are set in mode_set, and FALSE otherwise.

RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control  mode_set)

Sets the current interrupt level to that specified in the mode_set.

This routine sets the current interrupt level to that specified in the mode_set.

References _ISR_Set_level, and _Modes_Get_interrupt_level().

Modes_Control rtems_interrupt_level_body ( uint32_t  level)

Body for RTEMS_INTERRUPT_LEVEL Macro.

Parameters:
[in]levelis the desired interrupt level
Return values:
Thismethods returns a mode with the desired interrupt level in the proper bitfield location.
Note:
This variable is used by bindings from languages other than C and C++.

Variable Documentation

const uint32_t rtems_interrupt_mask

Interrupt Mask Variable.

This variable is used by bindings from languages other than C and C++.