]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/asm-generic/qrwlock_types.h
UBUNTU: [Config] CONFIG_MMC_BCM2835_DMA=y | CONFIG_MMC_BCM2835_MMC=y
[mirror_ubuntu-artful-kernel.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 */