00001 // Mutual exclusion lock. 00002 struct spinlock { 00003 uint locked; // Is the lock held? 00004 00005 // For debugging: 00006 char *name; // Name of lock. 00007 struct cpu *cpu; // The cpu holding the lock. 00008 uint pcs[10]; // The call stack (an array of program counters) 00009 // that locked the lock. 00010 }; 00011
1.5.6