X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Finclude%2Fasm%2Fspinlock.h;h=bf156ded74b56006a76cc02b8917984117af8afd;hb=816434ec4a674fcdb3c2221a6dffdc8f34020550;hp=d68883dd133c28f8ab6b25ebe3b02ae647940726;hpb=36bd621337c91a1ecda588e5bbbae8dd9698bae7;p=pandora-kernel.git diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index d68883dd133c..bf156ded74b5 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h @@ -62,6 +62,11 @@ static inline void __ticket_unlock_kick(arch_spinlock_t *lock, #endif /* CONFIG_PARAVIRT_SPINLOCKS */ +static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) +{ + return lock.tickets.head == lock.tickets.tail; +} + /* * Ticket locks are conceptually two parts, one indicating the current head of * the queue, and the other indicating the current tail. The lock is acquired @@ -279,8 +284,4 @@ static inline void arch_write_unlock(arch_rwlock_t *rw) #define arch_read_relax(lock) cpu_relax() #define arch_write_relax(lock) cpu_relax() -/* The {read|write|spin}_lock() on x86 are full memory barriers. */ -static inline void smp_mb__after_lock(void) { } -#define ARCH_HAS_SMP_MB_AFTER_LOCK - #endif /* _ASM_X86_SPINLOCK_H */