how to get a thread's ID in c/c++ gnu, gettid() is not implemented
pid_t gettid(void);
can be replaced by the following system call :
#include < syscall.h >
pid_t tid = (pid_t) syscall (SYS_gettid);
can be replaced by the following system call :
#include < syscall.h >
pid_t tid = (pid_t) syscall (SYS_gettid);
Thread ids obtained from pthread_self() are in a different format..
...
No comments:
Post a Comment