View | Details | Raw Unified | Return to bug 127391 | Differences between
and this patch

Collapse All | Expand All

(-)src/sys/i386/isa/clock.c (-15 lines)
Lines 293-314 Link Here
293
	int getit_calls = 1;
293
	int getit_calls = 1;
294
	int n1;
294
	int n1;
295
	static int state = 0;
295
	static int state = 0;
296
#endif
297
296
298
	if (tsc_freq != 0 && !tsc_is_broken) {
299
		uint64_t start, end, now;
300
301
		sched_pin();
302
		start = rdtsc();
303
		end = start + (tsc_freq * n) / 1000000;
304
		do {
305
			cpu_spinwait();
306
			now = rdtsc();
307
		} while (now < end || (now > start && end < start));
308
		sched_unpin();
309
		return;
310
	}
311
#ifdef DELAYDEBUG
312
	if (state == 0) {
297
	if (state == 0) {
313
		state = 1;
298
		state = 1;
314
		for (n1 = 1; n1 <= 10000000; n1 *= 10)
299
		for (n1 = 1; n1 <= 10000000; n1 *= 10)

Return to bug 127391