From ac8402ddd6e4a8eb6defb98220d39d4c20a6f025 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 27 Jun 2016 10:20:34 +0200 Subject: score: Simplify _Thread_queue_Boost_priority() Raise the priority under thread queue lock protection and omit the superfluous thread queue priority change, since the thread is extracted anyway. The unblock operation will pick up the new priority. Update #2412. Update #2556. Update #2765. --- cpukit/score/src/coremutexsurrender.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cpukit/score/src/coremutexsurrender.c') diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c index 6604be89da..aed17ab33b 100644 --- a/cpukit/score/src/coremutexsurrender.c +++ b/cpukit/score/src/coremutexsurrender.c @@ -38,13 +38,6 @@ Status_Control _CORE_mutex_Surrender_slow( _CORE_mutex_Set_owner( the_mutex, new_owner ); - unblock = _Thread_queue_Extract_locked( - &the_mutex->Wait_queue.Queue, - operations, - new_owner, - queue_context - ); - #if defined(RTEMS_MULTIPROCESSING) if ( _Objects_Is_local_id( new_owner->Object.id ) ) #endif @@ -53,6 +46,13 @@ Status_Control _CORE_mutex_Surrender_slow( _Thread_queue_Boost_priority( &the_mutex->Wait_queue.Queue, new_owner ); } + unblock = _Thread_queue_Extract_locked( + &the_mutex->Wait_queue.Queue, + operations, + new_owner, + queue_context + ); + _Thread_queue_Unblock_critical( unblock, &the_mutex->Wait_queue.Queue, -- cgit v1.2.3