linux kernel 에서 spinlock 관련 질문이 있습니다.
글쓴이: tooson90 / 작성시간: 토, 2015/08/29 - 12:30오전
spinlock 부분을 공부하던중 질문이 생겨 이렇게 글을 올려봅니다.
/usr/src/linux/include/linux/spinlock_types.h 에 있는
struct raw_spinlock 에서
20 typedef struct raw_spinlock {
21 arch_spinlock_t raw_lock;
22 #ifdef CONFIG_GENERIC_LOCKBREAK
23 unsigned int break_lock;
24 #endif
25 #ifdef CONFIG_DEBUG_SPINLOCK
26 unsigned int magic, owner_cpu;
27 void *owner;
28 #endif
29 #ifdef CONFIG_DEBUG_LOCK_ALLOC
30 struct lockdep_map dep_map;
31 #endif
32 } raw_spinlock_t;
raw_lock 은 architecture 별 lock 을 위한 변수이고, dep_map 은 deadlock 을 방지하기 위하 자체적으로 검사하기위한 자료구조변수
라고 들었습니다.
혹시 magic, owner_cpu, *owner, break_lock 은 무엇을 의미하는 변수인지 알수 있을까요?
감사합니다.
Forums:
댓글 달기