How to get thread ID(LWP) in program ?

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

 



Hi,

I have a program that creats a number of threads using pthread_create
function. When I use "ps -eLf" command I see a column LWP i.e.
(threadID) of all newly created process. I want to print these LWP
from my program in thread routines of each thread to see which LWP
belongs to which thread.

Please tell me what function should i use to print LWP of threads.

Thanks in advance.

Regards,
Gaurav
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux