From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 7 12:57:16 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6460C1065693; Thu, 7 Oct 2010 12:57:16 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52BC78FC0C; Thu, 7 Oct 2010 12:57:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o97CvG9N041740; Thu, 7 Oct 2010 12:57:16 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o97CvGeb041738; Thu, 7 Oct 2010 12:57:16 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201010071257.o97CvGeb041738@svn.freebsd.org> From: David Xu Date: Thu, 7 Oct 2010 12:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213513 - stable/7/lib/libthr/thread X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2010 12:57:16 -0000 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);