Linux 4.14.5
[linux/fpc-iii.git] / include / asm-generic / qrwlock_types.h
blobd93573eff16294aa1a9efa0a79a1f428ddd08c23
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_GENERIC_QRWLOCK_TYPES_H
3 #define __ASM_GENERIC_QRWLOCK_TYPES_H
5 #include <linux/types.h>
6 #include <asm/spinlock_types.h>
8 /*
9 * The queue read/write lock data structure
12 typedef struct qrwlock {
13 atomic_t cnts;
14 arch_spinlock_t wait_lock;
15 } arch_rwlock_t;
17 #define __ARCH_RW_LOCK_UNLOCKED { \
18 .cnts = ATOMIC_INIT(0), \
19 .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
22 #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */