xv6-riscv-kernel/kernel/sleeplock.h

15 lines
313 B
C
Raw Permalink Normal View History

#pragma once
#include "types.h"
#include "spinlock.h"
2016-09-12 03:01:24 +02:00
// Long-term locks for processes
struct sleeplock {
2024-06-15 16:55:06 +02:00
u32 locked; // Is the lock held?
struct spinlock lk; // spinlock protecting this sleep lock
2016-09-12 03:01:24 +02:00
// For debugging:
2024-06-15 16:55:06 +02:00
char *name; // Name of lock.
int pid; // Process holding lock
2016-09-12 03:01:24 +02:00
};