summaryrefslogtreecommitdiff
path: root/sleeplock.h
diff options
context:
space:
mode:
Diffstat (limited to 'sleeplock.h')
-rw-r--r--sleeplock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sleeplock.h b/sleeplock.h
new file mode 100644
index 0000000..110e6f3
--- /dev/null
+++ b/sleeplock.h
@@ -0,0 +1,10 @@
+// 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
+};
+