Which function returns LWP in Linux.
Hi,
For a process, we have different PIDs. For threads under a single processes, we have different LWP id, but same PID in Linux. ex. Code:
root@pc:/home/srinivas# ps -eLf Which function retuns LWP id for thread? Sincerely, Srinivas Nayak |
Try gettid (get thread ID) -- I think it's what you're looking for.
|
Code:
#include<stdio.h> |
Note SYS_gettid is actually merely a define to __NR_gettid.
|
All times are GMT -5. The time now is 05:23 AM. |