From 70c2e4da4412e7f1c82d452cb732923afbd9d117 Mon Sep 17 00:00:00 2001 From: David Xu Date: Thu, 7 Oct 2010 12:57:16 +0000 Subject: MFC r211833: Decrease rdlock count only when thread unlocked a reader lock. --- lib/libthr/thread/thr_rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 82258f545c13..61b03b07a937 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -151,8 +151,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); -- cgit v1.3