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/byteorder.h>
7 #include <asm/spinlock_types.h>
10 * The queue read/write lock data structure
13 typedef struct qrwlock
{
17 #ifdef __LITTLE_ENDIAN
18 u8 wlocked
; /* Locked for write? */
22 u8 wlocked
; /* Locked for write? */
26 arch_spinlock_t wait_lock
;
29 #define __ARCH_RW_LOCK_UNLOCKED { \
30 { .cnts = ATOMIC_INIT(0), }, \
31 .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
34 #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */