1 #ifndef __LINUX_SPINLOCK_TYPES_NORT_H
2 #define __LINUX_SPINLOCK_TYPES_NORT_H
4 #ifndef __LINUX_SPINLOCK_TYPES_H
5 #error "Do not include directly. Include spinlock_types.h instead"
9 * The non RT version maps spinlocks to raw_spinlocks
11 typedef struct spinlock {
13 struct raw_spinlock rlock;
15 #ifdef CONFIG_DEBUG_LOCK_ALLOC
16 # define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map))
18 u8 __padding[LOCK_PADSIZE];
19 struct lockdep_map dep_map;
25 #define __SPIN_LOCK_INITIALIZER(lockname) \
26 { { .rlock = __RAW_SPIN_LOCK_INITIALIZER(lockname) } }
28 #define __SPIN_LOCK_UNLOCKED(lockname) \
29 (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
31 #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)