From 114e40880bb56186d06fc81da29a889d9f2171a5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 22 Aug 2016 13:17:05 +0200 Subject: score: Simplify thread queue acquire/release --- cpukit/score/include/rtems/score/threadimpl.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpukit/score/include/rtems/score/threadimpl.h') diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 2e335396bb..72e0ba3655 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -368,7 +368,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_acquire_critical( ISR_lock_Context *lock_context ) { - _Thread_queue_Acquire_critical( &the_thread->Join_queue, lock_context ); + _Thread_queue_Do_acquire_critical( &the_thread->Join_queue, lock_context ); } RTEMS_INLINE_ROUTINE void _Thread_State_acquire( @@ -376,7 +376,8 @@ RTEMS_INLINE_ROUTINE void _Thread_State_acquire( ISR_lock_Context *lock_context ) { - _Thread_queue_Acquire( &the_thread->Join_queue, lock_context ); + _ISR_lock_ISR_disable( lock_context ); + _Thread_State_acquire_critical( the_thread, lock_context ); } RTEMS_INLINE_ROUTINE Thread_Control *_Thread_State_acquire_for_executing( @@ -397,7 +398,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_release_critical( ISR_lock_Context *lock_context ) { - _Thread_queue_Release_critical( &the_thread->Join_queue, lock_context ); + _Thread_queue_Do_release_critical( &the_thread->Join_queue, lock_context ); } RTEMS_INLINE_ROUTINE void _Thread_State_release( @@ -405,7 +406,8 @@ RTEMS_INLINE_ROUTINE void _Thread_State_release( ISR_lock_Context *lock_context ) { - _Thread_queue_Release( &the_thread->Join_queue, lock_context ); + _Thread_State_release_critical( the_thread, lock_context ); + _ISR_lock_ISR_enable( lock_context ); } #if defined(RTEMS_DEBUG) -- cgit v1.2.3