From db3a3decbd387a5f9bbac7089caa479c75589b74 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 10 Oct 2017 10:03:48 +0200 Subject: score: Add _Thread_queue_Dispatch_disable() --- cpukit/score/include/rtems/score/coremuteximpl.h | 4 +--- cpukit/score/include/rtems/score/mrspimpl.h | 4 +--- cpukit/score/include/rtems/score/threadqimpl.h | 10 ++++++++++ 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'cpukit/score/include/rtems') diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index e524539419..78fafca6e1 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -305,9 +305,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Set_owner( ); _Thread_Wait_release_default_critical( owner, &lock_context ); - cpu_self = _Thread_Dispatch_disable_critical( - &queue_context->Lock_context.Lock_context - ); + cpu_self = _Thread_queue_Dispatch_disable( queue_context ); _CORE_mutex_Release( &the_mutex->Recursive.Mutex, queue_context ); _Thread_Priority_update( queue_context ); _Thread_Dispatch_enable( cpu_self ); diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index b9514160dc..b9c7441401 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -179,9 +179,7 @@ RTEMS_INLINE_ROUTINE Status_Control _MRSP_Claim_ownership( } _MRSP_Set_owner( mrsp, executing ); - cpu_self = _Thread_Dispatch_disable_critical( - &queue_context->Lock_context.Lock_context - ); + cpu_self = _Thread_queue_Dispatch_disable( queue_context ); _MRSP_Release( mrsp, queue_context ); _Thread_Priority_and_sticky_update( executing, 1 ); _Thread_Dispatch_enable( cpu_self ); diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h index c4a22a5def..60067076c7 100644 --- a/cpukit/score/include/rtems/score/threadqimpl.h +++ b/cpukit/score/include/rtems/score/threadqimpl.h @@ -26,6 +26,7 @@ #include #include #include +#include #if defined(RTEMS_DEBUG) #include @@ -277,6 +278,15 @@ RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_ISR_level( ); } +RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_queue_Dispatch_disable( + Thread_queue_Context *queue_context +) +{ + return _Thread_Dispatch_disable_critical( + &queue_context->Lock_context.Lock_context + ); +} + /** * @brief Sets the MP callout in the thread queue context. * -- cgit v1.2.3