spinlock.h 315 B

1234567891011
  1. // Mutual exclusion lock.
  2. struct spinlock {
  3. uint locked; // Is the lock held?
  4. // For debugging:
  5. char *name; // Name of lock.
  6. struct cpu *cpu; // The cpu holding the lock.
  7. uint pcs[10]; // The call stack (an array of program counters)
  8. // that locked the lock.
  9. };