summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/interr.c4
-rw-r--r--cpukit/score/src/smp.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c
index 526023f5ba..8740027617 100644
--- a/cpukit/score/src/interr.c
+++ b/cpukit/score/src/interr.c
@@ -33,8 +33,6 @@ void _Terminate(
Internal_errors_t the_error
)
{
- _SMP_Request_shutdown();
-
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
@@ -43,6 +41,8 @@ void _Terminate(
_System_state_Set( SYSTEM_STATE_TERMINATED );
+ _SMP_Request_shutdown();
+
_CPU_Fatal_halt( the_source, the_error );
/* will not return from this routine */
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index d6aad85e76..b8d9cb6e26 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -158,9 +158,12 @@ void _SMP_Start_multitasking_on_secondary_processor( void )
void _SMP_Request_shutdown( void )
{
- Per_CPU_Control *self_cpu = _Per_CPU_Get();
+ ISR_Level level;
+
+ _ISR_Local_disable( level );
+ (void) level;
- _Per_CPU_State_change( self_cpu, PER_CPU_STATE_SHUTDOWN );
+ _Per_CPU_State_change( _Per_CPU_Get(), PER_CPU_STATE_SHUTDOWN );
}
void _SMP_Send_message( uint32_t cpu_index, unsigned long message )