diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/sapi/src/exshutdown.c | 9 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/interr.h | 3 |
3 files changed, 16 insertions, 2 deletions
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 <joel.sherrill@oarcorp.com> + + 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 <bharath.s.jois@gmail.com> 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 <rtems/system.h> #include <rtems/score/sysstate.h> #include <rtems/score/thread.h> +#include <rtems/score/interr.h> /* * 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; |