Project

General

Profile

Submit #2449 » 0001-Prevent-build-failure-when-INVARIANTS-option-disable.patch

INVARIANTS option fix. - adamsaka, 11/06/2012 06:20 AM

View differences:

sys/kern/kern_spinlock.c
for (j = spinlocks_add_latency; j > 0; --j)
cpu_ccfence();
#endif
#if defined(INVARIANTS)
if (spin_lock_test_mode > 10 &&
spin->countb > spin_lock_test_mode &&
(spin_lock_test_mode & 0xFF) == mycpu->gd_cpuid) {
spin->countb = 0;
print_backtrace(-1);
}
#endif
i = 0;
++spin->countb;
......
for (j = spinlocks_add_latency; j > 0; --j)
cpu_ccfence();
#endif
#if defined(INVARIANTS)
if (spin_lock_test_mode > 10 &&
spin->countb > spin_lock_test_mode &&
(spin_lock_test_mode & 0xFF) == mycpu->gd_cpuid) {
spin->countb = 0;
print_backtrace(-1);
}
#endif
i = 0;
++spin->countb;
-
(1-1/2)