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/parisc/include/asm/spinlock.h | |
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/parisc/include/asm/spinlock.h')
-rw-r--r-- | arch/parisc/include/asm/spinlock.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/parisc/include/asm/spinlock.h b/arch/parisc/include/asm/spinlock.h index 1ff3a0a94a43..74036f436a3b 100644 --- a/arch/parisc/include/asm/spinlock.h +++ b/arch/parisc/include/asm/spinlock.h | |||
@@ -69,7 +69,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *x) | |||
69 | 69 | ||
70 | /* Note that we have to ensure interrupts are disabled in case we're | 70 | /* Note that we have to ensure interrupts are disabled in case we're |
71 | * interrupted by some other code that wants to grab the same read lock */ | 71 | * interrupted by some other code that wants to grab the same read lock */ |
72 | static __inline__ void __raw_read_lock(arch_rwlock_t *rw) | 72 | static __inline__ void arch_read_lock(arch_rwlock_t *rw) |
73 | { | 73 | { |
74 | unsigned long flags; | 74 | unsigned long flags; |
75 | local_irq_save(flags); | 75 | local_irq_save(flags); |
@@ -81,7 +81,7 @@ static __inline__ void __raw_read_lock(arch_rwlock_t *rw) | |||
81 | 81 | ||
82 | /* Note that we have to ensure interrupts are disabled in case we're | 82 | /* Note that we have to ensure interrupts are disabled in case we're |
83 | * interrupted by some other code that wants to grab the same read lock */ | 83 | * interrupted by some other code that wants to grab the same read lock */ |
84 | static __inline__ void __raw_read_unlock(arch_rwlock_t *rw) | 84 | static __inline__ void arch_read_unlock(arch_rwlock_t *rw) |
85 | { | 85 | { |
86 | unsigned long flags; | 86 | unsigned long flags; |
87 | local_irq_save(flags); | 87 | local_irq_save(flags); |
@@ -93,7 +93,7 @@ static __inline__ void __raw_read_unlock(arch_rwlock_t *rw) | |||
93 | 93 | ||
94 | /* Note that we have to ensure interrupts are disabled in case we're | 94 | /* Note that we have to ensure interrupts are disabled in case we're |
95 | * interrupted by some other code that wants to grab the same read lock */ | 95 | * interrupted by some other code that wants to grab the same read lock */ |
96 | static __inline__ int __raw_read_trylock(arch_rwlock_t *rw) | 96 | static __inline__ int arch_read_trylock(arch_rwlock_t *rw) |
97 | { | 97 | { |
98 | unsigned long flags; | 98 | unsigned long flags; |
99 | retry: | 99 | retry: |
@@ -119,7 +119,7 @@ static __inline__ int __raw_read_trylock(arch_rwlock_t *rw) | |||
119 | 119 | ||
120 | /* Note that we have to ensure interrupts are disabled in case we're | 120 | /* Note that we have to ensure interrupts are disabled in case we're |
121 | * interrupted by some other code that wants to read_trylock() this lock */ | 121 | * interrupted by some other code that wants to read_trylock() this lock */ |
122 | static __inline__ void __raw_write_lock(arch_rwlock_t *rw) | 122 | static __inline__ void arch_write_lock(arch_rwlock_t *rw) |
123 | { | 123 | { |
124 | unsigned long flags; | 124 | unsigned long flags; |
125 | retry: | 125 | retry: |
@@ -141,7 +141,7 @@ retry: | |||
141 | local_irq_restore(flags); | 141 | local_irq_restore(flags); |
142 | } | 142 | } |
143 | 143 | ||
144 | static __inline__ void __raw_write_unlock(arch_rwlock_t *rw) | 144 | static __inline__ void arch_write_unlock(arch_rwlock_t *rw) |
145 | { | 145 | { |
146 | rw->counter = 0; | 146 | rw->counter = 0; |
147 | arch_spin_unlock(&rw->lock); | 147 | arch_spin_unlock(&rw->lock); |
@@ -149,7 +149,7 @@ static __inline__ void __raw_write_unlock(arch_rwlock_t *rw) | |||
149 | 149 | ||
150 | /* Note that we have to ensure interrupts are disabled in case we're | 150 | /* Note that we have to ensure interrupts are disabled in case we're |
151 | * interrupted by some other code that wants to read_trylock() this lock */ | 151 | * interrupted by some other code that wants to read_trylock() this lock */ |
152 | static __inline__ int __raw_write_trylock(arch_rwlock_t *rw) | 152 | static __inline__ int arch_write_trylock(arch_rwlock_t *rw) |
153 | { | 153 | { |
154 | unsigned long flags; | 154 | unsigned long flags; |
155 | int result = 0; | 155 | int result = 0; |
@@ -173,7 +173,7 @@ static __inline__ int __raw_write_trylock(arch_rwlock_t *rw) | |||
173 | * read_can_lock - would read_trylock() succeed? | 173 | * read_can_lock - would read_trylock() succeed? |
174 | * @lock: the rwlock in question. | 174 | * @lock: the rwlock in question. |
175 | */ | 175 | */ |
176 | static __inline__ int __raw_read_can_lock(arch_rwlock_t *rw) | 176 | static __inline__ int arch_read_can_lock(arch_rwlock_t *rw) |
177 | { | 177 | { |
178 | return rw->counter >= 0; | 178 | return rw->counter >= 0; |
179 | } | 179 | } |
@@ -182,13 +182,13 @@ static __inline__ int __raw_read_can_lock(arch_rwlock_t *rw) | |||
182 | * write_can_lock - would write_trylock() succeed? | 182 | * write_can_lock - would write_trylock() succeed? |
183 | * @lock: the rwlock in question. | 183 | * @lock: the rwlock in question. |
184 | */ | 184 | */ |
185 | static __inline__ int __raw_write_can_lock(arch_rwlock_t *rw) | 185 | static __inline__ int arch_write_can_lock(arch_rwlock_t *rw) |
186 | { | 186 | { |
187 | return !rw->counter; | 187 | return !rw->counter; |
188 | } | 188 | } |
189 | 189 | ||
190 | #define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) | 190 | #define arch_read_lock_flags(lock, flags) arch_read_lock(lock) |
191 | #define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) | 191 | #define arch_write_lock_flags(lock, flags) arch_write_lock(lock) |
192 | 192 | ||
193 | #define arch_spin_relax(lock) cpu_relax() | 193 | #define arch_spin_relax(lock) cpu_relax() |
194 | #define arch_read_relax(lock) cpu_relax() | 194 | #define arch_read_relax(lock) cpu_relax() |