svn commit: r209002 - stable/8/sys/kern

John Baldwin jhb at FreeBSD.org
Thu Jun 10 20:04:45 UTC 2010


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;


More information about the svn-src-stable-8 mailing list