0001-Fix-INVARIANT-build-issue.patch

New patch. - adamsaka, 11/07/2012 09:21 PM

Download (1.78 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
	i = 0;
217 216
	++spin->countb;
217
#endif
218
	i = 0;
218 219

  
219 220
	/*logspin(beg, spin, 'w');*/
220 221
	for (;;) {
......
240 241
			break;
241 242
		}
242 243
		if ((++i & 0x7F) == 0x7F) {
244
#if defined(INVARIANTS)		
243 245
			++spin->countb;
246
#endif		
244 247
			if (spin_indefinite_check(spin, &info))
245 248
				break;
246 249
		}
......
263 266
	for (j = spinlocks_add_latency; j > 0; --j)
264 267
		cpu_ccfence();
265 268
#endif
269
#if defined(INVARIANTS)
266 270
	if (spin_lock_test_mode > 10 &&
267 271
	    spin->countb > spin_lock_test_mode &&
268 272
	    (spin_lock_test_mode & 0xFF) == mycpu->gd_cpuid) {
269 273
		spin->countb = 0;
270 274
		print_backtrace(-1);
271 275
	}
272

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

  
276 280
	/*logspin(beg, spin, 'w');*/
277 281
	for (;;) {
......
299 303
				break;
300 304
		}
301 305
		if ((++i & 0x7F) == 0x7F) {
306
#if defined(INVARIANTS)
302 307
			++spin->countb;
308
#endif
303 309
			if (spin_indefinite_check(spin, &info))
304 310
				break;
305 311
		}
306
-