mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
spinlock: Add spin_lock_bh_nested()
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
897362e446
commit
113948d841
@@ -190,6 +190,8 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
# define raw_spin_lock_nested(lock, subclass) \
|
||||
_raw_spin_lock_nested(lock, subclass)
|
||||
# define raw_spin_lock_bh_nested(lock, subclass) \
|
||||
_raw_spin_lock_bh_nested(lock, subclass)
|
||||
|
||||
# define raw_spin_lock_nest_lock(lock, nest_lock) \
|
||||
do { \
|
||||
@@ -205,6 +207,7 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
|
||||
# define raw_spin_lock_nested(lock, subclass) \
|
||||
_raw_spin_lock(((void)(subclass), (lock)))
|
||||
# define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock)
|
||||
# define raw_spin_lock_bh_nested(lock, subclass) _raw_spin_lock_bh(lock)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
|
||||
@@ -324,6 +327,11 @@ do { \
|
||||
raw_spin_lock_nested(spinlock_check(lock), subclass); \
|
||||
} while (0)
|
||||
|
||||
#define spin_lock_bh_nested(lock, subclass) \
|
||||
do { \
|
||||
raw_spin_lock_bh_nested(spinlock_check(lock), subclass);\
|
||||
} while (0)
|
||||
|
||||
#define spin_lock_nest_lock(lock, nest_lock) \
|
||||
do { \
|
||||
raw_spin_lock_nest_lock(spinlock_check(lock), nest_lock); \
|
||||
|
||||
Reference in New Issue
Block a user