Add explanatory comments to threads tests.
[pintos-anon] / src / tests / threads / priority-donate-multiple.c
index 836f3ed028f62785d0f36fcbe52a9f4a8b149421..69056914306bdede6f7c53047adfdb33d3ce706f 100644 (file)
@@ -1,4 +1,10 @@
-/* Based on a test originally submitted for Stanford's CS 140 in
+/* The main thread acquires locks A and B, then it creates two
+   higher-priority threads.  Each of these threads blocks
+   acquiring one of the locks and thus donate their priority to
+   the main thread.  The main thread releases the locks in turn
+   and relinquishes its donated priorities.
+   
+   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. */