Author: mjg
Date: Sat Jul 30 22:23:31 2016
New Revision: 303563
URL: https://svnweb.freebsd.org/changeset/base/303563

Log:
  sx: increment spin_cnt before cpu_spinwait in xlock
  
  The change is a no-op only done for consistency with the rest of the file.

Modified:
  head/sys/kern/kern_sx.c

Modified: head/sys/kern/kern_sx.c
==============================================================================
--- head/sys/kern/kern_sx.c     Sat Jul 30 22:21:48 2016        (r303562)
+++ head/sys/kern/kern_sx.c     Sat Jul 30 22:23:31 2016        (r303563)
@@ -889,10 +889,10 @@ _sx_slock_hard(struct sx *sx, int opts, 
                                GIANT_SAVE();
                                while (SX_OWNER(sx->sx_lock) == x &&
                                    TD_IS_RUNNING(owner)) {
+                                       cpu_spinwait();
 #ifdef KDTRACE_HOOKS
                                        spin_cnt++;
 #endif
-                                       cpu_spinwait();
                                }
                                KTR_STATE0(KTR_SCHED, "thread",
                                    sched_tdname(curthread), "running");
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to