RTEMS  5.0.0
isrlevel.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2011.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_SCORE_ISR_LEVEL_h
20 #define _RTEMS_SCORE_ISR_LEVEL_h
21 
22 #include <rtems/score/cpu.h>
23 #include <rtems/score/assert.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
38 typedef uint32_t ISR_Level;
39 
54 #define _ISR_Local_disable( _level ) \
55  do { \
56  _CPU_ISR_Disable( _level ); \
57  RTEMS_COMPILER_MEMORY_BARRIER(); \
58  } while (0)
59 
71 #define _ISR_Local_enable( _level ) \
72  do { \
73  RTEMS_COMPILER_MEMORY_BARRIER(); \
74  _CPU_ISR_Enable( _level ); \
75  } while (0)
76 
96 #define _ISR_Local_flash( _level ) \
97  do { \
98  RTEMS_COMPILER_MEMORY_BARRIER(); \
99  _CPU_ISR_Flash( _level ); \
100  RTEMS_COMPILER_MEMORY_BARRIER(); \
101  } while (0)
102 
112 #define _ISR_Is_enabled( _level ) \
113  _CPU_ISR_Is_enabled( _level )
114 
125 #define _ISR_Get_level() \
126  _CPU_ISR_Get_level()
127 
137 #define _ISR_Set_level( _new_level ) \
138  do { \
139  RTEMS_COMPILER_MEMORY_BARRIER(); \
140  _CPU_ISR_Set_level( _new_level ); \
141  RTEMS_COMPILER_MEMORY_BARRIER(); \
142  } while (0)
143 
146 #ifdef __cplusplus
147 }
148 #endif
149 #endif
uint32_t ISR_Level
Definition: isrlevel.h:38