@@ -16,22 +16,21 @@ static inline void __rt_spin_lock_init(spinlock_t *lock, const char *name,
16
16
}
17
17
#endif
18
18
19
- #define spin_lock_init (slock ) \
19
+ #define __spin_lock_init (slock , name , key , percpu ) \
20
20
do { \
21
- static struct lock_class_key __key; \
22
- \
23
21
rt_mutex_base_init(&(slock)->lock); \
24
- __rt_spin_lock_init(slock, #slock, &__key, false); \
22
+ __rt_spin_lock_init(slock, name, key, percpu); \
25
23
} while (0)
26
24
27
- #define local_spin_lock_init (slock ) \
25
+ #define _spin_lock_init (slock , percpu ) \
28
26
do { \
29
27
static struct lock_class_key __key; \
30
- \
31
- rt_mutex_base_init(&(slock)->lock); \
32
- __rt_spin_lock_init(slock, #slock, &__key, true); \
28
+ __spin_lock_init(slock, #slock, &__key, percpu); \
33
29
} while (0)
34
30
31
+ #define spin_lock_init (slock ) _spin_lock_init(slock, false)
32
+ #define local_spin_lock_init (slock ) _spin_lock_init(slock, true)
33
+
35
34
extern void rt_spin_lock (spinlock_t * lock ) __acquires (lock );
36
35
extern void rt_spin_lock_nested (spinlock_t * lock , int subclass ) __acquires (lock );
37
36
extern void rt_spin_lock_nest_lock (spinlock_t * lock , struct lockdep_map * nest_lock ) __acquires (lock );
0 commit comments