RTEMS CPU Kit with SuperCore  4.11.3
modes.h
Go to the documentation of this file.
1 
13 /* COPYRIGHT (c) 1989-2013.
14  * On-Line Applications Research Corporation (OAR).
15  *
16  * The license and distribution terms for this file may be
17  * found in the file LICENSE in this distribution or at
18  * http://www.rtems.org/license/LICENSE.
19  */
20 
21 #ifndef _RTEMS_RTEMS_MODES_H
22 #define _RTEMS_RTEMS_MODES_H
23 
24 #include <rtems/score/cpu.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
44 typedef uint32_t Modes_Control;
45 
50 #define RTEMS_ALL_MODE_MASKS 0x0000ffff
51 
55 #define RTEMS_DEFAULT_MODES 0x00000000
56 
61 #define RTEMS_CURRENT_MODE 0
62 
64 #define RTEMS_TIMESLICE_MASK 0x00000200
65 
67 #define RTEMS_PREEMPT_MASK 0x00000100
68 
70 #define RTEMS_ASR_MASK 0x00000400
71 
73 #define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
74 
76 #define RTEMS_PREEMPT 0x00000000
77 
78 #define RTEMS_NO_PREEMPT 0x00000100
79 
81 #define RTEMS_NO_TIMESLICE 0x00000000
82 
83 #define RTEMS_TIMESLICE 0x00000200
84 
86 #define RTEMS_ASR 0x00000000
87 
88 #define RTEMS_NO_ASR 0x00000400
89 
100 #define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
101  ( (_mode_set) & RTEMS_INTERRUPT_MASK )
102 
108 extern const uint32_t rtems_interrupt_mask;
109 
121 Modes_Control rtems_interrupt_level_body(
122  uint32_t level
123 );
124 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif
132 /* end of include file */
uint32_t Modes_Control
The following type defines the control block used to manage each a mode set.
Definition: modes.h:44
const uint32_t rtems_interrupt_mask
Interrupt Mask Variable.
Definition: modes.c:27
Modes_Control rtems_interrupt_level_body(uint32_t level)
Body for RTEMS_INTERRUPT_LEVEL Macro.
Definition: modes.c:29