Re: A question about _thread_ of Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux