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

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