RTEMS: Modes

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Macros | Typedefs | Functions | Variables
Modes
API » Classic

## Files
file | modes.h
file | modes.c
| Body for RTEMS_INTERRUPT_LEVEL Macro.

## Macros
#define | RTEMS_ALL_MODE_MASKS 0x0000ffff
#define | RTEMS_DEFAULT_MODES 0x00000000
#define | RTEMS_CURRENT_MODE 0
#define | RTEMS_TIMESLICE_MASK 0x00000200
#define | RTEMS_PREEMPT_MASK 0x00000100
#define | RTEMS_ASR_MASK 0x00000400
#define | RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
#define | RTEMS_PREEMPT 0x00000000
#define | RTEMS_NO_PREEMPT 0x00000100
#define | RTEMS_NO_TIMESLICE 0x00000000
#define | RTEMS_TIMESLICE 0x00000200
#define | RTEMS_ASR 0x00000000
#define | RTEMS_NO_ASR 0x00000400
#define | RTEMS_INTERRUPT_LEVEL(_mode_set) ( (_mode_set) & RTEMS_INTERRUPT_MASK )
| RTEMS_INTERRUPT_LEVEL.

## Typedefs
typedef uint32_t | rtems_mode

## Functions
rtems_mode | rtems_interrupt_level_body (uint32_t level)
| Body for RTEMS_INTERRUPT_LEVEL Macro.

## Variables
const uint32_t | rtems_interrupt_mask
| Interrupt Mask Variable.

## Detailed Description

This encapsulates functionality related to the task modes supported by the Classic API Task Manager.

## Macro Definition Documentation

## ◆ RTEMS_ALL_MODE_MASKS

#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.

## ◆ RTEMS_ASR

#define RTEMS_ASR 0x00000000

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

## ◆ RTEMS_ASR_MASK

#define RTEMS_ASR_MASK 0x00000400

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

## ◆ RTEMS_CURRENT_MODE

#define RTEMS_CURRENT_MODE 0

This mode constant is used when the user wishes to obtain their current execution mode.

## ◆ RTEMS_DEFAULT_MODES

#define RTEMS_DEFAULT_MODES 0x00000000

This mode constant is the default mode set.

## ◆ RTEMS_INTERRUPT_LEVEL

#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.

## ◆ RTEMS_INTERRUPT_MASK

#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK

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

## ◆ RTEMS_NO_ASR

#define RTEMS_NO_ASR 0x00000400

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

## ◆ RTEMS_NO_PREEMPT

#define RTEMS_NO_PREEMPT 0x00000100

This mode constant is used to indicate preemption is disabled.

## ◆ RTEMS_NO_TIMESLICE

#define RTEMS_NO_TIMESLICE 0x00000000

This mode constant is used to indicate timeslicing is disabled.

## ◆ RTEMS_PREEMPT

#define RTEMS_PREEMPT 0x00000000

This mode constant is used to indicate preemption is enabled.

## ◆ RTEMS_PREEMPT_MASK

#define RTEMS_PREEMPT_MASK 0x00000100

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

## ◆ RTEMS_TIMESLICE

#define RTEMS_TIMESLICE 0x00000200

This mode constant is used to indicate timeslicing is enabled.

## ◆ RTEMS_TIMESLICE_MASK

#define RTEMS_TIMESLICE_MASK 0x00000200

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

## Typedef Documentation

## ◆ rtems_mode

typedef uint32_t rtems_mode

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

## Function Documentation

## ◆ rtems_interrupt_level_body()

rtems_mode rtems_interrupt_level_body | ( | uint32_t | level | ) |

Body for RTEMS_INTERRUPT_LEVEL Macro.

Parameters

  [in] | level | is the desired interrupt level

Return values

  This | methods 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

## ◆ rtems_interrupt_mask

const uint32_t rtems_interrupt_mask
| extern

Interrupt Mask Variable.

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