Hi, Arun
I "guess" the 'pid' field of task_struct would be returned, as pthread_self() by definition returns the calling thread's ID which in the kernel should be the thread's pid.Somebody please CMIIW.
Since "printf("thread id: %u\n", pthread_id())" will generate a very larger number than "printf("process id: %u\n", getpid() )", so I don't think pthread_self() will return the pid field of it's task_struct. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/