Use runtime options instead of conditional compilation for MLFQS,
[pintos-anon] / grading / threads / priority-preempt.c
index 1e2a2685872735d7bc02414ac5ed8e0114e2dbc6..8953748afb6ec8fefd35bba2bc481ede0eb60c78 100644 (file)
@@ -6,10 +6,6 @@
    <gmh@leland.stanford.edu>, Yu Ping Hu <yph@cs.stanford.edu>.
    Modified by arens. */
 
-#ifdef MLFQS
-#error This test not applicable with MLFQS enabled.
-#endif
-
 #include "threads/test.h"
 #include <stdio.h>
 #include "threads/synch.h"
@@ -20,6 +16,9 @@ static void test_preempt (void);
 void
 test (void) 
 {
+  /* This test does not work with the MLFQS. */
+  ASSERT (!enable_mlfqs);
+
   /* Make sure our priority is the default. */
   ASSERT (thread_get_priority () == PRI_DEFAULT);