forked from luck/tmp_suning_uos_patched
locking, powerpc: Rename __spin_try_lock() and friends
Needed to avoid namespace conflicts when the common code function bodies of _spin_try_lock() etc. are moved to a header file where the function name would be __spin_try_lock(). Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Horst Hartmann <horsth@linux.vnet.ibm.com> Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: David Miller <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: <linux-arch@vger.kernel.org> LKML-Reference: <20090831124415.918799705@de.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
bbe69aa57a
commit
8307a98097
@ -54,7 +54,7 @@
|
||||
* This returns the old value in the lock, so we succeeded
|
||||
* in getting the lock if the return value is 0.
|
||||
*/
|
||||
static inline unsigned long __spin_trylock(raw_spinlock_t *lock)
|
||||
static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock)
|
||||
{
|
||||
unsigned long tmp, token;
|
||||
|
||||
@ -76,7 +76,7 @@ static inline unsigned long __spin_trylock(raw_spinlock_t *lock)
|
||||
static inline int __raw_spin_trylock(raw_spinlock_t *lock)
|
||||
{
|
||||
CLEAR_IO_SYNC;
|
||||
return __spin_trylock(lock) == 0;
|
||||
return arch_spin_trylock(lock) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -108,7 +108,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
|
||||
{
|
||||
CLEAR_IO_SYNC;
|
||||
while (1) {
|
||||
if (likely(__spin_trylock(lock) == 0))
|
||||
if (likely(arch_spin_trylock(lock) == 0))
|
||||
break;
|
||||
do {
|
||||
HMT_low();
|
||||
@ -126,7 +126,7 @@ void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
|
||||
|
||||
CLEAR_IO_SYNC;
|
||||
while (1) {
|
||||
if (likely(__spin_trylock(lock) == 0))
|
||||
if (likely(arch_spin_trylock(lock) == 0))
|
||||
break;
|
||||
local_save_flags(flags_dis);
|
||||
local_irq_restore(flags);
|
||||
@ -181,7 +181,7 @@ extern void __raw_spin_unlock_wait(raw_spinlock_t *lock);
|
||||
* This returns the old value in the lock + 1,
|
||||
* so we got a read lock if the return value is > 0.
|
||||
*/
|
||||
static inline long __read_trylock(raw_rwlock_t *rw)
|
||||
static inline long arch_read_trylock(raw_rwlock_t *rw)
|
||||
{
|
||||
long tmp;
|
||||
|
||||
@ -205,7 +205,7 @@ static inline long __read_trylock(raw_rwlock_t *rw)
|
||||
* This returns the old value in the lock,
|
||||
* so we got the write lock if the return value is 0.
|
||||
*/
|
||||
static inline long __write_trylock(raw_rwlock_t *rw)
|
||||
static inline long arch_write_trylock(raw_rwlock_t *rw)
|
||||
{
|
||||
long tmp, token;
|
||||
|
||||
@ -228,7 +228,7 @@ static inline long __write_trylock(raw_rwlock_t *rw)
|
||||
static inline void __raw_read_lock(raw_rwlock_t *rw)
|
||||
{
|
||||
while (1) {
|
||||
if (likely(__read_trylock(rw) > 0))
|
||||
if (likely(arch_read_trylock(rw) > 0))
|
||||
break;
|
||||
do {
|
||||
HMT_low();
|
||||
@ -242,7 +242,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
|
||||
static inline void __raw_write_lock(raw_rwlock_t *rw)
|
||||
{
|
||||
while (1) {
|
||||
if (likely(__write_trylock(rw) == 0))
|
||||
if (likely(arch_write_trylock(rw) == 0))
|
||||
break;
|
||||
do {
|
||||
HMT_low();
|
||||
@ -255,12 +255,12 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
|
||||
|
||||
static inline int __raw_read_trylock(raw_rwlock_t *rw)
|
||||
{
|
||||
return __read_trylock(rw) > 0;
|
||||
return arch_read_trylock(rw) > 0;
|
||||
}
|
||||
|
||||
static inline int __raw_write_trylock(raw_rwlock_t *rw)
|
||||
{
|
||||
return __write_trylock(rw) == 0;
|
||||
return arch_write_trylock(rw) == 0;
|
||||
}
|
||||
|
||||
static inline void __raw_read_unlock(raw_rwlock_t *rw)
|
||||
|
Loading…
Reference in New Issue
Block a user