pthread_self() doesn't return a meaningful thread id?
https://stackoverflow.com/questions/44776152/pthread-self-doesnt-return-a-meaningful-thread-id
WEBJun 27, 2017 · 1. int systid=syscall(186); int pt_tid=pthread_self(); pid_t id=getpid(); printf("pid=%d,tid=%d,pt_tid=%d\n",id,systid,pt_tid); return 0; I was running this program on RHEL 5 with gcc4.1.2. Seems the syscall can give the correct thread id (same like process id), but pthread_self doesn't give meaningful result.
DA: 14 PA: 82 MOZ Rank: 17