xref: /xv6-public/spinlock.h (revision 7894fcd2)
1*1ddfbbb1SFrans Kaashoek // Mutual exclusion lock.
266432474Srtm struct spinlock {
331085bb4Srsc   uint locked;       // Is the lock held?
431085bb4Srsc 
531085bb4Srsc   // For debugging:
631085bb4Srsc   char *name;        // Name of lock.
748755214SRuss Cox   struct cpu *cpu;   // The cpu holding the lock.
831085bb4Srsc   uint pcs[10];      // The call stack (an array of program counters)
931085bb4Srsc                      // that locked the lock.
1066432474Srtm };
11c2f354e4Srsc 
12