xv6-riscv/kernel/sleeplock.h

15 lines
320 B
C

#include "types.h"
#include "spinlock.h"
#pragma once
// Long-term locks for processes
struct sleeplock {
uint 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
};