summaryrefslogtreecommitdiff
path: root/kern/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/spinlock.h')
-rw-r--r--kern/spinlock.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/kern/spinlock.h b/kern/spinlock.h
index 8d20db4f..01329f1d 100644
--- a/kern/spinlock.h
+++ b/kern/spinlock.h
@@ -24,8 +24,9 @@
#define _KERN_SPINLOCK_H
#include <kern/assert.h>
-#include <kern/thread.h>
+#include <kern/macros.h>
#include <kern/spinlock_i.h>
+#include <kern/thread.h>
#include <machine/cpu.h>
struct spinlock;
@@ -38,11 +39,7 @@ spinlock_init(struct spinlock *lock)
lock->locked = 0;
}
-static inline void
-spinlock_assert_locked(struct spinlock *lock)
-{
- assert(lock->locked);
-}
+#define spinlock_assert_locked(lock) assert((lock)->locked)
/*
* Return 0 on success, 1 if busy.