Add explanatory comments to threads tests.
[pintos-anon] / src / tests / threads / priority-donate-nest.c
index b1ee690422371070f2f5f51a160d6f449f4d4440..1f245847698c3bc8254fe7d3726b9ff8530970a5 100644 (file)
@@ -1,10 +1,13 @@
-/* Problem 1-3: Priority Scheduling tests.
-
+/* Low-priority main thread L acquires lock A.  Medium-priority
+   thread M then acquires lock B then blocks on acquiring lock A.
+   High-priority thread H then blocks on acquiring lock B.  Thus,
+   thread H donates its priority to M, which in turn donates it
+   to thread L.
+   
    Based on a test originally submitted for Stanford's CS 140 in
-   winter 1999 by by Matt Franklin
-   <startled@leland.stanford.edu>, Greg Hutchins
-   <gmh@leland.stanford.edu>, Yu Ping Hu <yph@cs.stanford.edu>.
-   Modified by arens. */
+   winter 1999 by Matt Franklin <startled@leland.stanford.edu>,
+   Greg Hutchins <gmh@leland.stanford.edu>, Yu Ping Hu
+   <yph@cs.stanford.edu>.  Modified by arens. */
 
 #include <stdio.h>
 #include "tests/threads/tests.h"