X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fpriority-change.c;h=bb462d462d85fe02c1a4ca22a132883ec881c0b4;hb=3f1ab89acd506bccd47bf9a3a764f0a9985bdaa7;hp=735920ffe49fa309b5088aa9290bf4ed4aee2b6c;hpb=0fbebef6a26f59aea618b9b89c4d30fac0bd1a40;p=pintos-anon diff --git a/src/tests/threads/priority-change.c b/src/tests/threads/priority-change.c index 735920f..bb462d4 100644 --- a/src/tests/threads/priority-change.c +++ b/src/tests/threads/priority-change.c @@ -16,9 +16,9 @@ test_priority_change (void) 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."); } @@ -26,6 +26,6 @@ static void 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."); }