pthread_self
호출된 thread에서 thread_id 를 구하는 방법 #include #include #include pthread_mutex_t g_NONSTOP; void *t_func(void *data){ int id; id = *((int *)data); pthread_t self = pthread_self(); printf("[in thr] pthread_self:%x\n", self); while(1) { //printf("(%lu) [%d]\n",pthread_self(), id); }} int main(){ pthread_t tid; int a = 1; int thr_id; int status; thr_id = pthread_create(&tid, NULL, t_func, (void*)&a); pri..