X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Falarm-priority.c;h=2288ff6d6950034db2eedadf3b44c04d60377103;hb=76b1077e10f14002ab7dc68fa262739a92e51c53;hp=51ca6a92f1146c248cfc538f7fac44871919598c;hpb=94ef10ad53439c273d7c1e7397223c1cbd41f1f1;p=pintos-anon diff --git a/src/tests/threads/alarm-priority.c b/src/tests/threads/alarm-priority.c index 51ca6a9..2288ff6 100644 --- a/src/tests/threads/alarm-priority.c +++ b/src/tests/threads/alarm-priority.c @@ -19,20 +19,20 @@ test_alarm_priority (void) int i; /* This test does not work with the MLFQS. */ - ASSERT (!enable_mlfqs); + ASSERT (!thread_mlfqs); wake_time = timer_ticks () + 5 * TIMER_FREQ; sema_init (&wait_sema, 0); for (i = 0; i < 10; i++) { - int priority = (i + 5) % 10 + PRI_DEFAULT + 1; + int priority = PRI_DEFAULT - (i + 5) % 10 - 1; char name[16]; snprintf (name, sizeof name, "priority %d", priority); thread_create (name, priority, alarm_priority_thread, NULL); } - thread_set_priority (PRI_MAX); + thread_set_priority (PRI_MIN); for (i = 0; i < 10; i++) sema_down (&wait_sema);