spinlock.h 822 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1999, 2000, 06 Ralf Baechle ([email protected])
  7. * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  8. */
  9. #ifndef _ASM_SPINLOCK_H
  10. #define _ASM_SPINLOCK_H
  11. #include <asm/processor.h>
  12. #include <asm-generic/qspinlock_types.h>
  13. #define queued_spin_unlock queued_spin_unlock
  14. /**
  15. * queued_spin_unlock - release a queued spinlock
  16. * @lock : Pointer to queued spinlock structure
  17. */
  18. static inline void queued_spin_unlock(struct qspinlock *lock)
  19. {
  20. /* This could be optimised with ARCH_HAS_MMIOWB */
  21. mmiowb();
  22. smp_store_release(&lock->locked, 0);
  23. }
  24. #include <asm/qspinlock.h>
  25. #include <asm/qrwlock.h>
  26. #endif /* _ASM_SPINLOCK_H */