locking: Further name space cleanups
authorThomas Gleixner <tglx@linutronix.de>
Thu, 3 Dec 2009 19:55:53 +0000 (20:55 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 14 Dec 2009 22:55:33 +0000 (23:55 +0100)
The name space hierarchy for the internal lock functions is now a bit
backwards. raw_spin* functions map to _spin* which use __spin*, while
we would like to have _raw_spin* and __raw_spin*.

_raw_spin* is already used by lock debugging, so rename those funtions
to do_raw_spin* to free up the _raw_spin* name space.

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>
include/linux/rwlock.h
include/linux/rwlock_api_smp.h
include/linux/spinlock.h
include/linux/spinlock_api_smp.h
kernel/sched.c
kernel/spinlock.c
lib/kernel_lock.c
lib/spinlock_debug.c

index 5725b034defec94f1d7b2139a031753ca86a96e1..bd799bc6d086467ea8fb18dc9298e2010c6c513c 100644 (file)
@@ -29,25 +29,25 @@ do {                                                                \
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK
- extern void _raw_read_lock(rwlock_t *lock);
-#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)
- extern int _raw_read_trylock(rwlock_t *lock);
- extern void _raw_read_unlock(rwlock_t *lock);
- extern void _raw_write_lock(rwlock_t *lock);
-#define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock)
- extern int _raw_write_trylock(rwlock_t *lock);
- extern void _raw_write_unlock(rwlock_t *lock);
+ extern void do_raw_read_lock(rwlock_t *lock);
+#define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock)
+ extern int do_raw_read_trylock(rwlock_t *lock);
+ extern void do_raw_read_unlock(rwlock_t *lock);
+ extern void do_raw_write_lock(rwlock_t *lock);
+#define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock)
+ extern int do_raw_write_trylock(rwlock_t *lock);
+ extern void do_raw_write_unlock(rwlock_t *lock);
 #else
-# define _raw_read_lock(rwlock)                arch_read_lock(&(rwlock)->raw_lock)
-# define _raw_read_lock_flags(lock, flags) \
+# define do_raw_read_lock(rwlock)              arch_read_lock(&(rwlock)->raw_lock)
+# define do_raw_read_lock_flags(lock, flags) \
                arch_read_lock_flags(&(lock)->raw_lock, *(flags))
-# define _raw_read_trylock(rwlock)     arch_read_trylock(&(rwlock)->raw_lock)
-# define _raw_read_unlock(rwlock)      arch_read_unlock(&(rwlock)->raw_lock)
-# define _raw_write_lock(rwlock)       arch_write_lock(&(rwlock)->raw_lock)
-# define _raw_write_lock_flags(lock, flags) \
+# define do_raw_read_trylock(rwlock)   arch_read_trylock(&(rwlock)->raw_lock)
+# define do_raw_read_unlock(rwlock)    arch_read_unlock(&(rwlock)->raw_lock)
+# define do_raw_write_lock(rwlock)     arch_write_lock(&(rwlock)->raw_lock)
+# define do_raw_write_lock_flags(lock, flags) \
                arch_write_lock_flags(&(lock)->raw_lock, *(flags))
-# define _raw_write_trylock(rwlock)    arch_write_trylock(&(rwlock)->raw_lock)
-# define _raw_write_unlock(rwlock)     arch_write_unlock(&(rwlock)->raw_lock)
+# define do_raw_write_trylock(rwlock)  arch_write_trylock(&(rwlock)->raw_lock)
+# define do_raw_write_unlock(rwlock)   arch_write_unlock(&(rwlock)->raw_lock)
 #endif
 
 #define read_can_lock(rwlock)          arch_read_can_lock(&(rwlock)->raw_lock)
index 090f876f828d176bb1edbd376c8c50e1b932b95d..b3ba5ae6a8c4cb78e6245f79e0c04f26920f38f2 100644 (file)
@@ -113,7 +113,7 @@ void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
 static inline int __read_trylock(rwlock_t *lock)
 {
        preempt_disable();
-       if (_raw_read_trylock(lock)) {
+       if (do_raw_read_trylock(lock)) {
                rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_);
                return 1;
        }
@@ -124,7 +124,7 @@ static inline int __read_trylock(rwlock_t *lock)
 static inline int __write_trylock(rwlock_t *lock)
 {
        preempt_disable();
-       if (_raw_write_trylock(lock)) {
+       if (do_raw_write_trylock(lock)) {
                rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_);
                return 1;
        }
@@ -143,7 +143,7 @@ static inline void __read_lock(rwlock_t *lock)
 {
        preempt_disable();
        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_read_trylock, _raw_read_lock);
+       LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
 }
 
 static inline unsigned long __read_lock_irqsave(rwlock_t *lock)
@@ -153,8 +153,8 @@ static inline unsigned long __read_lock_irqsave(rwlock_t *lock)
        local_irq_save(flags);
        preempt_disable();
        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED_FLAGS(lock, _raw_read_trylock, _raw_read_lock,
-                            _raw_read_lock_flags, &flags);
+       LOCK_CONTENDED_FLAGS(lock, do_raw_read_trylock, do_raw_read_lock,
+                            do_raw_read_lock_flags, &flags);
        return flags;
 }
 
@@ -163,7 +163,7 @@ static inline void __read_lock_irq(rwlock_t *lock)
        local_irq_disable();
        preempt_disable();
        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_read_trylock, _raw_read_lock);
+       LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
 }
 
 static inline void __read_lock_bh(rwlock_t *lock)
@@ -171,7 +171,7 @@ static inline void __read_lock_bh(rwlock_t *lock)
        local_bh_disable();
        preempt_disable();
        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_read_trylock, _raw_read_lock);
+       LOCK_CONTENDED(lock, do_raw_read_trylock, do_raw_read_lock);
 }
 
 static inline unsigned long __write_lock_irqsave(rwlock_t *lock)
@@ -181,8 +181,8 @@ static inline unsigned long __write_lock_irqsave(rwlock_t *lock)
        local_irq_save(flags);
        preempt_disable();
        rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED_FLAGS(lock, _raw_write_trylock, _raw_write_lock,
-                            _raw_write_lock_flags, &flags);
+       LOCK_CONTENDED_FLAGS(lock, do_raw_write_trylock, do_raw_write_lock,
+                            do_raw_write_lock_flags, &flags);
        return flags;
 }
 
@@ -191,7 +191,7 @@ static inline void __write_lock_irq(rwlock_t *lock)
        local_irq_disable();
        preempt_disable();
        rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_write_trylock, _raw_write_lock);
+       LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
 }
 
 static inline void __write_lock_bh(rwlock_t *lock)
@@ -199,14 +199,14 @@ static inline void __write_lock_bh(rwlock_t *lock)
        local_bh_disable();
        preempt_disable();
        rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_write_trylock, _raw_write_lock);
+       LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
 }
 
 static inline void __write_lock(rwlock_t *lock)
 {
        preempt_disable();
        rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_write_trylock, _raw_write_lock);
+       LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
 }
 
 #endif /* CONFIG_PREEMPT */
@@ -214,21 +214,21 @@ static inline void __write_lock(rwlock_t *lock)
 static inline void __write_unlock(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_write_unlock(lock);
+       do_raw_write_unlock(lock);
        preempt_enable();
 }
 
 static inline void __read_unlock(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_read_unlock(lock);
+       do_raw_read_unlock(lock);
        preempt_enable();
 }
 
 static inline void __read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_read_unlock(lock);
+       do_raw_read_unlock(lock);
        local_irq_restore(flags);
        preempt_enable();
 }
@@ -236,7 +236,7 @@ static inline void __read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
 static inline void __read_unlock_irq(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_read_unlock(lock);
+       do_raw_read_unlock(lock);
        local_irq_enable();
        preempt_enable();
 }
@@ -244,7 +244,7 @@ static inline void __read_unlock_irq(rwlock_t *lock)
 static inline void __read_unlock_bh(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_read_unlock(lock);
+       do_raw_read_unlock(lock);
        preempt_enable_no_resched();
        local_bh_enable_ip((unsigned long)__builtin_return_address(0));
 }
@@ -253,7 +253,7 @@ static inline void __write_unlock_irqrestore(rwlock_t *lock,
                                             unsigned long flags)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_write_unlock(lock);
+       do_raw_write_unlock(lock);
        local_irq_restore(flags);
        preempt_enable();
 }
