source: rtems/cpukit/score/include/rtems/score/sysstate.h @ ecf9858

4.11
Last change on this file since ecf9858 was ecf9858, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 7, 2012 at 11:33:48 AM

score: Move global variables definition

Define _System_state_Current and _Internal_errors_What_happened in
interr.c to make _Internal_error_Occurred() more independent.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreSysState
5 *
6 * @brief System State Handler API.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#ifndef _RTEMS_SCORE_SYSSTATE_H
19#define _RTEMS_SCORE_SYSSTATE_H
20
21#include <rtems/score/basedefs.h> /* SCORE_EXTERN */
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup ScoreSysState System State Handler
29 *
30 * @ingroup Score
31 *
32 * @brief Management of the internal system state of RTEMS.
33 *
34 * @{
35 */
36
37/**
38 * @brief System states.
39 */
40typedef enum {
41  /**
42   * @brief The system is before the end of the first phase of initialization.
43   */
44  SYSTEM_STATE_BEFORE_INITIALIZATION,
45
46  /**
47   * @brief The system is between end of the first phase of initialization but
48   * before  multitasking is started.
49   */
50  SYSTEM_STATE_BEFORE_MULTITASKING,
51
52  /**
53   * @brief The system is attempting to initiate multitasking.
54   */
55  SYSTEM_STATE_BEGIN_MULTITASKING,
56
57  /**
58   * @brief The system is up and operating normally.
59   */
60  SYSTEM_STATE_UP,
61
62  /**
63   * @brief The system is in the midst of a shutdown.
64   */
65  SYSTEM_STATE_SHUTDOWN,
66
67  /**
68   * @brief A fatal error has occurred.
69   */
70  SYSTEM_STATE_FAILED
71} System_state_Codes;
72
73#define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION
74
75#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED
76
77#if defined(RTEMS_MULTIPROCESSING)
78SCORE_EXTERN bool _System_state_Is_multiprocessing;
79#endif
80
81extern System_state_Codes _System_state_Current;
82
83/*
84 *  Make it possible for the application to get the system state information.
85 */
86
87#include <rtems/score/sysstate.inl>
88
89/** @} */
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif
96/* end of include file */
Note: See TracBrowser for help on using the repository browser.