Use runtime options instead of conditional compilation for MLFQS,
[pintos-anon] / grading / threads / alarm-single.c
index 4681d8983d6bc10755dbd56bc142b63b2f501ba6..ebed46f6d801c797423eda1e0370511a580e405f 100644 (file)
 #include "threads/thread.h"
 #include "devices/timer.h"
 
-#ifdef MLFQS
-#error This test not applicable with MLFQS enabled.
-#endif
-
 static void test_sleep (int thread_cnt, int iterations);
 
 void
 test (void) 
 {
+  /* This test does not work with the MLFQS. */
+  ASSERT (!enable_mlfqs);
+
   test_sleep (5, 1);
 }
 \f
@@ -130,6 +129,7 @@ test_sleep (int thread_cnt, int iterations)
   
   printf ("Test complete.\n");
 
+  lock_release (&test.output_lock);
   free (output);
   free (threads);
 }