diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-03-15 04:45:42 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-03-15 04:45:42 +0000 |
commit | 71e2d62a49b558881aa09378c949a5848c20448e (patch) | |
tree | 7b2870cdbb9d76c1deee84ce5b5545343a301abd /lib | |
parent | 349ca981e1632621b7582bf5d907d6f3b359c63c (diff) | |
download | FreeBSD-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.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_rwlock.c | 2 |
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) { |