Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / linux / spinlock_types_nort.h
1 #ifndef __LINUX_SPINLOCK_TYPES_NORT_H
2 #define __LINUX_SPINLOCK_TYPES_NORT_H
3
4 #ifndef __LINUX_SPINLOCK_TYPES_H
5 #error "Do not include directly. Include spinlock_types.h instead"
6 #endif
7
8 /*
9  * The non RT version maps spinlocks to raw_spinlocks
10  */
11 typedef struct spinlock {
12         union {
13                 struct raw_spinlock rlock;
14
15 #ifdef CONFIG_DEBUG_LOCK_ALLOC
16 # define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map))
17                 struct {
18                         u8 __padding[LOCK_PADSIZE];
19                         struct lockdep_map dep_map;
20                 };
21 #endif
22         };
23 } spinlock_t;
24
25 #define __SPIN_LOCK_INITIALIZER(lockname) \
26         { { .rlock = __RAW_SPIN_LOCK_INITIALIZER(lockname) } }
27
28 #define __SPIN_LOCK_UNLOCKED(lockname) \
29         (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
30
31 #define DEFINE_SPINLOCK(x)      spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
32
33 #endif