source: rtems/c/src/exec/rtems/inline/rtems/rtems/modes.inl @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[ac7d5ef0]1/*  modes.inl
2 *
3 *  This include file contains the static inline implementation of the
4 *  inlined routines in the Mode Handler
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __MODES_inl
18#define __MODES_inl
19
20/*PAGE
21 *
22 *  RTEMS_INTERRUPT_LEVEL
23 */
24
25STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL (
[7f6a24ab]26  Modes_Control mode_set
[ac7d5ef0]27)
28{
29  return mode_set & RTEMS_INTERRUPT_MASK;
30}
31
32/*PAGE
33 *
34 *  _Modes_Mask_changed
35 *
36 */
37
38STATIC INLINE boolean _Modes_Mask_changed (
[7f6a24ab]39  Modes_Control mode_set,
40  Modes_Control masks
[ac7d5ef0]41)
42{
43   return ( mode_set & masks );
44}
45
46/*PAGE
47 *
48 *  _Modes_Is_asr_disabled
49 *
50 */
51
52STATIC INLINE boolean _Modes_Is_asr_disabled (
[7f6a24ab]53  Modes_Control mode_set
[ac7d5ef0]54)
55{
[3a4ae6c]56   return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
[ac7d5ef0]57}
58
59/*PAGE
60 *
61 *  _Modes_Is_preempt
62 *
63 */
64
65STATIC INLINE boolean _Modes_Is_preempt (
[7f6a24ab]66  Modes_Control mode_set
[ac7d5ef0]67)
68{
[3a4ae6c]69   return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
[ac7d5ef0]70}
71
72/*PAGE
73 *
74 *  _Modes_Is_timeslice
75 *
76 */
77
78STATIC INLINE boolean _Modes_Is_timeslice (
[7f6a24ab]79  Modes_Control mode_set
[ac7d5ef0]80)
81{
[3a4ae6c]82  return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE;
[ac7d5ef0]83}
84
85/*PAGE
86 *
87 *  _Modes_Get_interrupt_level
88 *
89 */
90
91STATIC INLINE ISR_Level _Modes_Get_interrupt_level (
[7f6a24ab]92  Modes_Control mode_set
[ac7d5ef0]93)
94{
95  return ( mode_set & RTEMS_INTERRUPT_MASK );
96}
97
98/*PAGE
99 *
100 *  _Modes_Set_interrupt_level
101 *
102 */
103
104STATIC INLINE void _Modes_Set_interrupt_level (
[7f6a24ab]105  Modes_Control mode_set
[ac7d5ef0]106)
107{
108  _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
109}
110
111/*PAGE
112 *
113 *  _Modes_Change
114 *
115 */
116
117STATIC INLINE void _Modes_Change (
[7f6a24ab]118  Modes_Control  old_mode_set,
119  Modes_Control  new_mode_set,
120  Modes_Control  mask,
121  Modes_Control *out_mode_set,
122  Modes_Control *changed
[ac7d5ef0]123)
124{
[7f6a24ab]125  Modes_Control _out_mode;
[ac7d5ef0]126
127  _out_mode      =  old_mode_set;
128  _out_mode     &= ~mask;
129  _out_mode     |= new_mode_set & mask;
130  *changed       = _out_mode ^ old_mode_set;
131  *out_mode_set  = _out_mode;
132}
133
134#endif
135/* end of include file */
Note: See TracBrowser for help on using the repository browser.