source: rtems/cpukit/score/inline/rtems/score/sysstate.inl @ 98e4ebf5

4.104.114.84.95
Last change on this file since 98e4ebf5 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • 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-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
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 
29RTEMS_INLINE_ROUTINE 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
47RTEMS_INLINE_ROUTINE 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
63RTEMS_INLINE_ROUTINE 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
78RTEMS_INLINE_ROUTINE 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
95RTEMS_INLINE_ROUTINE 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
112RTEMS_INLINE_ROUTINE 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
129RTEMS_INLINE_ROUTINE 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
146RTEMS_INLINE_ROUTINE 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.