Initialize start_time. Thanks to Ankur Goyal <angoyal@stanford.edu> .
[pintos-anon] / src / tests / threads / alarm-priority.c
index 379f49213b136f1f7d53f87ddf176a17ea3ac37e..291861fd276f172ee8bd55258ecfea118cff90f6 100644 (file)
@@ -39,7 +39,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;