0001-Prevent-build-failure-when-INVARIANTS-option-disable.patch

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

Download (1.31 KB)

View differences:

sys/kern/kern_spinlock.c
206 206
	for (j = spinlocks_add_latency; j > 0; --j)
207 207
		cpu_ccfence();
208 208
#endif
209
#if defined(INVARIANTS)
209 210
	if (spin_lock_test_mode > 10 &&
210 211
	    spin->countb > spin_lock_test_mode &&
211 212
	    (spin_lock_test_mode & 0xFF) == mycpu->gd_cpuid) {
212 213
		spin->countb = 0;
213 214
		print_backtrace(-1);
214 215
	}
215

  
216
#endif
216 217
	i = 0;
217 218
	++spin->countb;
218 219

  
......
263 264
	for (j = spinlocks_add_latency; j > 0; --j)
264 265
		cpu_ccfence();
265 266
#endif
267
#if defined(INVARIANTS)
266 268
	if (spin_lock_test_mode > 10 &&
267 269
	    spin->countb > spin_lock_test_mode &&
268 270
	    (spin_lock_test_mode & 0xFF) == mycpu->gd_cpuid) {
269 271
		spin->countb = 0;
270 272
		print_backtrace(-1);
271 273
	}
272

  
274
#endif
273 275
	i = 0;
274 276
	++spin->countb;
275 277

  
276
-