In all the variants of the basic test for part 1-1, release the lock
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 18 Jan 2005 17:26:47 +0000 (17:26 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 18 Jan 2005 17:26:47 +0000 (17:26 +0000)
when we're done with it.  This shouldn't be necessary, but not
releasing the lock is a corner case that we don't necessarily want the
students to have to handle.

grading/threads/alarm-multiple.c
grading/threads/alarm-single.c
src/tests/threads/p1-1.c
src/threads/test.c

index aaa3cc84225fc47ab18a1727ded478e0c598260c..6e7c3d4079adc638ef593a35f437a7bf2ea1206c 100644 (file)
@@ -130,6 +130,7 @@ test_sleep (int thread_cnt, int iterations)
   
   printf ("Test complete.\n");
 
+  lock_release (&test.output_lock);
   free (output);
   free (threads);
 }
index 4681d8983d6bc10755dbd56bc142b63b2f501ba6..aff206467e771242c1becf9ebe67f376946c5faf 100644 (file)
@@ -130,6 +130,7 @@ test_sleep (int thread_cnt, int iterations)
   
   printf ("Test complete.\n");
 
+  lock_release (&test.output_lock);
   free (output);
   free (threads);
 }
index 2aeb91001aaa5351d396874a6ac7051d3e0da9c0..627bba5fc2e5109dff8a44b6e1fa99d92e5126fb 100644 (file)
@@ -134,6 +134,7 @@ test_sleep (int thread_cnt, int iterations)
   
   printf ("Test complete.\n");
 
+  lock_release (&test.output_lock);
   free (output);
   free (threads);
 }
index 2aeb91001aaa5351d396874a6ac7051d3e0da9c0..627bba5fc2e5109dff8a44b6e1fa99d92e5126fb 100644 (file)
@@ -134,6 +134,7 @@ test_sleep (int thread_cnt, int iterations)
   
   printf ("Test complete.\n");
 
+  lock_release (&test.output_lock);
   free (output);
   free (threads);
 }