From owner-svn-src-all@FreeBSD.ORG Thu Jun 10 20:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1214A1065675; Thu, 10 Jun 2010 20:04:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0117B8FC1B; Thu, 10 Jun 2010 20:04:45 +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 o5AK4iAH051079; Thu, 10 Jun 2010 20:04:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5AK4i4m051077; Thu, 10 Jun 2010 20:04:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201006102004.o5AK4i4m051077@svn.freebsd.org> From: John Baldwin Date: Thu, 10 Jun 2010 20:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209002 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 20:04:45 -0000 Author: jhb Date: Thu Jun 10 20:04:44 2010 New Revision: 209002 URL: http://svn.freebsd.org/changeset/base/209002 Log: MFC 208912: Fix a sign bug that caused adaptive spinning in sx_xlock() to not work properly. Approved by: re (bz) Modified: stable/8/sys/kern/kern_sx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_sx.c ============================================================================== --- stable/8/sys/kern/kern_sx.c Thu Jun 10 20:02:13 2010 (r209001) +++ stable/8/sys/kern/kern_sx.c Thu Jun 10 20:04:44 2010 (r209002) @@ -508,7 +508,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t * running or the state of the lock changes. */ x = sx->sx_lock; - if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) != 0) { + if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { if ((x & SX_LOCK_SHARED) == 0) { x = SX_OWNER(x); owner = (struct thread *)x;