diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-24 09:23:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-24 09:23:15 +0000 |
commit | 18a535792b7a63721a123e152266c4b8cf1fae8e (patch) | |
tree | b86a475d52a5cade9e9820808a7d8f165cf081aa /nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | |
parent | 3724f268b15bdbd322cda97f88a965a68f2fd3ef (diff) | |
download | glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.tar.gz glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.tar.xz glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.zip |
Update.
* sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
Diffstat (limited to 'nptl/sysdeps/pthread/pthread_rwlock_wrlock.c')
-rw-r--r-- | nptl/sysdeps/pthread/pthread_rwlock_wrlock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c index 024b6711a9..03c37a1933 100644 --- a/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c +++ b/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c @@ -63,18 +63,19 @@ __pthread_rwlock_wrlock (rwlock) break; } + int waitval = rwlock->__data.__writer_wakeup; + /* Free the lock. */ lll_mutex_unlock (rwlock->__data.__lock); /* Wait for the writer or reader(s) to finish. */ - lll_futex_wait (&rwlock->__data.__writer_wakeup, 0); + lll_futex_wait (&rwlock->__data.__writer_wakeup, waitval); /* Get the lock. */ lll_mutex_lock (rwlock->__data.__lock); /* To start over again, remove the thread from the writer list. */ --rwlock->__data.__nr_writers_queued; - rwlock->__data.__writer_wakeup = 0; } /* We are done, free the lock. */ |