From fef3ea9e87c01f7720a54d966f7c10fb85deea23 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 11 Aug 2016 08:32:49 +0200 Subject: score: Add _Thread_queue_Surrender() Add _Thread_queue_Surrender() to unify the mutex surrender procedures which involve a thread queue operation. --- cpukit/score/include/rtems/score/coremuteximpl.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'cpukit/score/include/rtems/score/coremuteximpl.h') diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index f48524a7b6..ce53b23bc7 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -114,14 +114,6 @@ Status_Control _CORE_mutex_Seize_no_protocol_slow( Thread_queue_Context *queue_context ); -Status_Control _CORE_mutex_Surrender_slow( - CORE_mutex_Control *the_mutex, - Thread_Control *executing, - Thread_queue_Heads *heads, - bool keep_priority, - Thread_queue_Context *queue_context -); - RTEMS_INLINE_ROUTINE void _CORE_mutex_Set_owner( CORE_mutex_Control *the_mutex, Thread_Control *owner @@ -262,13 +254,15 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Surrender( return STATUS_SUCCESSFUL; } - return _CORE_mutex_Surrender_slow( - &the_mutex->Mutex, - executing, + _Thread_queue_Surrender( + &the_mutex->Mutex.Wait_queue.Queue, + CORE_MUTEX_TQ_PRIORITY_INHERIT_OPERATIONS, heads, + executing, keep_priority, queue_context ); + return STATUS_SUCCESSFUL; } RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Seize_no_protocol( -- cgit v1.2.3