From 33e250c9fa370f620ddbc5850342d5a90b123524 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 27 May 2016 15:41:41 +0200 Subject: score: Rework CORE priority ceiling mutex Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines. --- cpukit/score/src/coremutexsurrender.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'cpukit/score/src/coremutexsurrender.c') 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; } -- cgit v1.2.3