diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-03 14:01:19 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:32 -0500 |
commit | fb3a6bbc912b12347614e5742c7c61416cdb0ca0 (patch) | |
tree | f9dbf8dab23cea6f033a58672ba16abf2ae09ebd /arch/s390/include/asm/spinlock.h | |
parent | 0199c4e68d1f02894bdefe4b5d9e9ee4aedd8d62 (diff) |
locking: Convert raw_rwlock to arch_rwlock
Not strictly necessary for -rt as -rt does not have non sleeping
rwlocks, but it's odd to not have a consistent naming convention.
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/s390/include/asm/spinlock.h')
-rw-r--r-- | arch/s390/include/asm/spinlock.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h index a94c146657a9..7f98f0e48acb 100644 --- a/arch/s390/include/asm/spinlock.h +++ b/arch/s390/include/asm/spinlock.h | |||
@@ -121,14 +121,14 @@ static inline void arch_spin_unlock(arch_spinlock_t *lp) | |||
121 | */ | 121 | */ |
122 | #define __raw_write_can_lock(x) ((x)->lock == 0) | 122 | #define __raw_write_can_lock(x) ((x)->lock == 0) |
123 | 123 | ||
124 | extern void _raw_read_lock_wait(raw_rwlock_t *lp); | 124 | extern void _raw_read_lock_wait(arch_rwlock_t *lp); |
125 | extern void _raw_read_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); | 125 | extern void _raw_read_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags); |
126 | extern int _raw_read_trylock_retry(raw_rwlock_t *lp); | 126 | extern int _raw_read_trylock_retry(arch_rwlock_t *lp); |
127 | extern void _raw_write_lock_wait(raw_rwlock_t *lp); | 127 | extern void _raw_write_lock_wait(arch_rwlock_t *lp); |
128 | extern void _raw_write_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); | 128 | extern void _raw_write_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags); |
129 | extern int _raw_write_trylock_retry(raw_rwlock_t *lp); | 129 | extern int _raw_write_trylock_retry(arch_rwlock_t *lp); |
130 | 130 | ||
131 | static inline void __raw_read_lock(raw_rwlock_t *rw) | 131 | static inline void __raw_read_lock(arch_rwlock_t *rw) |
132 | { | 132 | { |
133 | unsigned int old; | 133 | unsigned int old; |
134 | old = rw->lock & 0x7fffffffU; | 134 | old = rw->lock & 0x7fffffffU; |
@@ -136,7 +136,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
136 | _raw_read_lock_wait(rw); | 136 | _raw_read_lock_wait(rw); |
137 | } | 137 | } |
138 | 138 | ||
139 | static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags) | 139 | static inline void __raw_read_lock_flags(arch_rwlock_t *rw, unsigned long flags) |
140 | { | 140 | { |
141 | unsigned int old; | 141 | unsigned int old; |
142 | old = rw->lock & 0x7fffffffU; | 142 | old = rw->lock & 0x7fffffffU; |
@@ -144,7 +144,7 @@ static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags) | |||
144 | _raw_read_lock_wait_flags(rw, flags); | 144 | _raw_read_lock_wait_flags(rw, flags); |
145 | } | 145 | } |
146 | 146 | ||
147 | static inline void __raw_read_unlock(raw_rwlock_t *rw) | 147 | static inline void __raw_read_unlock(arch_rwlock_t *rw) |
148 | { | 148 | { |
149 | unsigned int old, cmp; | 149 | unsigned int old, cmp; |
150 | 150 | ||
@@ -155,24 +155,24 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
155 | } while (cmp != old); | 155 | } while (cmp != old); |
156 | } | 156 | } |
157 | 157 | ||
158 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 158 | static inline void __raw_write_lock(arch_rwlock_t *rw) |
159 | { | 159 | { |
160 | if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) | 160 | if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) |
161 | _raw_write_lock_wait(rw); | 161 | _raw_write_lock_wait(rw); |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline void __raw_write_lock_flags(raw_rwlock_t *rw, unsigned long flags) | 164 | static inline void __raw_write_lock_flags(arch_rwlock_t *rw, unsigned long flags) |
165 | { | 165 | { |
166 | if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) | 166 | if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) |
167 | _raw_write_lock_wait_flags(rw, flags); | 167 | _raw_write_lock_wait_flags(rw, flags); |
168 | } | 168 | } |
169 | 169 | ||
170 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 170 | static inline void __raw_write_unlock(arch_rwlock_t *rw) |
171 | { | 171 | { |
172 | _raw_compare_and_swap(&rw->lock, 0x80000000, 0); | 172 | _raw_compare_and_swap(&rw->lock, 0x80000000, 0); |
173 | } | 173 | } |
174 | 174 | ||
175 | static inline int __raw_read_trylock(raw_rwlock_t *rw) | 175 | static inline int __raw_read_trylock(arch_rwlock_t *rw) |
176 | { | 176 | { |
177 | unsigned int old; | 177 | unsigned int old; |
178 | old = rw->lock & 0x7fffffffU; | 178 | old = rw->lock & 0x7fffffffU; |
@@ -181,7 +181,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) | |||
181 | return _raw_read_trylock_retry(rw); | 181 | return _raw_read_trylock_retry(rw); |
182 | } | 182 | } |
183 | 183 | ||
184 | static inline int __raw_write_trylock(raw_rwlock_t *rw) | 184 | static inline int __raw_write_trylock(arch_rwlock_t *rw) |
185 | { | 185 | { |
186 | if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)) | 186 | if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)) |
187 | return 1; | 187 | return 1; |