diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-24 23:52:27 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-24 23:52:27 +0300 |
commit | 87b203079ed949de52f0d92aeae20e5e0116c12f (patch) | |
tree | 1878756f936963822ed2d51a15db1da5814973e7 /arch/x86/include/asm/spinlock.h | |
parent | 58105ef1857112a186696c9b8957020090226a28 (diff) | |
parent | a852cbfaaf8122827602027b1614971cfd832304 (diff) | |
download | linux-87b203079ed949de52f0d92aeae20e5e0116c12f.tar.xz |
Merge branch 'x86/core' into core/percpu
Diffstat (limited to 'arch/x86/include/asm/spinlock.h')
-rw-r--r-- | arch/x86/include/asm/spinlock.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index 2bd6b111a414..3a5696656680 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h @@ -183,6 +183,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) { return __ticket_spin_is_contended(lock); } +#define __raw_spin_is_contended __raw_spin_is_contended static __always_inline void __raw_spin_lock(raw_spinlock_t *lock) { @@ -267,8 +268,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock) { atomic_t *count = (atomic_t *)lock; - atomic_dec(count); - if (atomic_read(count) >= 0) + if (atomic_dec_return(count) >= 0) return 1; atomic_inc(count); return 0; |