]> Git Repo - linux.git/blob - include/asm-generic/qrwlock_types.h
x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized
[linux.git] / include / asm-generic / qrwlock_types.h
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         union {
13                 atomic_t cnts;
14                 struct {
15 #ifdef __LITTLE_ENDIAN
16                         u8 wlocked;     /* Locked for write? */
17                         u8 __lstate[3];
18 #else
19                         u8 __lstate[3];
20                         u8 wlocked;     /* Locked for write? */
21 #endif
22                 };
23         };
24         arch_spinlock_t         wait_lock;
25 } arch_rwlock_t;
26
27 #define __ARCH_RW_LOCK_UNLOCKED {               \
28         { .cnts = ATOMIC_INIT(0), },            \
29         .wait_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
30 }
31
32 #endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */
This page took 0.040593 seconds and 4 git commands to generate.