summaryrefslogtreecommitdiff
path: root/arch/alpha/include/asm/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/include/asm/spinlock.h')
-rw-r--r--arch/alpha/include/asm/spinlock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h
index 37b570d01202..fed9c6f44c19 100644
--- a/arch/alpha/include/asm/spinlock.h
+++ b/arch/alpha/include/asm/spinlock.h
@@ -16,6 +16,11 @@
#define arch_spin_unlock_wait(x) \
do { cpu_relax(); } while ((x)->lock)
+static inline int arch_spin_value_unlocked(arch_spinlock_t lock)
+{
+ return lock.lock == 0;
+}
+
static inline void arch_spin_unlock(arch_spinlock_t * lock)
{
mb();