aboutsummaryrefslogtreecommitdiff
path: root/nptl/DESIGN-rwlock.txt
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/DESIGN-rwlock.txt')
-rw-r--r--nptl/DESIGN-rwlock.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/nptl/DESIGN-rwlock.txt b/nptl/DESIGN-rwlock.txt
index d97c084..cdbd4ce 100644
--- a/nptl/DESIGN-rwlock.txt
+++ b/nptl/DESIGN-rwlock.txt
@@ -96,11 +96,15 @@ pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
if (!rwlock->readers) {
if (rwlock->nr_writers_queued) {
++rwlock->writer_wakeup;
+ lll_unlock(rwlock->lock);
futex_wake(&rwlock->writer_wakeup, 1);
+ return;
} else
if (rwlock->nr_readers_queued) {
++rwlock->readers_wakeup;
+ lll_unlock(rwlock->lock);
futex_wake(&rwlock->readers_wakeup, MAX_INT);
+ return;
}
}