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>
9 * The queue read/write lock data structure
12 typedef struct qrwlock
{
16 #ifdef __LITTLE_ENDIAN
17 u8 wlocked
; /* Locked for write? */
21 u8 wlocked
; /* Locked for write? */
25 arch_spinlock_t wait_lock
;
28 #define __ARCH_RW_LOCK_UNLOCKED { \
29 { .cnts = ATOMIC_INIT(0), }, \
30 .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
33 #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */