summaryrefslogtreecommitdiff
path: root/kernel/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/spinlock.h')
-rw-r--r--kernel/spinlock.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/spinlock.h b/kernel/spinlock.h
new file mode 100644
index 0000000..4392820
--- /dev/null
+++ b/kernel/spinlock.h
@@ -0,0 +1,9 @@
+// Mutual exclusion lock.
+struct spinlock {
+ uint locked; // Is the lock held?
+
+ // For debugging:
+ char *name; // Name of lock.
+ struct cpu *cpu; // The cpu holding the lock.
+};
+