mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Srinivas Nayak <sinu.nayak2001@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org
Subject: Re: Which function returns LWP in Linux.
Date: Mon, 17 May 2010 16:03:17 +0900 (JST)	[thread overview]
Message-ID: <20100517160319.A195.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <AANLkTikD7M_PKH3YgOWIvrcD6aW6X-gYIo2iw52QRRq_@mail.gmail.com>

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




  parent reply	other threads:[~2010-05-17  7:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17  6:27 Srinivas Nayak
2010-05-17  6:56 ` Jaswinder Singh Rajput
2010-05-17  7:03 ` KOSAKI Motohiro [this message]
2010-05-17  7:33   ` Jaswinder Singh Rajput
2010-05-17 10:13     ` Srinivas Nayak
2010-05-17 13:30       ` Samuel Thibault
2010-05-17 18:13         ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100517160319.A195.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sinu.nayak2001@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®