mcs_spinlock.h 402 B

12345678910111213141516171819
  1. #ifndef __ASM_MCS_SPINLOCK_H
  2. #define __ASM_MCS_SPINLOCK_H
  3. struct mcs_spinlock {
  4. struct mcs_spinlock *next;
  5. int locked; /* 1 if lock acquired */
  6. int count; /* nesting count, see qspinlock.c */
  7. };
  8. /*
  9. * Architectures can define their own:
  10. *
  11. * arch_mcs_spin_lock_contended(l)
  12. * arch_mcs_spin_unlock_contended(l)
  13. *
  14. * See kernel/locking/mcs_spinlock.c.
  15. */
  16. #endif /* __ASM_MCS_SPINLOCK_H */