Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

NPTL: pid of a thread and gdb

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


lnxluv at yahoo

May 8, 2005, 10:00 PM

Post #1 of 2 (387 views)
Permalink
NPTL: pid of a thread and gdb

I am using the NPTL ilbrary to create a thread.
In NPTL the parent and the thread have the same pid.
Then on what basis gdb differentiates between the
threads which have the same pid ?
gdb gives following message when it encounters a
pthread_create() statement:

[New Thread 1075138688 (LWP 7034)]
[New Thread 1077242800 (LWP 7037)]

the LWP 7034 is the pid of parent process (in this
case LWP is same as pid).
from where does it calculate LWP 7037 for the thread ?
(in this case LWP is different from pid, pid for the
thread is still 7034)

-lnxluv




__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


sneakums at zork

May 9, 2005, 1:17 AM

Post #2 of 2 (368 views)
Permalink
Re: NPTL: pid of a thread and gdb [In reply to]

li nux <lnxluv [at] yahoo> writes:

> I am using the NPTL ilbrary to create a thread.
> In NPTL the parent and the thread have the same pid.
> Then on what basis gdb differentiates between the
> threads which have the same pid ?

See gettid(2).

--
Dag vijandelijk luchtschip de huismeester is dood
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.