How to get thread ID(LWP) in program ?
am 20.06.2007 06:05:01 von Gaurav BhatnagarHi,
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs