mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
6e1e519697
... trivial, but reads a little nicer when we name our actual primitive 'lock'. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <Waiman.Long@hpe.com> Link: http://lkml.kernel.org/r/1442216244-4409-1-git-send-email-dave@stgolabs.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
21 lines
431 B
C
21 lines
431 B
C
#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 */
|