summaryrefslogtreecommitdiff
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2010-08-29 08:15:57 +0000
committerDavid Xu <davidxu@FreeBSD.org>2010-08-29 08:15:57 +0000
commite959e51e358fd9eef54033787c198e263014f023 (patch)
tree485d5eedab9d1132f2c960f8c9e375f86a1cce78 /lib/libthr/thread
parent6b164e58634cc062db9228263934e9ced83ef0e8 (diff)
MFC r211833: Decrease rdlock count only when thread unlocked
a reader lock.
Notes
svn path=/stable/8/; revision=211960
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_rtld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c
index 4db08bd617c0..2560a941d3a8 100644
--- a/lib/libthr/thread/thr_rtld.c
+++ b/lib/libthr/thread/thr_rtld.c
@@ -149,8 +149,8 @@ _thr_rtld_lock_release(void *lock)
state = l->lock.rw_state;
if (_thr_rwlock_unlock(&l->lock) == 0) {
- curthread->rdlock_count--;
if ((state & URWLOCK_WRITE_OWNER) == 0) {
+ curthread->rdlock_count--;
THR_CRITICAL_LEAVE(curthread);
} else {
_thr_signal_unblock(curthread);