}
#endif
- #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
++ static inline int __ticket_spin_is_locked(raw_spinlock_t *lock)
++ {
++ int tmp = ACCESS_ONCE(lock->slock);
++
++ return !!(((tmp >> TICKET_SHIFT) ^ tmp) & ((1 << TICKET_SHIFT) - 1));
++ }
++
++ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock)
++ {
++ int tmp = ACCESS_ONCE(lock->slock);
++
++ return (((tmp >> TICKET_SHIFT) - tmp) & ((1 << TICKET_SHIFT) - 1)) > 1;
++ }
+
-#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
-
#ifdef CONFIG_PARAVIRT
/*
* Define virtualization-friendly old-style lock byte lock, for use in