Invert the priority scheme, so that PRI_MIN is now the lowest priority
[pintos-anon] / src / tests / threads / priority-condvar.c
index 51008abdb71d9e61f34a8757c477fe59d7d1981a..3e31081da6a9b673c2d0a933189e46cb0205e990 100644 (file)
@@ -24,10 +24,10 @@ test_priority_condvar (void)
   lock_init (&lock);
   cond_init (&condition);
 
-  thread_set_priority (PRI_MAX);
+  thread_set_priority (PRI_MIN);
   for (i = 0; i < 10; i++) 
     {
-      int priority = (i + 7) % 10 + PRI_DEFAULT + 1;
+      int priority = PRI_DEFAULT - (i + 7) % 10 - 1;
       char name[16];
       snprintf (name, sizeof name, "priority %d", priority);
       thread_create (name, priority, priority_condvar_thread, NULL);