Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to mutex lock in c

pthread_mutex_t my_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&my_mutex);
/* locked code */
pthread_mutex_unlock(&my_mutex);
 
PREVIOUS NEXT
Tagged: #mutex #lock
ADD COMMENT
Topic
Name
2+1 =