Why do you think so? pid is allocated by pid types. ie. pid is allocated differently for process (i mean those created with CLONE_THREAD) and threads. so they are so different.
#include <stdio.h> #include <pthread.h> int main() { printf("main pid: %u\n", getpid()); printf("main thread id: %u\n", pthread_self()); return 0; } As we know, the tid is the first thread's pid, but the above progrom prints two different number, how's that? -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/