diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-27 10:20:34 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-27 10:55:30 +0200 |
commit | ac8402ddd6e4a8eb6defb98220d39d4c20a6f025 (patch) | |
tree | 611996f2488f8b38180735dc9f51c1252bc024e5 /cpukit/score/src/coremutexsurrender.c | |
parent | score: Split _Thread_Change_priority() (diff) | |
download | rtems-ac8402ddd6e4a8eb6defb98220d39d4c20a6f025.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 14 |
1 files changed, 7 insertions, 7 deletions
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, |