diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-01-21 00:20:37 +0100 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-02-28 23:49:26 +0100 |
commit | 4ebc1b4b0004b45e280940db81888a7863d3a01d (patch) | |
tree | 5b76edad0f1ee03911d7f699f5d71027d4038573 /include | |
parent | x86: relocate get/set debugreg fcns to include/asm/debugreg. (diff) | |
download | linux-4ebc1b4b0004b45e280940db81888a7863d3a01d.tar.xz linux-4ebc1b4b0004b45e280940db81888a7863d3a01d.zip |
spinlock: macroize assert_spin_locked to avoid bug.h dependency
In spinlock_api_smp.h we find a define for assert_raw_spin_locked
[which uses BUG_ON]. Then assert_spin_locked (as an inline) uses
it, meaning we need bug.h But rather than put linux/bug.h in such
a highly used file like spinlock.h, we can just make the un-raw
version also a macro. Then the required bug.h presence is limited
just to those few files who are actually doing the assert testing.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/spinlock.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 7df6c17b0281..363239087263 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -375,10 +375,7 @@ static inline int spin_can_lock(spinlock_t *lock) return raw_spin_can_lock(&lock->rlock); } -static inline void assert_spin_locked(spinlock_t *lock) -{ - assert_raw_spin_locked(&lock->rlock); -} +#define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock) /* * Pull the atomic_t declaration: |