diff options
Diffstat (limited to 'lib/libthr/thread/thr_rtld.c')
-rw-r--r-- | lib/libthr/thread/thr_rtld.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 7e26340..4db08bd 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -114,6 +114,7 @@ _thr_rtld_rlock_acquire(void *lock) THR_CRITICAL_ENTER(curthread); while (_thr_rwlock_rdlock(&l->lock, 0, NULL) != 0) ; + curthread->rdlock_count++; RESTORE_ERRNO(); } @@ -148,6 +149,7 @@ _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) { THR_CRITICAL_LEAVE(curthread); } else { |