summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-03-15 04:45:42 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-03-15 04:45:42 +0000
commit71e2d62a49b558881aa09378c949a5848c20448e (patch)
tree7b2870cdbb9d76c1deee84ce5b5545343a301abd /lib
parent349ca981e1632621b7582bf5d907d6f3b359c63c (diff)
downloadFreeBSD-src-71e2d62a49b558881aa09378c949a5848c20448e.zip
FreeBSD-src-71e2d62a49b558881aa09378c949a5848c20448e.tar.gz
Backout last commit.
Requested by: jhb
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 ce9eb8a..f41e8a2 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 ce9eb8a..f41e8a2 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) {
OpenPOWER on IntegriCloud