In all the variants of the basic test for part 1-1, release the lock
[pintos-anon] / src / tests / threads / p1-3.c
index 264ad477ec7ab069c14f6b0ebcd7aa84a9ca7f5a..6c16023c61b9efa9eb03366b4cdb8b415190edee 100644 (file)
@@ -6,6 +6,10 @@
    <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"
@@ -18,7 +22,7 @@ static void test_donate_return (void);
 void
 test (void) 
 {
-  /* Make sure our prority is the default. */
+  /* Make sure our priority is the default. */
   ASSERT (thread_get_priority () == PRI_DEFAULT);
 
   test_preempt ();
@@ -50,7 +54,7 @@ test_fifo (void)
           "If the order varies then there is a bug.\n");
 
   thread_set_priority (PRI_DEFAULT + 2);
-  for (i = 0; i < 5; i++) 
+  for (i = 0; i < 10; i++) 
     {
       char name[16];
       snprintf (name, sizeof name, "%d", i);
@@ -79,7 +83,7 @@ test_donate_return (void)
   printf ("This thread should have priority %d.  Actual priority: %d.\n",
           PRI_DEFAULT + 2, thread_get_priority ());
   lock_release (&lock);
-  printf ("acquire1 and acquire2 must already have finished, in that order.\n"
+  printf ("acquire2 and acquire1 must already have finished, in that order.\n"
           "This should be the last line before finishing this test.\n"
           "Priority donation test done.\n");
 }