X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdevices%2Ftimer.c;h=070c487328a61e10a8e6a86390703f4dd289173b;hb=ccf52d99d27e8dd88e594809d3ab7aab1efc8b8b;hp=24eede0e247e8c1f389be38f129dda96d81ffb80;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/devices/timer.c b/src/devices/timer.c index 24eede0..070c487 100644 --- a/src/devices/timer.c +++ b/src/devices/timer.c @@ -123,7 +123,7 @@ timer_nsleep (int64_t ns) void timer_print_stats (void) { - printf ("Timer: %"PRId64" ticks\n", ticks); + printf ("Timer: %"PRId64" ticks\n", timer_ticks ()); } /* Timer interrupt handler. */ @@ -162,7 +162,7 @@ too_many_loops (unsigned loops) differently in different places the results would be difficult to predict. */ static void NO_INLINE -busy_wait (int64_t loops) +busy_wait (volatile int64_t loops) { while (loops-- > 0) continue;