[PATCH] score: Restore previous behavior for system state

Kinsey Moore kinsey.moore at oarcorp.com
Fri Jul 15 19:53:40 UTC 2022


Set system state before creating the idle threads. This fixes the
spextensions01 test since it expects this behavior.
---
 cpukit/score/src/threadcreateidle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index b5e0cfdc9b..dcd8ba0478 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -112,6 +112,8 @@ static void _Thread_Create_idle_for_CPU( Per_CPU_Control *cpu )
 
 void _Thread_Create_idle( void )
 {
+  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
+
 #if defined(RTEMS_SMP)
   uint32_t cpu_max;
   uint32_t cpu_index;
@@ -132,5 +134,4 @@ void _Thread_Create_idle( void )
   _CPU_Use_thread_local_storage(
     &_Per_CPU_Get_executing( _Per_CPU_Get() )->Registers
   );
-  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
 }
-- 
2.30.2



More information about the devel mailing list