+/* Checks that when the alarm clock wakes up threads, the
+ higher-priority threads run first. */
+
#include <stdio.h>
#include "tests/threads/tests.h"
#include "threads/init.h"
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;