Index: sys/amd64/isa/clock.c =========================================================================== --- sys/amd64/isa/clock.c 2005/11/29 20:40:08 #25 +++ sys/amd64/isa/clock.c 2005/11/29 20:40:08 @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -269,7 +270,21 @@ int getit_calls = 1; int n1; static int state = 0; +#endif + + if (tsc_freq != 0 && !tsc_is_broken) { + uint64_t start, end, now; + sched_pin(); + start = rdtsc(); + end = start + (tsc_freq * n) / 1000000; + do { + now = rdtsc(); + } while (now < end); + sched_unpin(); + return; + } +#ifdef DELAYDEBUG if (state == 0) { state = 1; for (n1 = 1; n1 <= 10000000; n1 *= 10)