I came across a concept in Advanced Linux Programming. Here\'s a link: refer to 4.5 GNU/Linux Thread Implementation.
I\'m clear wit
In linux, as the author pointed out, threads are light-weight processes sharing the same address space. Each process has a unique PID, while each thread has a thread id TID. The thread ID of the main thread serves a dual purpose as its processId also. To get the threadID of the calling thread, you can use the pthread_self() function.