@@ -261,7 +261,7 @@ static inline void __write_unlock_irqrestore(rwlock_t *lock,
 static inline void __write_unlock_irq(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_write_unlock(lock);
+       do_raw_write_unlock(lock);
        local_irq_enable();
        preempt_enable();
 }
@@ -269,7 +269,7 @@ static inline void __write_unlock_irq(rwlock_t *lock)
 static inline void __write_unlock_bh(rwlock_t *lock)
 {
        rwlock_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_write_unlock(lock);
+       do_raw_write_unlock(lock);
        preempt_enable_no_resched();
        local_bh_enable_ip((unsigned long)__builtin_return_address(0));
 }
index ef5a55d96b9b7670b60a15c6070e7e35808d329d..0cbc58acf6898bb5153a0552ac97c20e1c5556a2 100644 (file)
@@ -128,28 +128,28 @@ static inline void smp_mb__after_lock(void) { smp_mb(); }
 #define raw_spin_unlock_wait(lock)     arch_spin_unlock_wait(&(lock)->raw_lock)
 
 #ifdef CONFIG_DEBUG_SPINLOCK
- extern void _raw_spin_lock(raw_spinlock_t *lock);
-#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
- extern int _raw_spin_trylock(raw_spinlock_t *lock);
- extern void _raw_spin_unlock(raw_spinlock_t *lock);
+ extern void do_raw_spin_lock(raw_spinlock_t *lock);
+#define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock)
+ extern int do_raw_spin_trylock(raw_spinlock_t *lock);
+ extern void do_raw_spin_unlock(raw_spinlock_t *lock);
 #else
-static inline void _raw_spin_lock(raw_spinlock_t *lock)
+static inline void do_raw_spin_lock(raw_spinlock_t *lock)
 {
        arch_spin_lock(&lock->raw_lock);
 }
 
 static inline void
-_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags)
+do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags)
 {
        arch_spin_lock_flags(&lock->raw_lock, *flags);
 }
 
-static inline int _raw_spin_trylock(raw_spinlock_t *lock)
+static inline int do_raw_spin_trylock(raw_spinlock_t *lock)
 {
        return arch_spin_trylock(&(lock)->raw_lock);
 }
 
-static inline void _raw_spin_unlock(raw_spinlock_t *lock)
+static inline void do_raw_spin_unlock(raw_spinlock_t *lock)
 {
        arch_spin_unlock(&lock->raw_lock);
 }
index eabe5068d138a3607f567fc2a45f279b0ea332e1..1be1fc57fc4be0e613a8c9949e2b26bf781af701 100644 (file)
@@ -85,7 +85,7 @@ _spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags)
 static inline int __spin_trylock(raw_spinlock_t *lock)
 {
        preempt_disable();
-       if (_raw_spin_trylock(lock)) {
+       if (do_raw_spin_trylock(lock)) {
                spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
                return 1;
        }
@@ -109,13 +109,13 @@ static inline unsigned long __spin_lock_irqsave(raw_spinlock_t *lock)
        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
        /*
         * On lockdep we dont want the hand-coded irq-enable of
-        * _raw_spin_lock_flags() code, because lockdep assumes
+        * do_raw_spin_lock_flags() code, because lockdep assumes
         * that interrupts are not re-enabled during lock-acquire:
         */
 #ifdef CONFIG_LOCKDEP
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 #else
-       _raw_spin_lock_flags(lock, &flags);
+       do_raw_spin_lock_flags(lock, &flags);
 #endif
        return flags;
 }
@@ -125,7 +125,7 @@ static inline void __spin_lock_irq(raw_spinlock_t *lock)
        local_irq_disable();
        preempt_disable();
        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 }
 
 static inline void __spin_lock_bh(raw_spinlock_t *lock)
@@ -133,14 +133,14 @@ static inline void __spin_lock_bh(raw_spinlock_t *lock)
        local_bh_disable();
        preempt_disable();
        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 }
 
 static inline void __spin_lock(raw_spinlock_t *lock)
 {
        preempt_disable();
        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 }
 
 #endif /* CONFIG_PREEMPT */
@@ -148,7 +148,7 @@ static inline void __spin_lock(raw_spinlock_t *lock)
 static inline void __spin_unlock(raw_spinlock_t *lock)
 {
        spin_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_spin_unlock(lock);
+       do_raw_spin_unlock(lock);
        preempt_enable();
 }
 
@@ -156,7 +156,7 @@ static inline void __spin_unlock_irqrestore(raw_spinlock_t *lock,
                                            unsigned long flags)
 {
        spin_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_spin_unlock(lock);
+       do_raw_spin_unlock(lock);
        local_irq_restore(flags);
        preempt_enable();
 }
