summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-04 13:09:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-04 13:09:48 +0000
commit56e171066de897e3e8196b5e7479913b12ce2af6 (patch)
tree94887d97a946d9e4b6f86ccbd0f283bd05893aea /cpukit/score/inline
parentFix expat. (diff)
downloadrtems-56e171066de897e3e8196b5e7479913b12ce2af6.tar.bz2
2009-09-04 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* rtems/src/taskmode.c, sapi/src/exshutdown.c, score/include/rtems/score/sysstate.h, score/inline/rtems/score/sysstate.inl: Added _System_state_Is_shutdown(). Removed direct uses of _System_state_Current. Documentation.
Diffstat (limited to 'cpukit/score/inline')
-rw-r--r--cpukit/score/inline/rtems/score/sysstate.inl69
1 files changed, 20 insertions, 49 deletions
diff --git a/cpukit/score/inline/rtems/score/sysstate.inl b/cpukit/score/inline/rtems/score/sysstate.inl
index b237400871..f391badaf3 100644
--- a/cpukit/score/inline/rtems/score/sysstate.inl
+++ b/cpukit/score/inline/rtems/score/sysstate.inl
@@ -1,8 +1,9 @@
/**
- * @file rtems/score/sysstate.inl
+ * @file
*
- * This file contains the inline implementation of routines regarding the
- * system state.
+ * @ingroup ScoreSysState
+ *
+ * @brief System State Handler API.
*/
/*
@@ -24,13 +25,17 @@
#define _RTEMS_SCORE_SYSSTATE_INL
/**
- * @addtogroup ScoreSysState
- * @{
+ * @addtogroup ScoreSysState
+ *
+ * @{
*/
-/**
- * This routine initializes the system state handler.
- */
+RTEMS_INLINE_ROUTINE void _System_state_Set (
+ System_state_Codes state
+)
+{
+ _System_state_Current = state;
+}
RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
#if defined(RTEMS_MULTIPROCESSING)
@@ -40,38 +45,17 @@ RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
#endif
)
{
- _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
+ _System_state_Set( SYSTEM_STATE_BEFORE_INITIALIZATION );
#if defined(RTEMS_MULTIPROCESSING)
_System_state_Is_multiprocessing = is_multiprocessing;
#endif
}
-
-/**
- * This routine sets the current system state to that specified by
- * the called.
- */
-
-RTEMS_INLINE_ROUTINE void _System_state_Set (
- System_state_Codes state
-)
-{
- _System_state_Current = state;
-}
-
-/**
- * This function returns the current system state.
- */
RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get ( void )
{
return _System_state_Current;
}
-/**
- * This function returns true if the state is equal to the
- * "before initialization" state, and false otherwise.
- */
-
RTEMS_INLINE_ROUTINE bool _System_state_Is_before_initialization (
System_state_Codes state
)
@@ -79,11 +63,6 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_before_initialization (
return (state == SYSTEM_STATE_BEFORE_INITIALIZATION);
}
-/**
- * This function returns true if the state is equal to the
- * "before multitasking" state, and false otherwise.
- */
-
RTEMS_INLINE_ROUTINE bool _System_state_Is_before_multitasking (
System_state_Codes state
)
@@ -91,11 +70,6 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_before_multitasking (
return (state == SYSTEM_STATE_BEFORE_MULTITASKING);
}
-/**
- * This function returns true if the state is equal to the
- * "begin multitasking" state, and false otherwise.
- */
-
RTEMS_INLINE_ROUTINE bool _System_state_Is_begin_multitasking (
System_state_Codes state
)
@@ -103,10 +77,12 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_begin_multitasking (
return (state == SYSTEM_STATE_BEGIN_MULTITASKING);
}
-/**
- * This function returns true if the state is equal to the
- * "up" state, and false otherwise.
- */
+RTEMS_INLINE_ROUTINE bool _System_state_Is_shutdown (
+ System_state_Codes state
+)
+{
+ return (state == SYSTEM_STATE_SHUTDOWN);
+}
RTEMS_INLINE_ROUTINE bool _System_state_Is_up (
System_state_Codes state
@@ -115,11 +91,6 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_up (
return (state == SYSTEM_STATE_UP);
}
-/**
- * This function returns true if the state is equal to the
- * "failed" state, and false otherwise.
- */
-
RTEMS_INLINE_ROUTINE bool _System_state_Is_failed (
System_state_Codes state
)