OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [inline/] [rtems/] [score/] [sysstate.inl] - Blame information for rev 621

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  sysstates.inl
2
 *
3
 *  This file contains the inline implementation of routines regarding the
4
 *  system state.
5
 *
6
 *  COPYRIGHT (c) 1989-1999.
7
 *  On-Line Applications Research Corporation (OAR).
8
 *
9
 *  The license and distribution terms for this file may be
10
 *  found in the file LICENSE in this distribution or at
11
 *  http://www.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: sysstate.inl,v 1.2 2001-09-27 11:59:34 chris Exp $
14
 */
15
 
16
#ifndef __SYSTEM_STATE_inl
17
#define __SYSTEM_STATE_inl
18
 
19
/*PAGE
20
 *
21
 *  _System_state_Handler_initialization
22
 *
23
 *  DESCRIPTION:
24
 *
25
 *  This routine initializes the system state handler.
26
 */
27
 
28
RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
29
  boolean  is_multiprocessing
30
)
31
{
32
  _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
33
  _System_state_Is_multiprocessing = is_multiprocessing;
34
}
35
 
36
/*PAGE
37
 *
38
 *  _System_state_Set
39
 *
40
 *  DESCRIPTION:
41
 *
42
 *  This routine sets the current system state to that specified by
43
 *  the called.
44
 */
45
 
46
RTEMS_INLINE_ROUTINE void _System_state_Set (
47
  System_state_Codes state
48
)
49
{
50
  _System_state_Current = state;
51
}
52
 
53
/*PAGE
54
 *
55
 *  _System_state_Get
56
 *
57
 *  DESCRIPTION:
58
 *
59
 *  This function returns the current system state.
60
 */
61
 
62
RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get ( void )
63
{
64
  return _System_state_Current;
65
}
66
 
67
/*PAGE
68
 *
69
 *  _System_state_Is_before_initialization
70
 *
71
 *  DESCRIPTION:
72
 *
73
 *  This function returns TRUE if the state is equal to the
74
 *  "before initialization" state, and FALSE otherwise.
75
 */
76
 
77
RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_initialization (
78
  System_state_Codes state
79
)
80
{
81
  return (state == SYSTEM_STATE_BEFORE_INITIALIZATION);
82
}
83
 
84
/*PAGE
85
 *
86
 *  _System_state_Is_before_multitasking
87
 *
88
 *  DESCRIPTION:
89
 *
90
 *  This function returns TRUE if the state is equal to the
91
 *  "before multitasking" state, and FALSE otherwise.
92
 */
93
 
94
RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_multitasking (
95
  System_state_Codes state
96
)
97
{
98
  return (state == SYSTEM_STATE_BEFORE_MULTITASKING);
99
}
100
 
101
/*PAGE
102
 *
103
 *  _System_state_Is_begin_multitasking
104
 *
105
 *  DESCRIPTION:
106
 *
107
 *  This function returns TRUE if the state is equal to the
108
 *  "begin multitasking" state, and FALSE otherwise.
109
 */
110
 
111
RTEMS_INLINE_ROUTINE boolean _System_state_Is_begin_multitasking (
112
  System_state_Codes state
113
)
114
{
115
  return (state == SYSTEM_STATE_BEGIN_MULTITASKING);
116
}
117
 
118
/*PAGE
119
 *
120
 *  _System_state_Is_up
121
 *
122
 *  DESCRIPTION:
123
 *
124
 *  This function returns TRUE if the state is equal to the
125
 *  "up" state, and FALSE otherwise.
126
 */
127
 
128
RTEMS_INLINE_ROUTINE boolean _System_state_Is_up (
129
  System_state_Codes state
130
)
131
{
132
  return (state == SYSTEM_STATE_UP);
133
}
134
 
135
/*PAGE
136
 *
137
 *  _System_state_Is_failed
138
 *
139
 *  DESCRIPTION:
140
 *
141
 *  This function returns TRUE if the state is equal to the
142
 *  "failed" state, and FALSE otherwise.
143
 */
144
 
145
RTEMS_INLINE_ROUTINE boolean _System_state_Is_failed (
146
  System_state_Codes state
147
)
148
{
149
  return (state == SYSTEM_STATE_FAILED);
150
}
151
 
152
#endif
153
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.