[ac7d5ef0] | 1 | /* sysstates.h |
---|
| 2 | * |
---|
| 3 | * This include file contains information regarding the system state. |
---|
| 4 | * |
---|
[60b791ad] | 5 | * COPYRIGHT (c) 1989-1998. |
---|
[ac7d5ef0] | 6 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 7 | * Copyright assigned to U.S. Government, 1994. |
---|
[ac7d5ef0] | 8 | * |
---|
[98e4ebf5] | 9 | * The license and distribution terms for this file may be |
---|
| 10 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 11 | * http://www.OARcorp.com/rtems/license.html. |
---|
[ac7d5ef0] | 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 */ |
---|
[adf98bd] | 34 | SYSTEM_STATE_BEGIN_MULTITASKING, /* just before multitasking starts */ |
---|
[ac7d5ef0] | 35 | SYSTEM_STATE_UP, /* normal operation */ |
---|
[bbb846b] | 36 | SYSTEM_STATE_SHUTDOWN, /* shutdown */ |
---|
[ac7d5ef0] | 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 | |
---|
[3a4ae6c] | 43 | /* |
---|
| 44 | * The following variable indicates whether or not this is |
---|
| 45 | * an multiprocessing system. |
---|
| 46 | */ |
---|
| 47 | |
---|
[c627b2a3] | 48 | SCORE_EXTERN boolean _System_state_Is_multiprocessing; |
---|
[3a4ae6c] | 49 | |
---|
[ac7d5ef0] | 50 | /* |
---|
| 51 | * The following variable contains the current system state. |
---|
| 52 | */ |
---|
| 53 | |
---|
[c627b2a3] | 54 | SCORE_EXTERN System_state_Codes _System_state_Current; |
---|
[ac7d5ef0] | 55 | |
---|
[3a4ae6c] | 56 | /* |
---|
[1a8fde6c] | 57 | * Make it possible for the application to get the system state information. |
---|
[ac7d5ef0] | 58 | */ |
---|
| 59 | |
---|
[5e9b32b] | 60 | #include <rtems/score/sysstate.inl> |
---|
[ac7d5ef0] | 61 | |
---|
| 62 | #ifdef __cplusplus |
---|
| 63 | } |
---|
| 64 | #endif |
---|
| 65 | |
---|
| 66 | #endif |
---|
| 67 | /* end of include file */ |
---|