diff options
author | Luck, Tony <tony.luck@intel.com> | 2013-09-03 15:31:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 17:18:56 -0700 |
commit | 71c7356f864dc41e4bd6b884596a422f8954afe0 (patch) | |
tree | 9a5d09111a37dd40149d676fa87892068f27d530 /arch/ia64/include | |
parent | 977dbfcf8e9ff1783355b260d93101af315de18a (diff) | |
download | linux-71c7356f864dc41e4bd6b884596a422f8954afe0.tar.bz2 |
lockref: Implement lockref for Itanium
All the cool kids are doing this, join in the fun.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/include')
-rw-r--r-- | arch/ia64/include/asm/spinlock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h index 54ff557d474e..45698cd15b7b 100644 --- a/arch/ia64/include/asm/spinlock.h +++ b/arch/ia64/include/asm/spinlock.h @@ -102,6 +102,11 @@ static inline int __ticket_spin_is_contended(arch_spinlock_t *lock) return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1; } +static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) +{ + return !(((lock.lock >> TICKET_SHIFT) ^ lock.lock) & TICKET_MASK); +} + static inline int arch_spin_is_locked(arch_spinlock_t *lock) { return __ticket_spin_is_locked(lock); |