aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-03-15 04:45:42 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-03-15 04:45:42 +0000
commit5b54b0891a09ca82d08e652527d1c8b531489033 (patch)
tree7b2870cdbb9d76c1deee84ce5b5545343a301abd /lib
parent483286549070c6e4dc5e57fe8827257e611a0d15 (diff)
downloadsrc-5b54b0891a09ca82d08e652527d1c8b531489033.tar.gz
src-5b54b0891a09ca82d08e652527d1c8b531489033.zip
Backout last commit.
Requested by: jhb
Notes
Notes: svn path=/head/; revision=112253
Diffstat (limited to 'lib')
-rw-r--r--lib/libkse/thread/thr_rwlock.c2
-rw-r--r--lib/libpthread/thread/thr_rwlock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_rwlock.c b/lib/libkse/thread/thr_rwlock.c
index ce9eb8a7289f..f41e8a2f6f1f 100644
--- a/lib/libkse/thread/thr_rwlock.c
+++ b/lib/libkse/thread/thr_rwlock.c
@@ -157,7 +157,7 @@ _pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
return(ret);
/* give writers priority over readers */
- while (prwlock->state < 0) {
+ while (prwlock->blocked_writers || prwlock->state < 0) {
ret = pthread_cond_wait(&prwlock->read_signal, &prwlock->lock);
if (ret != 0) {
diff --git a/lib/libpthread/thread/thr_rwlock.c b/lib/libpthread/thread/thr_rwlock.c
index ce9eb8a7289f..f41e8a2f6f1f 100644
--- a/lib/libpthread/thread/thr_rwlock.c
+++ b/lib/libpthread/thread/thr_rwlock.c
@@ -157,7 +157,7 @@ _pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
return(ret);
/* give writers priority over readers */
- while (prwlock->state < 0) {
+ while (prwlock->blocked_writers || prwlock->state < 0) {
ret = pthread_cond_wait(&prwlock->read_signal, &prwlock->lock);
if (ret != 0) {