RTEMS 6.1-rc6
Loading...
Searching...
No Matches
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 & Co. KG
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 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/mode/if/header */
55
56#ifndef _RTEMS_RTEMS_MODES_H
57#define _RTEMS_RTEMS_MODES_H
58
59#include <stdint.h>
60#include <rtems/score/cpu.h>
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/* Generated from spec:/rtems/mode/if/group */
67
76/* Generated from spec:/rtems/mode/if/all-mode-masks */
77
83#define RTEMS_ALL_MODE_MASKS 0x0000ffff
84
85/* Generated from spec:/rtems/mode/if/asr */
86
92#define RTEMS_ASR 0x00000000
93
94/* Generated from spec:/rtems/mode/if/asr-mask */
95
101#define RTEMS_ASR_MASK 0x00000400
102
103/* Generated from spec:/rtems/mode/if/current-mode */
104
111#define RTEMS_CURRENT_MODE 0
112
113/* Generated from spec:/rtems/mode/if/default */
114
120#define RTEMS_DEFAULT_MODES 0x00000000
121
122/* Generated from spec:/rtems/mode/if/interrupt-mask */
123
130#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
131
132/* Generated from spec:/rtems/mode/if/interrupt-level */
133
151#define RTEMS_INTERRUPT_LEVEL( _interrupt_level ) \
152 ( ( _interrupt_level ) & RTEMS_INTERRUPT_MASK )
153
154/* Generated from spec:/rtems/mode/if/interrupt-mask-constant */
155
165extern const uint32_t rtems_interrupt_mask;
166
167/* Generated from spec:/rtems/mode/if/mode */
168
174typedef uint32_t rtems_mode;
175
176/* Generated from spec:/rtems/mode/if/interrupt-level-body */
177
191rtems_mode rtems_interrupt_level_body( uint32_t level );
192
193/* Generated from spec:/rtems/mode/if/no-asr */
194
200#define RTEMS_NO_ASR 0x00000400
201
202/* Generated from spec:/rtems/mode/if/no-preempt */
203
209#define RTEMS_NO_PREEMPT 0x00000100
210
211/* Generated from spec:/rtems/mode/if/no-timeslice */
212
218#define RTEMS_NO_TIMESLICE 0x00000000
219
220/* Generated from spec:/rtems/mode/if/preempt */
221
227#define RTEMS_PREEMPT 0x00000000
228
229/* Generated from spec:/rtems/mode/if/preempt-mask */
230
237#define RTEMS_PREEMPT_MASK 0x00000100
238
239/* Generated from spec:/rtems/mode/if/timeslice */
240
246#define RTEMS_TIMESLICE 0x00000200
247
248/* Generated from spec:/rtems/mode/if/timeslice-mask */
249
256#define RTEMS_TIMESLICE_MASK 0x00000200
257
258#ifdef __cplusplus
259}
260#endif
261
262#endif /* _RTEMS_RTEMS_MODES_H */
rtems_mode rtems_interrupt_level_body(uint32_t level)
Maps the interrupt level to the associated processor-dependent task mode interrupt level.
Definition: modes.c:49
const uint32_t rtems_interrupt_mask
This task mode constant has the same value as RTEMS_INTERRUPT_MASK.
Definition: modes.c:47
uint32_t rtems_mode
This type represents a Classic API task mode set.
Definition: modes.h:174