Waiman Long | 70af2f8 | 2014-02-03 13:18:49 +0100 | [diff] [blame] | 1 | #ifndef __ASM_GENERIC_QRWLOCK_TYPES_H |
| 2 | #define __ASM_GENERIC_QRWLOCK_TYPES_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | #include <asm/spinlock_types.h> |
| 6 | |
| 7 | /* |
| 8 | * The queue read/write lock data structure |
| 9 | */ |
| 10 | |
| 11 | typedef struct qrwlock { |
| 12 | atomic_t cnts; |
Davidlohr Bueso | 6e1e519 | 2015-09-14 00:37:22 -0700 | [diff] [blame] | 13 | arch_spinlock_t wait_lock; |
Waiman Long | 70af2f8 | 2014-02-03 13:18:49 +0100 | [diff] [blame] | 14 | } arch_rwlock_t; |
| 15 | |
| 16 | #define __ARCH_RW_LOCK_UNLOCKED { \ |
| 17 | .cnts = ATOMIC_INIT(0), \ |
Davidlohr Bueso | 6e1e519 | 2015-09-14 00:37:22 -0700 | [diff] [blame] | 18 | .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ |
Waiman Long | 70af2f8 | 2014-02-03 13:18:49 +0100 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */ |