xv6-65oo2/spinlock.h
Robert Morris 3113643768 spinlocks using gcc intrinsics
push_off() / pop_off()
set up per-hart plic stuff so all harts get device interrupts
2019-06-05 14:05:46 -04:00

10 lines
199 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.
};