diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-03 15:52:18 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:33 -0500 |
commit | 9c1721aa4994f6625decbd915241f3a94ee2fe67 (patch) | |
tree | bc1c2d623ac5d0db82df18163f6ab029e057c558 /include/linux/spinlock_api_smp.h | |
parent | 9828ea9d75c38fe3dce05d00566eed61c85732e6 (diff) |
locking: Cleanup the name space completely
Make the name space hierarchy of locking functions consistent:
raw_spin* -> _raw_spin* -> __raw_spin*
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/spinlock_api_smp.h')
-rw-r--r-- | include/linux/spinlock_api_smp.h | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index 1be1fc57fc4b..e253ccd7a604 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -19,70 +19,71 @@ int in_lock_functions(unsigned long addr); | |||
19 | 19 | ||
20 | #define assert_raw_spin_locked(x) BUG_ON(!raw_spin_is_locked(x)) | 20 | #define assert_raw_spin_locked(x) BUG_ON(!raw_spin_is_locked(x)) |
21 | 21 | ||
22 | void __lockfunc _spin_lock(raw_spinlock_t *lock) __acquires(lock); | 22 | void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); |
23 | void __lockfunc _spin_lock_nested(raw_spinlock_t *lock, int subclass) | 23 | void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) |
24 | __acquires(lock); | 24 | __acquires(lock); |
25 | void __lockfunc | 25 | void __lockfunc |
26 | _spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) | 26 | _raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) |
27 | __acquires(lock); | 27 | __acquires(lock); |
28 | void __lockfunc _spin_lock_bh(raw_spinlock_t *lock) __acquires(lock); | 28 | void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock) __acquires(lock); |
29 | void __lockfunc _spin_lock_irq(raw_spinlock_t *lock) __acquires(lock); | 29 | void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock) |
30 | 30 | __acquires(lock); | |
31 | unsigned long __lockfunc _spin_lock_irqsave(raw_spinlock_t *lock) | 31 | |
32 | __acquires(lock); | 32 | unsigned long __lockfunc _raw_spin_lock_irqsave(raw_spinlock_t *lock) |
33 | __acquires(lock); | ||
33 | unsigned long __lockfunc | 34 | unsigned long __lockfunc |
34 | _spin_lock_irqsave_nested(raw_spinlock_t *lock, int subclass) | 35 | _raw_spin_lock_irqsave_nested(raw_spinlock_t *lock, int subclass) |
35 | __acquires(lock); | 36 | __acquires(lock); |
36 | int __lockfunc _spin_trylock(raw_spinlock_t *lock); | 37 | int __lockfunc _raw_spin_trylock(raw_spinlock_t *lock); |
37 | int __lockfunc _spin_trylock_bh(raw_spinlock_t *lock); | 38 | int __lockfunc _raw_spin_trylock_bh(raw_spinlock_t *lock); |
38 | void __lockfunc _spin_unlock(raw_spinlock_t *lock) __releases(lock); | 39 | void __lockfunc _raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); |
39 | void __lockfunc _spin_unlock_bh(raw_spinlock_t *lock) __releases(lock); | 40 | void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock) __releases(lock); |
40 | void __lockfunc _spin_unlock_irq(raw_spinlock_t *lock) __releases(lock); | 41 | void __lockfunc _raw_spin_unlock_irq(raw_spinlock_t *lock) __releases(lock); |
41 | void __lockfunc | 42 | void __lockfunc |
42 | _spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) | 43 | _raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) |
43 | __releases(lock); | 44 | __releases(lock); |
44 | 45 | ||
45 | #ifdef CONFIG_INLINE_SPIN_LOCK | 46 | #ifdef CONFIG_INLINE_SPIN_LOCK |
46 | #define _spin_lock(lock) __spin_lock(lock) | 47 | #define _raw_spin_lock(lock) __raw_spin_lock(lock) |
47 | #endif | 48 | #endif |
48 | 49 | ||
49 | #ifdef CONFIG_INLINE_SPIN_LOCK_BH | 50 | #ifdef CONFIG_INLINE_SPIN_LOCK_BH |
50 | #define _spin_lock_bh(lock) __spin_lock_bh(lock) | 51 | #define _raw_spin_lock_bh(lock) __raw_spin_lock_bh(lock) |
51 | #endif | 52 | #endif |
52 | 53 | ||
53 | #ifdef CONFIG_INLINE_SPIN_LOCK_IRQ | 54 | #ifdef CONFIG_INLINE_SPIN_LOCK_IRQ |
54 | #define _spin_lock_irq(lock) __spin_lock_irq(lock) | 55 | #define _raw_spin_lock_irq(lock) __raw_spin_lock_irq(lock) |
55 | #endif | 56 | #endif |
56 | 57 | ||
57 | #ifdef CONFIG_INLINE_SPIN_LOCK_IRQSAVE | 58 | #ifdef CONFIG_INLINE_SPIN_LOCK_IRQSAVE |
58 | #define _spin_lock_irqsave(lock) __spin_lock_irqsave(lock) | 59 | #define _raw_spin_lock_irqsave(lock) __raw_spin_lock_irqsave(lock) |
59 | #endif | 60 | #endif |
60 | 61 | ||
61 | #ifdef CONFIG_INLINE_SPIN_TRYLOCK | 62 | #ifdef CONFIG_INLINE_SPIN_TRYLOCK |
62 | #define _spin_trylock(lock) __spin_trylock(lock) | 63 | #define _raw_spin_trylock(lock) __raw_spin_trylock(lock) |
63 | #endif | 64 | #endif |
64 | 65 | ||
65 | #ifdef CONFIG_INLINE_SPIN_TRYLOCK_BH | 66 | #ifdef CONFIG_INLINE_SPIN_TRYLOCK_BH |
66 | #define _spin_trylock_bh(lock) __spin_trylock_bh(lock) | 67 | #define _raw_spin_trylock_bh(lock) __raw_spin_trylock_bh(lock) |
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | #ifdef CONFIG_INLINE_SPIN_UNLOCK | 70 | #ifdef CONFIG_INLINE_SPIN_UNLOCK |
70 | #define _spin_unlock(lock) __spin_unlock(lock) | 71 | #define _raw_spin_unlock(lock) __raw_spin_unlock(lock) |
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_BH | 74 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_BH |
74 | #define _spin_unlock_bh(lock) __spin_unlock_bh(lock) | 75 | #define _raw_spin_unlock_bh(lock) __raw_spin_unlock_bh(lock) |
75 | #endif | 76 | #endif |
76 | 77 | ||
77 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQ | 78 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQ |
78 | #define _spin_unlock_irq(lock) __spin_unlock_irq(lock) | 79 | #define _raw_spin_unlock_irq(lock) __raw_spin_unlock_irq(lock) |
79 | #endif | 80 | #endif |
80 | 81 | ||
81 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE | 82 | #ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE |
82 | #define _spin_unlock_irqrestore(lock, flags) __spin_unlock_irqrestore(lock, flags) | 83 | #define _raw_spin_unlock_irqrestore(lock, flags) __raw_spin_unlock_irqrestore(lock, flags) |
83 | #endif | 84 | #endif |
84 | 85 | ||
85 | static inline int __spin_trylock(raw_spinlock_t *lock) | 86 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) |
86 | { | 87 | { |
87 | preempt_disable(); | 88 | preempt_disable(); |
88 | if (do_raw_spin_trylock(lock)) { | 89 | if (do_raw_spin_trylock(lock)) { |
@@ -100,7 +101,7 @@ static inline int __spin_trylock(raw_spinlock_t *lock) | |||
100 | */ | 101 | */ |
101 | #if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC) | 102 | #if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC) |
102 | 103 | ||
103 | static inline unsigned long __spin_lock_irqsave(raw_spinlock_t *lock) | 104 | static inline unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock) |
104 | { | 105 | { |
105 | unsigned long flags; | 106 | unsigned long flags; |
106 | 107 | ||
@@ -120,7 +121,7 @@ static inline unsigned long __spin_lock_irqsave(raw_spinlock_t *lock) | |||
120 | return flags; | 121 | return flags; |
121 | } | 122 | } |
122 | 123 | ||
123 | static inline void __spin_lock_irq(raw_spinlock_t *lock) | 124 | static inline void __raw_spin_lock_irq(raw_spinlock_t *lock) |
124 | { | 125 | { |
125 | local_irq_disable(); | 126 | local_irq_disable(); |
126 | preempt_disable(); | 127 | preempt_disable(); |
@@ -128,7 +129,7 @@ static inline void __spin_lock_irq(raw_spinlock_t *lock) | |||
128 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); | 129 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); |
129 | } | 130 | } |
130 | 131 | ||
131 | static inline void __spin_lock_bh(raw_spinlock_t *lock) | 132 | static inline void __raw_spin_lock_bh(raw_spinlock_t *lock) |
132 | { | 133 | { |
133 | local_bh_disable(); | 134 | local_bh_disable(); |
134 | preempt_disable(); | 135 | preempt_disable(); |
@@ -136,7 +137,7 @@ static inline void __spin_lock_bh(raw_spinlock_t *lock) | |||
136 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); | 137 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); |
137 | } | 138 | } |
138 | 139 | ||
139 | static inline void __spin_lock(raw_spinlock_t *lock) | 140 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
140 | { | 141 | { |
141 | preempt_disable(); | 142 | preempt_disable(); |
142 | spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); | 143 | spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); |
@@ -145,14 +146,14 @@ static inline void __spin_lock(raw_spinlock_t *lock) | |||
145 | 146 | ||
146 | #endif /* CONFIG_PREEMPT */ | 147 | #endif /* CONFIG_PREEMPT */ |
147 | 148 | ||
148 | static inline void __spin_unlock(raw_spinlock_t *lock) | 149 | static inline void __raw_spin_unlock(raw_spinlock_t *lock) |
149 | { | 150 | { |
150 | spin_release(&lock->dep_map, 1, _RET_IP_); | 151 | spin_release(&lock->dep_map, 1, _RET_IP_); |
151 | do_raw_spin_unlock(lock); | 152 | do_raw_spin_unlock(lock); |
152 | preempt_enable(); | 153 | preempt_enable(); |
153 | } | 154 | } |
154 | 155 | ||
155 | static inline void __spin_unlock_irqrestore(raw_spinlock_t *lock, | 156 | static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock, |
156 | unsigned long flags) | 157 | unsigned long flags) |
157 | { | 158 | { |
158 | spin_release(&lock->dep_map, 1, _RET_IP_); | 159 | spin_release(&lock->dep_map, 1, _RET_IP_); |
@@ -161,7 +162,7 @@ static inline void __spin_unlock_irqrestore(raw_spinlock_t *lock, | |||
161 | preempt_enable(); | 162 | preempt_enable(); |
162 | } | 163 | } |
163 | 164 | ||
164 | static inline void __spin_unlock_irq(raw_spinlock_t *lock) | 165 | static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock) |
165 | { | 166 | { |
166 | spin_release(&lock->dep_map, 1, _RET_IP_); | 167 | spin_release(&lock->dep_map, 1, _RET_IP_); |
167 | do_raw_spin_unlock(lock); | 168 | do_raw_spin_unlock(lock); |
@@ -169,7 +170,7 @@ static inline void __spin_unlock_irq(raw_spinlock_t *lock) | |||
169 | preempt_enable(); | 170 | preempt_enable(); |
170 | } | 171 | } |
171 | 172 | ||
172 | static inline void __spin_unlock_bh(raw_spinlock_t *lock) | 173 | static inline void __raw_spin_unlock_bh(raw_spinlock_t *lock) |
173 | { | 174 | { |
174 | spin_release(&lock->dep_map, 1, _RET_IP_); | 175 | spin_release(&lock->dep_map, 1, _RET_IP_); |
175 | do_raw_spin_unlock(lock); | 176 | do_raw_spin_unlock(lock); |
@@ -177,7 +178,7 @@ static inline void __spin_unlock_bh(raw_spinlock_t *lock) | |||
177 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | 178 | local_bh_enable_ip((unsigned long)__builtin_return_address(0)); |
178 | } | 179 | } |
179 | 180 | ||
180 | static inline int __spin_trylock_bh(raw_spinlock_t *lock) | 181 | static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock) |
181 | { | 182 | { |
182 | local_bh_disable(); | 183 | local_bh_disable(); |
183 | preempt_disable(); | 184 | preempt_disable(); |