X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fdevices%2Ftimer.c;h=8b923414e65248414512a63f5d27088ee3c3eb44;hp=befaaaed5a9a1ac0cd25ab76f8afd96fe6865127;hb=52fd7eb25b15662abfacca92e20416cb29d85395;hpb=c3f2bdb4fcd99dca631962dccb21214e2847f3a3 diff --git a/src/devices/timer.c b/src/devices/timer.c index befaaae..8b92341 100644 --- a/src/devices/timer.c +++ b/src/devices/timer.c @@ -60,7 +60,7 @@ timer_calibrate (void) /* Refine the next 8 bits of loops_per_tick. */ high_bit = loops_per_tick; for (test_bit = high_bit >> 1; test_bit != high_bit >> 10; test_bit >>= 1) - if (!too_many_loops (high_bit | test_bit)) + if (!too_many_loops (loops_per_tick | test_bit)) loops_per_tick |= test_bit; printf ("%'"PRIu64" loops/s.\n", (uint64_t) loops_per_tick * TIMER_FREQ);