summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexseize.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 10:27:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 10:28:52 +0200
commitbe6c4611ac258497ce948b502955bb440571bbcc (patch)
tree93518c0f13f8e29a1e26dc4a983fef1b392c0374 /cpukit/score/src/coremutexseize.c
parentscore: Delete Thread_queue_Control::state (diff)
downloadrtems-be6c4611ac258497ce948b502955bb440571bbcc.tar.bz2
score: _CORE_mutex_Seize_interrupt_blocking()
Move some code into _CORE_mutex_Seize_interrupt_blocking() so that the thread queue handling is in one place.
Diffstat (limited to 'cpukit/score/src/coremutexseize.c')
-rw-r--r--cpukit/score/src/coremutexseize.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index d49b566471..3fc3765ef4 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -49,9 +49,14 @@ void _CORE_mutex_Seize(
void _CORE_mutex_Seize_interrupt_blocking(
CORE_mutex_Control *the_mutex,
Thread_Control *executing,
- Watchdog_Interval timeout
+ Watchdog_Interval timeout,
+ ISR_lock_Context *lock_context
)
{
+ _Thread_queue_Enter_critical_section( &the_mutex->Wait_queue );
+ executing->Wait.queue = &the_mutex->Wait_queue;
+ _Thread_Disable_dispatch();
+ _ISR_lock_ISR_enable( lock_context );
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
Thread_Control *holder = the_mutex->holder;