RTEMS: cpukit/include/rtems/rtems/modes.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
modes.h
Go to the documentation of this file.
1
10/* COPYRIGHT (c) 1989-2013.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_RTEMS_MODES_H
19#define _RTEMS_RTEMS_MODES_H
20
21#include <rtems/score/cpu.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
41 typedef uint32_t rtems_mode;
42
47#define RTEMS_ALL_MODE_MASKS 0x0000ffff
48
52#define RTEMS_DEFAULT_MODES 0x00000000
53
58#define RTEMS_CURRENT_MODE 0
59
61#define RTEMS_TIMESLICE_MASK 0x00000200
62
64#define RTEMS_PREEMPT_MASK 0x00000100
65
67#define RTEMS_ASR_MASK 0x00000400
68
70#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK
71
73#define RTEMS_PREEMPT 0x00000000
75#define RTEMS_NO_PREEMPT 0x00000100
76
78#define RTEMS_NO_TIMESLICE 0x00000000
80#define RTEMS_TIMESLICE 0x00000200
81
83#define RTEMS_ASR 0x00000000
85#define RTEMS_NO_ASR 0x00000400
86
97#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \
98 ( (_mode_set) & RTEMS_INTERRUPT_MASK )
99
105extern const uint32_t rtems_interrupt_mask;
106
118 rtems_mode rtems_interrupt_level_body(
119 uint32_t level
120);
121
124#ifdef __cplusplus
125}
126#endif
127
128#endif
129/* end of include file */
rtems_interrupt_level_body
rtems_mode rtems_interrupt_level_body(uint32_t level)
Body for RTEMS_INTERRUPT_LEVEL Macro.
Definition: modes.c:28
rtems_interrupt_mask
const uint32_t rtems_interrupt_mask
Interrupt Mask Variable.
Definition: modes.c:26
rtems_mode
uint32_t rtems_mode
Definition: modes.h:41