qrwlock_types.h 431 B

123456789101112131415161718192021
  1. #ifndef __ASM_GENERIC_QRWLOCK_TYPES_H
  2. #define __ASM_GENERIC_QRWLOCK_TYPES_H
  3. #include <linux/types.h>
  4. #include <asm/spinlock_types.h>
  5. /*
  6. * The queue read/write lock data structure
  7. */
  8. typedef struct qrwlock {
  9. atomic_t cnts;
  10. arch_spinlock_t wait_lock;
  11. } arch_rwlock_t;
  12. #define __ARCH_RW_LOCK_UNLOCKED { \
  13. .cnts = ATOMIC_INIT(0), \
  14. .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
  15. }
  16. #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */