From 11b05f11d4d6d61717e345d20f492977b95ab131 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 May 2014 10:11:13 +0200 Subject: score: Fix CPU context usage on SMP We must not alter the is executing indicator in _CPU_Context_Initialize() since this would cause an invalid state during a self restart. The is executing indicator must be valid at creation time since otherwise _Thread_Kill_zombies() uses an undefined value for not started threads. This could result in a system life lock. --- cpukit/score/src/threadinitialize.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 1a03b0d320..2beaed4563 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -184,6 +184,7 @@ bool _Thread_Initialize( the_thread->is_scheduled = false; the_thread->is_in_the_air = false; the_thread->scheduler = scheduler; + _CPU_Context_Set_is_executing( &the_thread->Registers, false ); #endif _Thread_Debug_set_real_processor( the_thread, cpu ); -- cgit v1.2.3