-/* Problem 1-3: Priority Scheduling tests.
+/* Creates several threads all at the same priority and ensures
+ that they consistently run in the same round-robin order.
Based on a test originally submitted for Stanford's CS 140 in
winter 1999 by by Matt Franklin
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];
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);