summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/corerwlockobtainwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/corerwlockobtainwrite.c')
-rw-r--r--cpukit/score/src/corerwlockobtainwrite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c
index ce47f434b7..7f636daa99 100644
--- a/cpukit/score/src/corerwlockobtainwrite.c
+++ b/cpukit/score/src/corerwlockobtainwrite.c
@@ -66,12 +66,15 @@ Status_Control _CORE_RWLock_Seize_for_writing(
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
+ _Thread_queue_Context_set_thread_state(
+ queue_context,
+ STATES_WAITING_FOR_RWLOCK
+ );
_Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context );
_Thread_queue_Enqueue(
&the_rwlock->Wait_queue.Queue,
CORE_RWLOCK_TQ_OPERATIONS,
executing,
- STATES_WAITING_FOR_RWLOCK,
queue_context
);
return _Thread_Wait_get_status( executing );