1 | /* sysstates.h |
---|
2 | * |
---|
3 | * This include file contains information regarding the system state. |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-1998. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * Copyright assigned to U.S. Government, 1994. |
---|
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$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __RTEMS_SYSTEM_STATE_h |
---|
17 | #define __RTEMS_SYSTEM_STATE_h |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | /* types */ |
---|
24 | |
---|
25 | /* enumerated constants */ |
---|
26 | |
---|
27 | /* |
---|
28 | * The following type defines the possible system states. |
---|
29 | */ |
---|
30 | |
---|
31 | typedef enum { |
---|
32 | SYSTEM_STATE_BEFORE_INITIALIZATION, /* start -> end of 1st init part */ |
---|
33 | SYSTEM_STATE_BEFORE_MULTITASKING, /* end of 1st -> beginning of 2nd */ |
---|
34 | SYSTEM_STATE_BEGIN_MULTITASKING, /* just before multitasking starts */ |
---|
35 | SYSTEM_STATE_UP, /* normal operation */ |
---|
36 | SYSTEM_STATE_SHUTDOWN, /* shutdown */ |
---|
37 | SYSTEM_STATE_FAILED /* fatal error occurred */ |
---|
38 | } System_state_Codes; |
---|
39 | |
---|
40 | #define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION |
---|
41 | #define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED |
---|
42 | |
---|
43 | /* |
---|
44 | * The following variable indicates whether or not this is |
---|
45 | * an multiprocessing system. |
---|
46 | */ |
---|
47 | |
---|
48 | SCORE_EXTERN boolean _System_state_Is_multiprocessing; |
---|
49 | |
---|
50 | /* |
---|
51 | * The following variable contains the current system state. |
---|
52 | */ |
---|
53 | |
---|
54 | SCORE_EXTERN System_state_Codes _System_state_Current; |
---|
55 | |
---|
56 | /* |
---|
57 | * Make it possible for the application to get the system state information. |
---|
58 | */ |
---|
59 | |
---|
60 | #include <rtems/score/sysstate.inl> |
---|
61 | |
---|
62 | #ifdef __cplusplus |
---|
63 | } |
---|
64 | #endif |
---|
65 | |
---|
66 | #endif |
---|
67 | /* end of include file */ |
---|