X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Falarm-priority.c;h=51ca6a92f1146c248cfc538f7fac44871919598c;hb=94ef10ad53439c273d7c1e7397223c1cbd41f1f1;hp=379f49213b136f1f7d53f87ddf176a17ea3ac37e;hpb=4ebf33908a571a7cde93fe618902b044e3633cdf;p=pintos-anon diff --git a/src/tests/threads/alarm-priority.c b/src/tests/threads/alarm-priority.c index 379f492..51ca6a9 100644 --- a/src/tests/threads/alarm-priority.c +++ b/src/tests/threads/alarm-priority.c @@ -1,3 +1,6 @@ +/* Checks that when the alarm clock wakes up threads, the + higher-priority threads run first. */ + #include #include "tests/threads/tests.h" #include "threads/init.h" @@ -39,7 +42,7 @@ static void alarm_priority_thread (void *aux UNUSED) { /* Busy-wait until the current time changes. */ - int64_t start_time; + int64_t start_time = timer_ticks (); while (timer_elapsed (start_time) == 0) continue;