xv6-lab/kernel/spinlock.h
Frans Kaashoek ad57ec8cb9 Lock lab
2022-11-09 20:27:22 -05:00

14 lines
242 B
C

// Mutual exclusion lock.
struct spinlock {
uint locked; // Is the lock held?
// For debugging:
char *name; // Name of lock.
struct cpu *cpu; // The cpu holding the lock.
#ifdef LAB_LOCK
int nts;
int n;
#endif
};