diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-11 08:44:29 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-23 11:00:28 +0100 |
commit | 546846472a5dadc7b3038b7c56da695f6dbbd1a6 (patch) | |
tree | 064b790fd0ab99efbff045f325fdc012015ac72a /cpukit/score | |
parent | score: _Thread_queue_Surrender_no_priority() (diff) | |
download | rtems-546846472a5dadc7b3038b7c56da695f6dbbd1a6.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/threadrestart.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 ); |