Re: linux threads

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

 



Nilanjan Roychowdhury wrote:
If I create two threads using pthread_create calls in linux does the kernel sees them as two schedulable entities ??
>I can see two LWP with diff PIds.
This behaviour is correct.
The pids will differ, but the thread ids (tid) will be same for all the process in the same thread_group (of the parent thread). getpid() will return the tid instead of pid, so all processes will have the same value returned by getpid().
BTW, limit line length.


Regards,
Om.

--
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