diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-17 09:47:12 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-19 09:59:38 +0100 |
commit | 92f50c3b2916d52c26d74fe1d61354d342e148af (patch) | |
tree | 6ba9fa06071d98ac169891decaaeba8ebf56c89b /cpukit | |
parent | powerpc: Change interrupt disable implemetation (diff) | |
download | rtems-92f50c3b2916d52c26d74fe1d61354d342e148af.tar.bz2 |
score: Add SYSTEM_STATE_TERMINATED
Merge systems states SYSTEM_STATE_SHUTDOWN and SYSTEM_STATE_FAILED into
new system state SYSTEM_STATE_TERMINATED. This reflects that all system
termination paths end up in _Internal_error_Occurred().
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/sapi/src/exshutdown.c | 1 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/interr.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/sysstate.h | 22 | ||||
-rw-r--r-- | cpukit/score/src/interr.c | 2 |
4 files changed, 7 insertions, 20 deletions
diff --git a/cpukit/sapi/src/exshutdown.c b/cpukit/sapi/src/exshutdown.c index 7a96869e27..44c5a09084 100644 --- a/cpukit/sapi/src/exshutdown.c +++ b/cpukit/sapi/src/exshutdown.c @@ -44,7 +44,6 @@ void rtems_shutdown_executive( #endif _Thread_Set_global_exit_status( result ); - _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); /******************************************************************* diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index 79edc21249..b774edcfc9 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -192,7 +192,7 @@ extern Internal_errors_Information _Internal_errors_What_happened; * * Once all fatal handler executed the error information will be stored to * _Internal_errors_What_happened and the system state is set to - * SYSTEM_STATE_FAILED. + * SYSTEM_STATE_TERMINATED. * * The final step is to call the CPU specific _CPU_Fatal_halt(). * diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h index 304b9529c3..4a50e163f8 100644 --- a/cpukit/score/include/rtems/score/sysstate.h +++ b/cpukit/score/include/rtems/score/sysstate.h @@ -54,19 +54,14 @@ typedef enum { SYSTEM_STATE_UP, /** - * @brief The system is in the midst of a shutdown. + * @brief The system reached its terminal state. */ - SYSTEM_STATE_SHUTDOWN, - - /** - * @brief A fatal error has occurred. - */ - SYSTEM_STATE_FAILED + SYSTEM_STATE_TERMINATED } System_state_Codes; #define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION -#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED +#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_TERMINATED #if defined(RTEMS_MULTIPROCESSING) SCORE_EXTERN bool _System_state_Is_multiprocessing; @@ -114,13 +109,6 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_before_multitasking ( return (state == SYSTEM_STATE_BEFORE_MULTITASKING); } -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 ) @@ -128,11 +116,11 @@ RTEMS_INLINE_ROUTINE bool _System_state_Is_up ( return (state == SYSTEM_STATE_UP); } -RTEMS_INLINE_ROUTINE bool _System_state_Is_failed ( +RTEMS_INLINE_ROUTINE bool _System_state_Is_terminated ( System_state_Codes state ) { - return (state == SYSTEM_STATE_FAILED); + return (state == SYSTEM_STATE_TERMINATED); } /** @} */ diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c index 1b895d6fac..f3a3127aa7 100644 --- a/cpukit/score/src/interr.c +++ b/cpukit/score/src/interr.c @@ -38,7 +38,7 @@ void _Internal_error_Occurred( _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; - _System_state_Set( SYSTEM_STATE_FAILED ); + _System_state_Set( SYSTEM_STATE_TERMINATED ); _CPU_Fatal_halt( the_error ); |