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.
This commit is contained in:
Mateusz Guzik 2016-07-30 22:23:31 +00:00
parent 7a54be1870
commit e0c45af904

View File

@ -889,10 +889,10 @@ _sx_slock_hard(struct sx *sx, int opts, const char *file, int line)
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");