blob: 8d4a8e313ecf4ec4e297dce5e50737feb87bcfea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/**
* @file rtems/score/sysstate.h
*
* This include file contains information regarding the system state.
*/
/*
* COPYRIGHT (c) 1989-2006.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_SCORE_SYSSTATE_H
#define _RTEMS_SCORE_SYSSTATE_H
/**
* @defgroup ScoreSysState System State Handler
*
* This handler encapsulates functionality related to the management of the
* internal system state of RTEMS.
*/
/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
/* types */
/* enumerated constants */
/**
* The following type defines the possible system states.
*/
typedef enum {
/** This indicates that the system state is between the start
* of rtems_initialize_executive_early and the end of the first
* phase of initialization.
*/
SYSTEM_STATE_BEFORE_INITIALIZATION,
/** This indicates that the system state is between end of the first
* phase of initializatin but before multitasking is started.
*/
SYSTEM_STATE_BEFORE_MULTITASKING,
/** This indicates that the system state is attempting to initiate
* multitasking.
*/
SYSTEM_STATE_BEGIN_MULTITASKING,
/** This indicates that the system is up and operating normally. */
SYSTEM_STATE_UP,
/** This indicates that the system is in the midst of a shutdown. */
SYSTEM_STATE_SHUTDOWN,
/** This indicates that a fatal error has occurred. */
SYSTEM_STATE_FAILED
} System_state_Codes;
/** This defines the first system state. */
#define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION
/** This defines the highest value system state. */
#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED
#if defined(RTEMS_MULTIPROCESSING)
/**
* The following variable indicates whether or not this is
* an multiprocessing system.
*/
SCORE_EXTERN bool _System_state_Is_multiprocessing;
#endif
/**
* The following variable contains the current system state.
*/
SCORE_EXTERN System_state_Codes _System_state_Current;
/*
* Make it possible for the application to get the system state information.
*/
#include <rtems/score/sysstate.inl>
#ifdef __cplusplus
}
#endif
/**@}*/
#endif
/* end of include file */
|