From cbb1103a3ca9d2f42501ba373b5d559b981fb1c7 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 27 Jul 2021 13:40:51 +0200 Subject: score: Simplify SMP processor state handling The per-CPU states which control the SMP system initialization were added quite early during the SMP support development. Replace this initial implementation with a simplified one. There is no longer a global SMP lock required which serialized the state changes of all processors. The new implementation better integrates with the per-CPU jobs. --- cpukit/score/src/threadstartmultitasking.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/threadstartmultitasking.c') diff --git a/cpukit/score/src/threadstartmultitasking.c b/cpukit/score/src/threadstartmultitasking.c index 094a535394..9fa52a58ac 100644 --- a/cpukit/score/src/threadstartmultitasking.c +++ b/cpukit/score/src/threadstartmultitasking.c @@ -22,6 +22,7 @@ #include #include +#include void _Thread_Start_multitasking( void ) { @@ -29,7 +30,8 @@ void _Thread_Start_multitasking( void ) Thread_Control *heir; #if defined(RTEMS_SMP) - _Per_CPU_State_change( cpu_self, PER_CPU_STATE_UP ); + _Per_CPU_Set_state( cpu_self, PER_CPU_STATE_UP ); + _SMP_Try_to_process_message( cpu_self, SMP_MESSAGE_FORCE_PROCESSING ); /* * Threads begin execution in the _Thread_Handler() function. This -- cgit v1.2.3