diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-27 15:41:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-30 16:16:23 +0200 |
commit | 33e250c9fa370f620ddbc5850342d5a90b123524 (patch) | |
tree | a2f4082a58231054f084e9a77aa0af4e3111662d /cpukit/score/src/coremutexsurrender.c | |
parent | score: Add CORE mutex variants (diff) | |
download | rtems-33e250c9fa370f620ddbc5850342d5a90b123524.tar.bz2 |
score: Rework CORE priority ceiling mutex
Rework seize and surrender methods to use CORE_ceiling_mutex_Control.
This eliminates CORE_mutex_Disciplines.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c index 2d976e0c22..5075e204c9 100644 --- a/cpukit/score/src/coremutexsurrender.c +++ b/cpukit/score/src/coremutexsurrender.c @@ -118,19 +118,8 @@ Status_Control _CORE_mutex_Surrender( if ( _Objects_Is_local_id( the_thread->Object.id ) ) #endif { - switch ( the_mutex->Attributes.discipline ) { - case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: - the_thread->resource_count++; - _Thread_queue_Boost_priority( &the_mutex->Wait_queue.Queue, the_thread ); - break; - case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: - the_thread->resource_count++; - _Thread_Raise_priority( - the_thread, - the_mutex->Attributes.priority_ceiling - ); - break; - } + the_thread->resource_count++; + _Thread_queue_Boost_priority( &the_mutex->Wait_queue.Queue, the_thread ); } _Thread_queue_Unblock_critical( @@ -164,5 +153,6 @@ Status_Control _CORE_mutex_Surrender( } } + _CORE_mutex_Restore_priority( holder ); return STATUS_SUCCESSFUL; } |