From 546846472a5dadc7b3038b7c56da695f6dbbd1a6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 11 Nov 2021 08:44:29 +0100 Subject: score: Properly continue the thread during restart The _Thread_queue_Extract() does not deal with potential priority updates and the SMP locking protocol handling. Use _Thread_queue_Continue(). For the POSIX signals processing this is currently probably unnecessary, however, the use case is similar to the restart so use the same appoach. Close #4546. --- cpukit/score/src/threadrestart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index d469705d2c..90573dab07 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -137,7 +137,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread ) _Objects_Close( &information->Objects, &the_thread->Object ); _Thread_Set_state( the_thread, STATES_ZOMBIE ); - _Thread_Timer_remove_and_continue( the_thread ); + _Thread_Timer_remove_and_continue( the_thread, STATUS_INTERNAL_ERROR ); /* * Add the thread to the thread zombie chain before we wake up joining @@ -357,7 +357,7 @@ static void _Thread_Remove_life_change_request( Thread_Control *the_thread ) * Do not remove states used for thread queues to avoid race conditions on * SMP configurations. We could interrupt an extract operation on another * processor disregarding the thread wait flags. Rely on - * _Thread_queue_Extract() for removal of these states. + * _Thread_Continue() for removal of these states. */ _Thread_Clear_state_locked( the_thread, @@ -408,7 +408,7 @@ static void _Thread_Try_life_change_request( _Thread_Add_life_change_request( the_thread ); _Thread_State_release( the_thread, lock_context ); - _Thread_Timer_remove_and_continue( the_thread ); + _Thread_Timer_remove_and_continue( the_thread, STATUS_INTERNAL_ERROR ); _Thread_Remove_life_change_request( the_thread ); } else { _Thread_Clear_state_locked( the_thread, STATES_SUSPENDED ); -- cgit v1.2.3