X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fthreads%2Fpriority-preempt.c;h=3c3aacbd0336f41fb69d386c9576cb18f07c00ae;hb=854aa042a0e960f142cb15ecca8177ee01c3f927;hp=f6f799c4127957b15d0877f28d9c7275bc843012;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/threads/priority-preempt.c b/src/tests/threads/priority-preempt.c index f6f799c..3c3aacb 100644 --- a/src/tests/threads/priority-preempt.c +++ b/src/tests/threads/priority-preempt.c @@ -1,4 +1,4 @@ -/* Problem 1-3: Priority Scheduling tests. +/* Ensures that a high-priority thread really preempts. Based on a test originally submitted for Stanford's CS 140 in winter 1999 by by Matt Franklin @@ -18,12 +18,12 @@ void test_priority_preempt (void) { /* This test does not work with the MLFQS. */ - ASSERT (!enable_mlfqs); + ASSERT (!thread_mlfqs); /* Make sure our priority is the default. */ ASSERT (thread_get_priority () == PRI_DEFAULT); - thread_create ("high-priority", PRI_DEFAULT - 1, simple_thread_func, NULL); + thread_create ("high-priority", PRI_DEFAULT + 1, simple_thread_func, NULL); msg ("The high-priority thread should have already completed."); }