X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Falarm-priority.c;h=4839ecdfc81491d36c656ea4ef98761cf5206616;hb=225e6b43b823eec0f3eef093f697c0b62538344f;hp=51ca6a92f1146c248cfc538f7fac44871919598c;hpb=0d095b17daaed97df1943ac031058b428ad3f5fa;p=pintos-anon diff --git a/src/tests/threads/alarm-priority.c b/src/tests/threads/alarm-priority.c index 51ca6a9..4839ecd 100644 --- a/src/tests/threads/alarm-priority.c +++ b/src/tests/threads/alarm-priority.c @@ -26,13 +26,13 @@ test_alarm_priority (void) 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);