lkml.org 
[lkml]   [2010]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Which function returns LWP in Linux.
Date
> 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.
>
> root@pc:/home/srinivas# ps -eLf
> UID PID PPID LWP C STIME TIME CMD
> root 100 1 100 0 May13 00:00:02 ./a.out
> root 100 1 102 0 May13 00:00:00 ./a.out
>
> getpid() function returns PID of a process.
> Which function retuns LWP id for thread?

gettid()





\
 
 \ /
  Last update: 2010-05-17 09:05    [W:0.155 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site