From 31085bb4166c18b3dee059160d64b4edd7c5e2f4 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 7 Sep 2006 14:12:30 +0000 Subject: more comments --- spinlock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'spinlock.h') diff --git a/spinlock.h b/spinlock.h index ae5ad1f..1a706cf 100644 --- a/spinlock.h +++ b/spinlock.h @@ -1,6 +1,10 @@ +// Mutual exclusion lock. struct spinlock { - char *name; - uint locked; - int cpu; - uint pcs[10]; + uint locked; // Is the lock held? + + // For debugging: + char *name; // Name of lock. + int cpu; // The number of the cpu holding the lock. + uint pcs[10]; // The call stack (an array of program counters) + // that locked the lock. }; -- cgit v1.2.3