summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-22 13:17:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-08 09:55:26 +0200
commit114e40880bb56186d06fc81da29a889d9f2171a5 (patch)
tree65e8f132b4ebc8f9e5fa7668c9a6de9e26a33088 /cpukit/score/include/rtems/score/threadimpl.h
parentscore: Fix warning (diff)
downloadrtems-114e40880bb56186d06fc81da29a889d9f2171a5.tar.bz2
score: Simplify thread queue acquire/release
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h10
1 files changed, 6 insertions, 4 deletions
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)