RTEMS
modes.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/mode/if/header */
52 
53 #ifndef _RTEMS_RTEMS_MODES_H
54 #define _RTEMS_RTEMS_MODES_H
55 
56 #include <stdint.h>
57 #include <rtems/score/cpu.h>
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /* Generated from spec:/rtems/mode/if/group */
64 
73 /* Generated from spec:/rtems/mode/if/interrupt-mask */
74 
81 #define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
82 
83 /* Generated from spec:/rtems/mode/if/mode */
84 
90 typedef uint32_t rtems_mode;
91 
92 /* Generated from spec:/rtems/mode/if/all-mode-masks */
93 
99 #define RTEMS_ALL_MODE_MASKS 0x0000ffff
100 
101 /* Generated from spec:/rtems/mode/if/asr */
102 
109 #define RTEMS_ASR 0x00000000
110 
111 /* Generated from spec:/rtems/mode/if/asr-mask */
112 
118 #define RTEMS_ASR_MASK 0x00000400
119 
120 /* Generated from spec:/rtems/mode/if/current-mode */
121 
128 #define RTEMS_CURRENT_MODE 0
129 
130 /* Generated from spec:/rtems/mode/if/default */
131 
137 #define RTEMS_DEFAULT_MODES 0x00000000
138 
139 /* Generated from spec:/rtems/mode/if/interrupt-level */
140 
154 #define RTEMS_INTERRUPT_LEVEL( _interrupt_level ) \
155  ( ( _interrupt_level ) & RTEMS_INTERRUPT_MASK )
156 
157 /* Generated from spec:/rtems/mode/if/interrupt-level-body */
158 
169 rtems_mode rtems_interrupt_level_body( uint32_t level );
170 
171 /* Generated from spec:/rtems/mode/if/interrupt-mask-constant */
172 
183 extern const uint32_t rtems_interrupt_mask;
184 
185 /* Generated from spec:/rtems/mode/if/no-asr */
186 
193 #define RTEMS_NO_ASR 0x00000400
194 
195 /* Generated from spec:/rtems/mode/if/no-preempt */
196 
202 #define RTEMS_NO_PREEMPT 0x00000100
203 
204 /* Generated from spec:/rtems/mode/if/no-timeslice */
205 
211 #define RTEMS_NO_TIMESLICE 0x00000000
212 
213 /* Generated from spec:/rtems/mode/if/preempt */
214 
220 #define RTEMS_PREEMPT 0x00000000
221 
222 /* Generated from spec:/rtems/mode/if/preempt-mask */
223 
230 #define RTEMS_PREEMPT_MASK 0x00000100
231 
232 /* Generated from spec:/rtems/mode/if/timeslice */
233 
239 #define RTEMS_TIMESLICE 0x00000200
240 
241 /* Generated from spec:/rtems/mode/if/timeslice-mask */
242 
249 #define RTEMS_TIMESLICE_MASK 0x00000200
250 
251 #ifdef __cplusplus
252 }
253 #endif
254 
255 #endif /* _RTEMS_RTEMS_MODES_H */
const uint32_t rtems_interrupt_mask
This task mode constant has the same value as RTEMS_INTERRUPT_MASK.
SPARC CPU Department Source.
uint32_t rtems_mode
This type is used to represent a task mode set.
Definition: modes.h:90
rtems_mode rtems_interrupt_level_body(uint32_t level)
Returns the return value of RTEMS_INTERRUPT_LEVEL() for the specified interrupt level.