Merge branches 'core/signal' and 'x86/spinlocks' into x86/xen
authorIngo Molnar <mingo@elte.hu>
Sun, 12 Oct 2008 11:20:25 +0000 (13:20 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 12 Oct 2008 11:20:25 +0000 (13:20 +0200)
Conflicts:
include/asm-x86/spinlock.h

1  2  3 
arch/x86/kernel/process_64.c
include/asm-x86/spinlock.h

Simple merge
index 8badab09146b732d0e2e3be48f618563f725de18,93adae338ac64625ab1c1ec63634edd8c3d8dcd3,b5a4551fd5652c619fc4d36f74e9685e3c7197d6..157ff7fab97aba964216472e6f67aac147e3b901
@@@@ -182,6 -182,8 -158,22 +158,20 @@@@ static __always_inline void __ticket_sp
   }
   #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