diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-01-02 17:00:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-03 14:32:57 -0500 |
commit | 113948d841e8d78039e5dbbb5248f5b73e99eafa (patch) | |
tree | dd83aa9e9cc3d6cae386afa57dad4046df7e33bd /include/linux/spinlock.h | |
parent | 897362e446436d245972e72c6bc5b33bd7a5c659 (diff) |
spinlock: Add spin_lock_bh_nested()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r-- | include/linux/spinlock.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 262ba4ef9a8e..3e18379dfa6f 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -190,6 +190,8 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) | |||
190 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 190 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
191 | # define raw_spin_lock_nested(lock, subclass) \ | 191 | # define raw_spin_lock_nested(lock, subclass) \ |
192 | _raw_spin_lock_nested(lock, subclass) | 192 | _raw_spin_lock_nested(lock, subclass) |
193 | # define raw_spin_lock_bh_nested(lock, subclass) \ | ||
194 | _raw_spin_lock_bh_nested(lock, subclass) | ||
193 | 195 | ||
194 | # define raw_spin_lock_nest_lock(lock, nest_lock) \ | 196 | # define raw_spin_lock_nest_lock(lock, nest_lock) \ |
195 | do { \ | 197 | do { \ |
@@ -205,6 +207,7 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) | |||
205 | # define raw_spin_lock_nested(lock, subclass) \ | 207 | # define raw_spin_lock_nested(lock, subclass) \ |
206 | _raw_spin_lock(((void)(subclass), (lock))) | 208 | _raw_spin_lock(((void)(subclass), (lock))) |
207 | # define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock) | 209 | # define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock) |
210 | # define raw_spin_lock_bh_nested(lock, subclass) _raw_spin_lock_bh(lock) | ||
208 | #endif | 211 | #endif |
209 | 212 | ||
210 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 213 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
@@ -324,6 +327,11 @@ do { \ | |||
324 | raw_spin_lock_nested(spinlock_check(lock), subclass); \ | 327 | raw_spin_lock_nested(spinlock_check(lock), subclass); \ |
325 | } while (0) | 328 | } while (0) |
326 | 329 | ||
330 | #define spin_lock_bh_nested(lock, subclass) \ | ||
331 | do { \ | ||
332 | raw_spin_lock_bh_nested(spinlock_check(lock), subclass);\ | ||
333 | } while (0) | ||
334 | |||
327 | #define spin_lock_nest_lock(lock, nest_lock) \ | 335 | #define spin_lock_nest_lock(lock, nest_lock) \ |
328 | do { \ | 336 | do { \ |
329 | raw_spin_lock_nest_lock(spinlock_check(lock), nest_lock); \ | 337 | raw_spin_lock_nest_lock(spinlock_check(lock), nest_lock); \ |