source: rtems/cpukit/score/include/rtems/score/sysstate.h @ 22ce0881

4.104.114.95
Last change on this file since 22ce0881 was 22ce0881, checked in by Joel Sherrill <joel.sherrill@…>, on 08/07/08 at 18:23:48

2008-08-07 Joel Sherrill <joel.sherrill@…>

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