https://github.com/torvalds/linux
Raw File
Tip revision: 6a13feb9c82803e2b815eca72fa7a9f5561d7861 authored by Linus Torvalds on 02 November 2015, 00:05:25 UTC
Linux 4.3
Tip revision: 6a13feb
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		lock;
} arch_rwlock_t;

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

#endif /* __ASM_GENERIC_QRWLOCK_TYPES_H */
back to top