source: rtems/cpukit/score/inline/rtems/score/sysstate.inl @ 1a8fde6c

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*  sysstates.inl
2 *
3 *  This file contains the inline implementation of routines regarding the
4 *  system state.
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 __SYSTEM_STATE_inl
18#define __SYSTEM_STATE_inl
19
20/*PAGE
21 *
22 *  _System_state_Handler_initialization
23 *
24 *  DESCRIPTION:
25 *
26 *  This routine initializes the system state handler.
27 */
28 
29STATIC INLINE void _System_state_Handler_initialization (
30  boolean  is_multiprocessing
31)
32{
33  _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
34  _System_state_Is_multiprocessing = is_multiprocessing;
35}
36 
37/*PAGE
38 *
39 *  _System_state_Set
40 *
41 *  DESCRIPTION:
42 *
43 *  This routine sets the current system state to that specified by
44 *  the called.
45 */
46
47STATIC INLINE void _System_state_Set (
48  System_state_Codes state
49)
50{
51  _System_state_Current = state;
52}
53
54/*PAGE
55 *
56 *  _System_state_Get
57 *
58 *  DESCRIPTION:
59 *
60 *  This function returns the current system state.
61 */
62
63STATIC INLINE System_state_Codes _System_state_Get ( void )
64{
65  return _System_state_Current;
66}
67
68/*PAGE
69 *
70 *  _System_state_Is_before_initialization
71 *
72 *  DESCRIPTION:
73 *
74 *  This function returns TRUE if the state is equal to the
75 *  "before initialization" state, and FALSE otherwise.
76 */
77
78STATIC INLINE boolean _System_state_Is_before_initialization (
79  System_state_Codes state
80)
81{
82  return (state == SYSTEM_STATE_BEFORE_INITIALIZATION);
83}
84
85/*PAGE
86 *
87 *  _System_state_Is_before_multitasking
88 *
89 *  DESCRIPTION:
90 *
91 *  This function returns TRUE if the state is equal to the
92 *  "before multitasking" state, and FALSE otherwise.
93 */
94
95STATIC INLINE boolean _System_state_Is_before_multitasking (
96  System_state_Codes state
97)
98{
99  return (state == SYSTEM_STATE_BEFORE_MULTITASKING);
100}
101
102/*PAGE
103 *
104 *  _System_state_Is_begin_multitasking
105 *
106 *  DESCRIPTION:
107 *
108 *  This function returns TRUE if the state is equal to the
109 *  "begin multitasking" state, and FALSE otherwise.
110 */
111
112STATIC INLINE boolean _System_state_Is_begin_multitasking (
113  System_state_Codes state
114)
115{
116  return (state == SYSTEM_STATE_BEGIN_MULTITASKING);
117}
118
119/*PAGE
120 *
121 *  _System_state_Is_up
122 *
123 *  DESCRIPTION:
124 *
125 *  This function returns TRUE if the state is equal to the
126 *  "up" state, and FALSE otherwise.
127 */
128
129STATIC INLINE boolean _System_state_Is_up (
130  System_state_Codes state
131)
132{
133  return (state == SYSTEM_STATE_UP);
134}
135
136/*PAGE
137 *
138 *  _System_state_Is_failed
139 *
140 *  DESCRIPTION:
141 *
142 *  This function returns TRUE if the state is equal to the
143 *  "failed" state, and FALSE otherwise.
144 */
145
146STATIC INLINE boolean _System_state_Is_failed (
147  System_state_Codes state
148)
149{
150  return (state == SYSTEM_STATE_FAILED);
151}
152
153#endif
154/* end of include file */
Note: See TracBrowser for help on using the repository browser.