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/posix/src/psignalunblockthread.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'cpukit/posix') 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 ); -- cgit v1.2.3