Add explanatory comments to threads tests.
[pintos-anon] / src / tests / threads / priority-donate-nest.c
index 15141b777958cd50f6b14ac87ab62ce92be8a6a2..1f245847698c3bc8254fe7d3726b9ff8530970a5 100644 (file)
@@ -1,4 +1,10 @@
-/* Based on a test originally submitted for Stanford's CS 140 in
+/* 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 Matt Franklin <startled@leland.stanford.edu>,
    Greg Hutchins <gmh@leland.stanford.edu>, Yu Ping Hu
    <yph@cs.stanford.edu>.  Modified by arens. */