summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/smp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-03-10 14:11:12 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-03-24 11:10:49 +0100
commit36615183d642a8adb2f59ffcc38d7bf08e5dcb2a (patch)
treef2f43817f2fe5a79b50870586cb7a136e0449574 /cpukit/score/src/smp.c
parentvalidation: Test support functions (diff)
downloadrtems-36615183d642a8adb2f59ffcc38d7bf08e5dcb2a.tar.bz2
smp: Add fatal error
Add SMP-specifc SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR fatal error. This fatal error helps to diagnose a broken SMP startup sequence. Without this error a context switch using the NULL pointer for the thread control block happens which may be difficult to debug.
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/smp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index 0dc8830c46..7c068f3c51 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -269,6 +269,11 @@ void _SMP_Start_multitasking_on_secondary_processor(
_Per_CPU_Set_state( cpu_self, PER_CPU_STATE_READY_TO_START_MULTITASKING );
_SMP_Wait_for_start_multitasking( cpu_self );
+
+ if ( !_Per_CPU_Is_processor_online( cpu_self ) ) {
+ _SMP_Fatal( SMP_FATAL_MULTITASKING_START_ON_NOT_ONLINE_PROCESSOR );
+ }
+
_Thread_Start_multitasking();
}