X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fpriority-sema.c;h=2834a880be25c92aa9989c6e3e828c13fb0fc107;hb=2f9044505b2103fb0f165341fcbeb3104289572e;hp=8ca17a0aa9c3991f0b7b14b38e4b9f60051067e7;hpb=0d095b17daaed97df1943ac031058b428ad3f5fa;p=pintos-anon diff --git a/src/tests/threads/priority-sema.c b/src/tests/threads/priority-sema.c index 8ca17a0..2834a88 100644 --- a/src/tests/threads/priority-sema.c +++ b/src/tests/threads/priority-sema.c @@ -18,13 +18,13 @@ test_priority_sema (void) int i; /* This test does not work with the MLFQS. */ - ASSERT (!enable_mlfqs); + ASSERT (!thread_mlfqs); sema_init (&sema, 0); - thread_set_priority (PRI_MAX); + thread_set_priority (PRI_MIN); for (i = 0; i < 10; i++) { - int priority = (i + 3) % 10 + PRI_DEFAULT + 1; + int priority = PRI_DEFAULT - (i + 3) % 10 - 1; char name[16]; snprintf (name, sizeof name, "priority %d", priority); thread_create (name, priority, priority_sema_thread, NULL);