xv6-riscv-kernel/kernel/spinlock.h
2024-05-24 11:26:40 +02:00

9 lines
198 B
C

// Mutual exclusion lock.
struct spinlock {
u32 locked; // Is the lock held?
// For debugging:
char *name; // Name of lock.
struct cpu *cpu; // The cpu holding the lock.
};