diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-03 14:08:46 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:32 -0500 |
commit | e5931943d02bf751b1ec849c0d2ade23d76a8d41 (patch) | |
tree | 119fe3bc583d0d043d97cb9edd98bad52692a546 /arch/alpha/include | |
parent | fb3a6bbc912b12347614e5742c7c61416cdb0ca0 (diff) |
locking: Convert raw_rwlock functions to arch_rwlock
Name space cleanup for rwlock functions. No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
Diffstat (limited to 'arch/alpha/include')
-rw-r--r-- | arch/alpha/include/asm/spinlock.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h index e8b2970f037b..d0faca1e992d 100644 --- a/arch/alpha/include/asm/spinlock.h +++ b/arch/alpha/include/asm/spinlock.h | |||
@@ -50,17 +50,17 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) | |||
50 | 50 | ||
51 | /***********************************************************/ | 51 | /***********************************************************/ |
52 | 52 | ||
53 | static inline int __raw_read_can_lock(arch_rwlock_t *lock) | 53 | static inline int arch_read_can_lock(arch_rwlock_t *lock) |
54 | { | 54 | { |
55 | return (lock->lock & 1) == 0; | 55 | return (lock->lock & 1) == 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int __raw_write_can_lock(arch_rwlock_t *lock) | 58 | static inline int arch_write_can_lock(arch_rwlock_t *lock) |
59 | { | 59 | { |
60 | return lock->lock == 0; | 60 | return lock->lock == 0; |
61 | } | 61 | } |
62 | 62 | ||
63 | static inline void __raw_read_lock(arch_rwlock_t *lock) | 63 | static inline void arch_read_lock(arch_rwlock_t *lock) |
64 | { | 64 | { |
65 | long regx; | 65 | long regx; |
66 | 66 | ||
@@ -80,7 +80,7 @@ static inline void __raw_read_lock(arch_rwlock_t *lock) | |||
80 | : "m" (*lock) : "memory"); | 80 | : "m" (*lock) : "memory"); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline void __raw_write_lock(arch_rwlock_t *lock) | 83 | static inline void arch_write_lock(arch_rwlock_t *lock) |
84 | { | 84 | { |
85 | long regx; | 85 | long regx; |
86 | 86 | ||
@@ -100,7 +100,7 @@ static inline void __raw_write_lock(arch_rwlock_t *lock) | |||
100 | : "m" (*lock) : "memory"); | 100 | : "m" (*lock) : "memory"); |
101 | } | 101 | } |
102 | 102 | ||
103 | static inline int __raw_read_trylock(arch_rwlock_t * lock) | 103 | static inline int arch_read_trylock(arch_rwlock_t * lock) |
104 | { | 104 | { |
105 | long regx; | 105 | long regx; |
106 | int success; | 106 | int success; |
@@ -122,7 +122,7 @@ static inline int __raw_read_trylock(arch_rwlock_t * lock) | |||
122 | return success; | 122 | return success; |
123 | } | 123 | } |
124 | 124 | ||
125 | static inline int __raw_write_trylock(arch_rwlock_t * lock) | 125 | static inline int arch_write_trylock(arch_rwlock_t * lock) |
126 | { | 126 | { |
127 | long regx; | 127 | long regx; |
128 | int success; | 128 | int success; |
@@ -144,7 +144,7 @@ static inline int __raw_write_trylock(arch_rwlock_t * lock) | |||
144 | return success; | 144 | return success; |
145 | } | 145 | } |
146 | 146 | ||
147 | static inline void __raw_read_unlock(arch_rwlock_t * lock) | 147 | static inline void arch_read_unlock(arch_rwlock_t * lock) |
148 | { | 148 | { |
149 | long regx; | 149 | long regx; |
150 | __asm__ __volatile__( | 150 | __asm__ __volatile__( |
@@ -160,14 +160,14 @@ static inline void __raw_read_unlock(arch_rwlock_t * lock) | |||
160 | : "m" (*lock) : "memory"); | 160 | : "m" (*lock) : "memory"); |
161 | } | 161 | } |
162 | 162 | ||
163 | static inline void __raw_write_unlock(arch_rwlock_t * lock) | 163 | static inline void arch_write_unlock(arch_rwlock_t * lock) |
164 | { | 164 | { |
165 | mb(); | 165 | mb(); |
166 | lock->lock = 0; | 166 | lock->lock = 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) | 169 | #define arch_read_lock_flags(lock, flags) arch_read_lock(lock) |
170 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) | 170 | #define arch_write_lock_flags(lock, flags) arch_write_lock(lock) |
171 | 171 | ||
172 | #define arch_spin_relax(lock) cpu_relax() | 172 | #define arch_spin_relax(lock) cpu_relax() |
173 | #define arch_read_relax(lock) cpu_relax() | 173 | #define arch_read_relax(lock) cpu_relax() |