aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spinlock.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-12-03 15:52:18 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-12-14 17:55:33 -0500
commit9c1721aa4994f6625decbd915241f3a94ee2fe67 (patch)
treebc1c2d623ac5d0db82df18163f6ab029e057c558 /include/linux/spinlock.h
parent9828ea9d75c38fe3dce05d00566eed61c85732e6 (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.h')
-rw-r--r--include/linux/spinlock.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 0cbc58acf689..86088213334a 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -161,20 +161,22 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock)
161 * various methods are defined as nops in the case they are not 161 * various methods are defined as nops in the case they are not
162 * required. 162 * required.
163 */ 163 */
164#define raw_spin_trylock(lock) __cond_lock(lock, _spin_trylock(lock)) 164#define raw_spin_trylock(lock) __cond_lock(lock, _raw_spin_trylock(lock))
165 165
166#define raw_spin_lock(lock) _spin_lock(lock) 166#define raw_spin_lock(lock) _raw_spin_lock(lock)
167 167
168#ifdef CONFIG_DEBUG_LOCK_ALLOC 168#ifdef CONFIG_DEBUG_LOCK_ALLOC
169# define raw_spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) 169# define raw_spin_lock_nested(lock, subclass) \
170 _raw_spin_lock_nested(lock, subclass)
171
170# define raw_spin_lock_nest_lock(lock, nest_lock) \ 172# define raw_spin_lock_nest_lock(lock, nest_lock) \
171 do { \ 173 do { \
172 typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\ 174 typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\
173 _spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \ 175 _raw_spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \
174 } while (0) 176 } while (0)
175#else 177#else
176# define raw_spin_lock_nested(lock, subclass) _spin_lock(lock) 178# define raw_spin_lock_nested(lock, subclass) _raw_spin_lock(lock)
177# define raw_spin_lock_nest_lock(lock, nest_lock) _spin_lock(lock) 179# define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock)
178#endif 180#endif
179 181
180#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) 182#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
@@ -182,20 +184,20 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock)
182#define raw_spin_lock_irqsave(lock, flags) \ 184#define raw_spin_lock_irqsave(lock, flags) \
183 do { \ 185 do { \
184 typecheck(unsigned long, flags); \ 186 typecheck(unsigned long, flags); \
185 flags = _spin_lock_irqsave(lock); \ 187 flags = _raw_spin_lock_irqsave(lock); \
186 } while (0) 188 } while (0)
187 189
188#ifdef CONFIG_DEBUG_LOCK_ALLOC 190#ifdef CONFIG_DEBUG_LOCK_ALLOC
189#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \ 191#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
190 do { \ 192 do { \
191 typecheck(unsigned long, flags); \ 193 typecheck(unsigned long, flags); \
192 flags = _spin_lock_irqsave_nested(lock, subclass); \ 194 flags = _raw_spin_lock_irqsave_nested(lock, subclass); \
193 } while (0) 195 } while (0)
194#else 196#else
195#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \ 197#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
196 do { \ 198 do { \
197 typecheck(unsigned long, flags); \ 199 typecheck(unsigned long, flags); \
198 flags = _spin_lock_irqsave(lock); \ 200 flags = _raw_spin_lock_irqsave(lock); \
199 } while (0) 201 } while (0)
200#endif 202#endif
201 203
@@ -204,7 +206,7 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock)
204#define raw_spin_lock_irqsave(lock, flags) \ 206#define raw_spin_lock_irqsave(lock, flags) \
205 do { \ 207 do { \
206 typecheck(unsigned long, flags); \ 208 typecheck(unsigned long, flags); \
207 _spin_lock_irqsave(lock, flags); \ 209 _raw_spin_lock_irqsave(lock, flags); \
208 } while (0) 210 } while (0)
209 211
210#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \ 212#define raw_spin_lock_irqsave_nested(lock, flags, subclass) \
@@ -212,19 +214,20 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock)
212 214
213#endif 215#endif
214 216
215#define raw_spin_lock_irq(lock) _spin_lock_irq(lock) 217#define raw_spin_lock_irq(lock) _raw_spin_lock_irq(lock)
216#define raw_spin_lock_bh(lock) _spin_lock_bh(lock) 218#define raw_spin_lock_bh(lock) _raw_spin_lock_bh(lock)
217#define raw_spin_unlock(lock) _spin_unlock(lock) 219#define raw_spin_unlock(lock) _raw_spin_unlock(lock)
218#define raw_spin_unlock_irq(lock) _spin_unlock_irq(lock) 220#define raw_spin_unlock_irq(lock) _raw_spin_unlock_irq(lock)
219 221
220#define raw_spin_unlock_irqrestore(lock, flags) \ 222#define raw_spin_unlock_irqrestore(lock, flags) \
221 do { \ 223 do { \
222 typecheck(unsigned long, flags); \ 224 typecheck(unsigned long, flags); \
223 _spin_unlock_irqrestore(lock, flags); \ 225 _raw_spin_unlock_irqrestore(lock, flags); \
224 } while (0) 226 } while (0)
225#define raw_spin_unlock_bh(lock) _spin_unlock_bh(lock) 227#define raw_spin_unlock_bh(lock) _raw_spin_unlock_bh(lock)
226 228
227#define raw_spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) 229#define raw_spin_trylock_bh(lock) \
230 __cond_lock(lock, _raw_spin_trylock_bh(lock))
228 231
229#define raw_spin_trylock_irq(lock) \ 232#define raw_spin_trylock_irq(lock) \
230({ \ 233({ \