From 729981841961125c3dd1b00aa7449fd761518b01 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Aug 2010 22:56:35 +0000 Subject: 2010-08-10 Joel Sherrill PR 1658/cpukit * sapi/src/exshutdown.c, score/include/rtems/score/interr.h: If the system is not up, consider it a fatal error. --- cpukit/ChangeLog | 6 ++++++ cpukit/sapi/src/exshutdown.c | 9 ++++++++- cpukit/score/include/rtems/score/interr.h | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index b3475134db..9cad884747 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2010-08-10 Joel Sherrill + + PR 1658/cpukit + * sapi/src/exshutdown.c, score/include/rtems/score/interr.h: If the + system is not up, consider it a fatal error. + 2010-08-09 Bharath Suri PR 1662/filesystem diff --git a/cpukit/sapi/src/exshutdown.c b/cpukit/sapi/src/exshutdown.c index 1df2a4ba5a..5b0a5a1de1 100644 --- a/cpukit/sapi/src/exshutdown.c +++ b/cpukit/sapi/src/exshutdown.c @@ -18,6 +18,7 @@ #include #include #include +#include /* * rtems_shutdown_executive @@ -35,8 +36,14 @@ void rtems_shutdown_executive( uint32_t result ) { - if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { + if ( _System_state_Is_up( _System_state_Get() ) ) { _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } + _Internal_error_Occurred( + INTERNAL_ERROR_CORE, + true, + INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP + ); + } diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index c5ecaec579..d3ee532f4d 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -69,7 +69,8 @@ typedef enum { INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY, INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL, INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE, - INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 + INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0, + INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP } Internal_errors_Core_list; typedef uint32_t Internal_errors_t; -- cgit v1.2.3