Invert the priority scheme, so that PRI_MIN is now the lowest priority
[pintos-anon] / src / tests / threads / priority-fifo.c
index e71b7e5e00d07b14b982a5788df149b2be5ed69d..2f891962ad4e0a796bdc1851da970c27c93af7dd 100644 (file)
@@ -50,7 +50,7 @@ test_priority_fifo (void)
   ASSERT (output != NULL);
   lock_init (&lock);
 
-  thread_set_priority (PRI_DEFAULT - 2);
+  thread_set_priority (PRI_DEFAULT + 2);
   for (i = 0; i < THREAD_CNT; i++) 
     {
       char name[16];
@@ -60,7 +60,7 @@ test_priority_fifo (void)
       d->iterations = 0;
       d->lock = &lock;
       d->op = &op;
-      thread_create (name, PRI_DEFAULT - 1, simple_thread_func, d);
+      thread_create (name, PRI_DEFAULT + 1, simple_thread_func, d);
     }
 
   thread_set_priority (PRI_DEFAULT);