From 93306058c0417b1c6e950b44ef279e096062dfba Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 27 May 2016 14:43:19 +0200 Subject: score: _CORE_mutex_Check_dispatch_for_seize() Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical(). --- cpukit/posix/include/rtems/posix/psignalimpl.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'cpukit/posix/include') diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h index 3b76fc3809..62c1a8546c 100644 --- a/cpukit/posix/include/rtems/posix/psignalimpl.h +++ b/cpukit/posix/include/rtems/posix/psignalimpl.h @@ -73,11 +73,25 @@ extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ]; * Internal routines */ -#define _POSIX_signals_Acquire( lock_context ) \ - _Thread_queue_Acquire( &_POSIX_signals_Wait_queue, lock_context ) - -#define _POSIX_signals_Release( lock_context ) \ - _Thread_queue_Release( &_POSIX_signals_Wait_queue, lock_context ) +RTEMS_INLINE_ROUTINE void _POSIX_signals_Acquire( + Thread_queue_Context *queue_context +) +{ + _Thread_queue_Acquire( + &_POSIX_signals_Wait_queue, + &queue_context->Lock_context + ); +} + +RTEMS_INLINE_ROUTINE void _POSIX_signals_Release( + Thread_queue_Context *queue_context +) +{ + _Thread_queue_Release( + &_POSIX_signals_Wait_queue, + &queue_context->Lock_context + ); +} /** * @brief Unlock POSIX signals thread. -- cgit v1.2.3