Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2010 12:57:16 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r213513 - stable/7/lib/libthr/thread
Message-ID:  <201010071257.o97CvGeb041738@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidxu
Date: Thu Oct  7 12:57:16 2010
New Revision: 213513
URL: http://svn.freebsd.org/changeset/base/213513

Log:
  MFC r211833:
  Decrease rdlock count only when thread unlocked a reader lock.

Modified:
  stable/7/lib/libthr/thread/thr_rtld.c
Directory Properties:
  stable/7/lib/libthr/   (props changed)

Modified: stable/7/lib/libthr/thread/thr_rtld.c
==============================================================================
--- stable/7/lib/libthr/thread/thr_rtld.c	Thu Oct  7 12:34:54 2010	(r213512)
+++ stable/7/lib/libthr/thread/thr_rtld.c	Thu Oct  7 12:57:16 2010	(r213513)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010071257.o97CvGeb041738>