diff options
author | Richard Braun <rbraun@sceen.net> | 2017-12-03 15:11:23 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-12-03 15:11:23 +0100 |
commit | c7d2507fc455421429a531d722947ab415259c77 (patch) | |
tree | 52609a956ec9e3bd1f1274aa9d799597866bfcd1 /kern/spinlock.h | |
parent | 303ed5305f8dae17ab46aa1e0dc6086d4277808c (diff) |
Revert "Make assert have no side effects"
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
Diffstat (limited to 'kern/spinlock.h')
-rw-r--r-- | kern/spinlock.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/kern/spinlock.h b/kern/spinlock.h index 49e6d558..dd98cbf1 100644 --- a/kern/spinlock.h +++ b/kern/spinlock.h @@ -26,8 +26,6 @@ #ifndef _KERN_SPINLOCK_H #define _KERN_SPINLOCK_H -#include <stdbool.h> - #include <kern/init.h> #include <kern/macros.h> #include <kern/spinlock_i.h> @@ -36,17 +34,13 @@ struct spinlock; +#define spinlock_assert_locked(lock) assert((lock)->value != SPINLOCK_UNLOCKED) + /* * Initialize a spin lock. */ void spinlock_init(struct spinlock *lock); -static inline bool -spinlock_locked(const struct spinlock *lock) -{ - return lock->value != SPINLOCK_UNLOCKED; -} - /* * Attempt to lock the given spin lock. * |