@@ -164,7 +164,7 @@ static inline void __spin_unlock_irqrestore(raw_spinlock_t *lock,
 static inline void __spin_unlock_irq(raw_spinlock_t *lock)
 {
        spin_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_spin_unlock(lock);
+       do_raw_spin_unlock(lock);
        local_irq_enable();
        preempt_enable();
 }
@@ -172,7 +172,7 @@ static inline void __spin_unlock_irq(raw_spinlock_t *lock)
 static inline void __spin_unlock_bh(raw_spinlock_t *lock)
 {
        spin_release(&lock->dep_map, 1, _RET_IP_);
-       _raw_spin_unlock(lock);
+       do_raw_spin_unlock(lock);
        preempt_enable_no_resched();
        local_bh_enable_ip((unsigned long)__builtin_return_address(0));
 }
@@ -181,7 +181,7 @@ static inline int __spin_trylock_bh(raw_spinlock_t *lock)
 {
        local_bh_disable();
        preempt_disable();
-       if (_raw_spin_trylock(lock)) {
+       if (do_raw_spin_trylock(lock)) {
                spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
                return 1;
        }
index e6acf2d7b753a3b6cb44e7ea9d2bd972d236a438..91c65dd914354d0ebecc07f742d216936e58120c 100644 (file)
@@ -6684,7 +6684,7 @@ SYSCALL_DEFINE0(sched_yield)
         */
        __release(rq->lock);
        spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
-       _raw_spin_unlock(&rq->lock);
+       do_raw_spin_unlock(&rq->lock);
        preempt_enable_no_resched();
 
        schedule();
index 54eb7dd3c608d3de863df8a77582df403f3783f3..795240b812247359181a8ab39f6641922b34b2c6 100644 (file)
@@ -48,7 +48,7 @@ void __lockfunc __##op##_lock(locktype##_t *lock)                     \
 {                                                                      \
        for (;;) {                                                      \
                preempt_disable();                                      \
-               if (likely(_raw_##op##_trylock(lock)))                  \
+               if (likely(do_raw_##op##_trylock(lock)))                \
                        break;                                          \
                preempt_enable();                                       \
                                                                        \
@@ -67,7 +67,7 @@ unsigned long __lockfunc __##op##_lock_irqsave(locktype##_t *lock)    \
        for (;;) {                                                      \
                preempt_disable();                                      \
                local_irq_save(flags);                                  \
-               if (likely(_raw_##op##_trylock(lock)))                  \
+               if (likely(do_raw_##op##_trylock(lock)))                \
                        break;                                          \
                local_irq_restore(flags);                               \
                preempt_enable();                                       \
@@ -345,7 +345,7 @@ void __lockfunc _spin_lock_nested(raw_spinlock_t *lock, int subclass)
 {
        preempt_disable();
        spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 }
 EXPORT_SYMBOL(_spin_lock_nested);
 
@@ -357,8 +357,8 @@ unsigned long __lockfunc _spin_lock_irqsave_nested(raw_spinlock_t *lock,
        local_irq_save(flags);
        preempt_disable();
        spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
-       LOCK_CONTENDED_FLAGS(lock, _raw_spin_trylock, _raw_spin_lock,
-                               _raw_spin_lock_flags, &flags);
+       LOCK_CONTENDED_FLAGS(lock, do_raw_spin_trylock, do_raw_spin_lock,
+                               do_raw_spin_lock_flags, &flags);
        return flags;
 }
 EXPORT_SYMBOL(_spin_lock_irqsave_nested);
@@ -368,7 +368,7 @@ void __lockfunc _spin_lock_nest_lock(raw_spinlock_t *lock,
 {
        preempt_disable();
        spin_acquire_nest(&lock->dep_map, 0, 0, nest_lock, _RET_IP_);
-       LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
+       LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
 }
 EXPORT_SYMBOL(_spin_lock_nest_lock);
 
index 5526b46aba9457598bd091f55863da63fce26aa5..fdd23cdb53f3caa8a3ba563cf36acc744cbcb21c 100644 (file)
@@ -36,12 +36,12 @@ static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(kernel_flag);
  * If it successfully gets the lock, it should increment
  * the preemption count like any spinlock does.
  *
- * (This works on UP too - _raw_spin_trylock will never
+ * (This works on UP too - do_raw_spin_trylock will never
  * return false in that case)
  */
 int __lockfunc __reacquire_kernel_lock(void)
 {
-       while (!_raw_spin_trylock(&kernel_flag)) {
+       while (!do_raw_spin_trylock(&kernel_flag)) {
                if (need_resched())
                        return -EAGAIN;
                cpu_relax();
@@ -52,27 +52,27 @@ int __lockfunc __reacquire_kernel_lock(void)
 
 void __lockfunc __release_kernel_lock(void)
 {
-       _raw_spin_unlock(&kernel_flag);
+       do_raw_spin_unlock(&kernel_flag);
        preempt_enable_no_resched();
 }
 
 /*
  * These are the BKL spinlocks - we try to be polite about preemption.
  * If SMP is not on (ie UP preemption), this all goes away because the
- * _raw_spin_trylock() will always succeed.
+ * do_raw_spin_trylock() will always succeed.
  */
 #ifdef CONFIG_PREEMPT
 static inline void __lock_kernel(void)
 {
        preempt_disable();
-       if (unlikely(!_raw_spin_trylock(&kernel_flag))) {
+       if (unlikely(!do_raw_spin_trylock(&kernel_flag))) {
                /*
                 * If preemption was disabled even before this
                 * was called, there's nothing we can be polite
                 * about - just spin.
                 */
                if (preempt_count() > 1) {
-                       _raw_spin_lock(&kernel_flag);
+                       do_raw_spin_lock(&kernel_flag);
                        return;
                }
 
@@ -85,7 +85,7 @@ static inline void __lock_kernel(void)
                        while (spin_is_locked(&kernel_flag))
                                cpu_relax();
                        preempt_disable();
-               } while (!_raw_spin_trylock(&kernel_flag));
+               } while (!do_raw_spin_trylock(&kernel_flag));
        }
 }
 
@@ -96,7 +96,7 @@ static inline void __lock_kernel(void)
  */
 static inline void __lock_kernel(void)
 {
-       _raw_spin_lock(&kernel_flag);
+       do_raw_spin_lock(&kernel_flag);
 }
 #endif
 
@@ -106,7 +106,7 @@ static inline void __unlock_kernel(void)
         * the BKL is not covered by lockdep, so we open-code the
         * unlocking sequence (and thus avoid the dep-chain ops):
         */
-       _raw_spin_unlock(&kernel_flag);
+       do_raw_spin_unlock(&kernel_flag);
        preempt_enable();
 }
 
index e705848cc33c3482c0d36fe8d8425c4c6bd893e1..4755b98b6dfb83b01055a1856739b7a805839466 100644 (file)
@@ -125,7 +125,7 @@ static void __spin_lock_debug(raw_spinlock_t *lock)
        }
 }
 
-void _raw_spin_lock(raw_spinlock_t *lock)
+void do_raw_spin_lock(raw_spinlock_t *lock)
 {
        debug_spin_lock_before(lock);
        if (unlikely(!arch_spin_trylock(&lock->raw_lock)))
@@ -133,7 +133,7 @@ void _raw_spin_lock(raw_spinlock_t *lock)
        debug_spin_lock_after(lock);
 }
 
-int _raw_spin_trylock(raw_spinlock_t *lock)
+int do_raw_spin_trylock(raw_spinlock_t *lock)
 {
        int ret = arch_spin_trylock(&lock->raw_lock);
 
@@ -148,7 +148,7 @@ int _raw_spin_trylock(raw_spinlock_t *lock)
        return ret;
 }
 
-void _raw_spin_unlock(raw_spinlock_t *lock)
+void do_raw_spin_unlock(raw_spinlock_t *lock)
 {
        debug_spin_unlock(lock);
        arch_spin_unlock(&lock->raw_lock);
@@ -193,13 +193,13 @@ static void __read_lock_debug(rwlock_t *lock)
 }
 #endif
 
-void _raw_read_lock(rwlock_t *lock)
+void do_raw_read_lock(rwlock_t *lock)
 {
        RWLOCK_BUG_ON(lock->magic != RWLOCK_MAGIC, lock, "bad magic");
        arch_read_lock(&lock->raw_lock);
 }
 
-int _raw_read_trylock(rwlock_t *lock)
+int do_raw_read_trylock(rwlock_t *lock)
 {
        int ret = arch_read_trylock(&lock->raw_lock);
 
@@ -212,7 +212,7 @@ int _raw_read_trylock(rwlock_t *lock)
        return ret;
 }
 
-void _raw_read_unlock(rwlock_t *lock)
+void do_raw_read_unlock(rwlock_t *lock)
 {
        RWLOCK_BUG_ON(lock->magic != RWLOCK_MAGIC, lock, "bad magic");
        arch_read_unlock(&lock->raw_lock);
@@ -268,14 +268,14 @@ static void __write_lock_debug(rwlock_t *lock)
 }
 #endif
 
-void _raw_write_lock(rwlock_t *lock)
+void do_raw_write_lock(rwlock_t *lock)
 {
        debug_write_lock_before(lock);
        arch_write_lock(&lock->raw_lock);
        debug_write_lock_after(lock);
 }
 
-int _raw_write_trylock(rwlock_t *lock)
+int do_raw_write_trylock(rwlock_t *lock)
 {
        int ret = arch_write_trylock(&lock->raw_lock);
 
@@ -290,7 +290,7 @@ int _raw_write_trylock(rwlock_t *lock)
        return ret;
 }
 
-void _raw_write_unlock(rwlock_t *lock)
+void do_raw_write_unlock(rwlock_t *lock)
 {
        debug_write_unlock(lock);
        arch_write_unlock(&lock->raw_lock);