diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-10 14:11:12 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-24 11:10:49 +0100 |
commit | 36615183d642a8adb2f59ffcc38d7bf08e5dcb2a (patch) | |
tree | f2f43817f2fe5a79b50870586cb7a136e0449574 /cpukit/score/src/smp.c | |
parent | validation: Test support functions (diff) | |
download | rtems-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.c | 5 |
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(); } |