xv6-riscv-kernel/kernel/sleeplock.h
2024-06-15 16:55:06 +02:00

9 lines
257 B
C

// Long-term locks for processes
struct sleeplock {
u32 locked; // Is the lock held?
struct spinlock lk; // spinlock protecting this sleep lock
// For debugging:
char *name; // Name of lock.
int pid; // Process holding lock
};