typedef struct spinlock { union { struct raw_spinlock rlock;
#ifdef CONFIG_DEBUG_LOCK_ALLOC
# define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map))
struct { u8 __padding[LOCK_PADSIZE];
struct lockdep_map dep_map;
spinlock_t s; のとき s.rawlock.dep_map と s.dep_map は一緒の領域を指す。
}; #endif }; } spinlock_t;