diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-21 15:42:45 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-05 14:29:02 +0200 |
commit | 89fc9345dea5c675f8d93546fa3c723918d3279a (patch) | |
tree | 89c32d64f375e1a9bf9d3725b1256aeb7ca46221 /cpukit/score/src/corerwlockobtainwrite.c | |
parent | posix: Implement self-contained POSIX barriers (diff) | |
download | rtems-89fc9345dea5c675f8d93546fa3c723918d3279a.tar.bz2 |
posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3115.
Diffstat (limited to 'cpukit/score/src/corerwlockobtainwrite.c')
-rw-r--r-- | cpukit/score/src/corerwlockobtainwrite.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c index 7f636daa99..6859163f1f 100644 --- a/cpukit/score/src/corerwlockobtainwrite.c +++ b/cpukit/score/src/corerwlockobtainwrite.c @@ -26,11 +26,12 @@ Status_Control _CORE_RWLock_Seize_for_writing( CORE_RWLock_Control *the_rwlock, - Thread_Control *executing, bool wait, Thread_queue_Context *queue_context ) { + Thread_Control *executing; + /* * If unlocked, then OK to read. * Otherwise, we have to block. @@ -38,7 +39,7 @@ Status_Control _CORE_RWLock_Seize_for_writing( * If any thread is waiting, then we wait. */ - _CORE_RWLock_Acquire_critical( the_rwlock, queue_context ); + executing = _CORE_RWLock_Acquire( the_rwlock, queue_context ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: @@ -72,7 +73,7 @@ Status_Control _CORE_RWLock_Seize_for_writing( ); _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context ); _Thread_queue_Enqueue( - &the_rwlock->Wait_queue.Queue, + &the_rwlock->Queue.Queue, CORE_RWLOCK_TQ_OPERATIONS, executing, queue_context |