2011-10-31 2 views

답변

9

pthread_mutex_* 함수는 사용자 공간 전용 호출이므로 사용할 수 없습니다. 당신이 제공하는 링크가 나에게 매우 유용합니다

struct mutex my_mutex; /* shared between the threads */ 

mutex_init(&my_mutex); /* called only ONCE */ 

/* inside a thread */ 
mutex_lock(&my_lock); 
/* do the work with the data you're protecting */ 
mutex_unlock(&my_lock); 
+1

를 대단히 감사합니다 : 커널에서 linux/mutex.h하여 뮤텍스가 제공하는 사용을 사용! –

관련 문제