gettid - get current thread ID
#include <unistd.h>
int gettid();
Returns the TID (thread ID) of the calling thread. The first thread in a process has the same TID and PID. Subsequently spawned threads will have unique thread ID's, but all share the same PID.
The thread ID of the calling thread.
None.
getpid
(2)getppid
(2)