summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-10 22:56:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-10 22:56:35 +0000
commit729981841961125c3dd1b00aa7449fd761518b01 (patch)
tree5fb6f5a81cc8c4ae05716cad21db5ba3f2d168e9 /cpukit/sapi
parent2010-08-10 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-729981841961125c3dd1b00aa7449fd761518b01.tar.bz2
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.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r--cpukit/sapi/src/exshutdown.c9
1 files changed, 8 insertions, 1 deletions
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
+ );
+
}