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/posix/src/psignalunblockthread.c | |
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/posix/src/psignalunblockthread.c')
-rw-r--r-- | cpukit/posix/src/psignalunblockthread.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index 1133234554..36680f99a2 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -175,15 +175,6 @@ static bool _POSIX_signals_Unblock_thread_done( return status; } -static void _POSIX_signals_Interrupt_thread( Thread_Control *the_thread ) -{ -#if defined(RTEMS_MULTIPROCESSING) - _Thread_MP_Extract_proxy( the_thread ); -#endif - the_thread->Wait.return_code = STATUS_INTERRUPTED; - _Thread_queue_Extract( the_thread ); -} - bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, @@ -215,7 +206,7 @@ bool _POSIX_signals_Unblock_thread( *the_info = *info; } - _POSIX_signals_Interrupt_thread( the_thread ); + _Thread_Timer_remove_and_continue( the_thread, STATUS_INTERRUPTED ); return _POSIX_signals_Unblock_thread_done( the_thread, api, true ); } @@ -245,7 +236,7 @@ bool _POSIX_signals_Unblock_thread( */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { - _POSIX_signals_Interrupt_thread( the_thread ); + _Thread_Timer_remove_and_continue( the_thread, STATUS_INTERRUPTED ); } } return _POSIX_signals_Unblock_thread_done( the_thread, api, false ); |