Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: a25f0944ba9b1d8a6813fd6f1a86f1bd59ac25a6 authored by Linus Torvalds on 13 November 2016, 18:32:32 UTC
Linux 4.9-rc5
Tip revision: a25f094
qrwlock_types.h
#ifndef __ASM_GENERIC_QRWLOCK_TYPES_H
#define __ASM_GENERIC_QRWLOCK_TYPES_H

#include <linux/types.h>
#include <asm/spinlock_types.h>

/*
 * The queue read/write lock data structure
 */

typedef struct qrwlock {
	atomic_t		cnts;
	arch_spinlock_t		wait_lock;
} arch_rwlock_t;

#define	__ARCH_RW_LOCK_UNLOCKED {		\
	.cnts = ATOMIC_INIT(0),			\
	.wait_lock = __ARCH_SPIN_LOCK_UNLOCKED,	\
}

#endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */
back to top