ASSERT (!enable_mlfqs);
msg ("Creating a high-priority thread 2.");
- thread_create ("thread 2", PRI_DEFAULT - 1, changing_thread, NULL);
+ thread_create ("thread 2", PRI_DEFAULT + 1, changing_thread, NULL);
msg ("Thread 2 should have just lowered its priority.");
- thread_set_priority (PRI_DEFAULT + 2);
+ thread_set_priority (PRI_DEFAULT - 2);
msg ("Thread 2 should have just exited.");
}
changing_thread (void *aux UNUSED)
{
msg ("Thread 2 now lowering priority.");
- thread_set_priority (PRI_DEFAULT + 1);
+ thread_set_priority (PRI_DEFAULT - 1);
msg ("Thread 2 exiting.");
}