[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] use a thread id variable

From: M. Warner Losh
Subject: Re: [Qemu-devel] [PATCH] use a thread id variable
Date: Sun, 09 Mar 2008 10:12:40 -0600 (MDT)

In message: <address@hidden>
            Gilad Ben-Yossef <address@hidden> writes:
: > What you're supposed to do with pthreads in general is use pthread_self().
: Unfortunately, AFAIK the opaque handle that pthread_self() returns is 
: not  quite meaningless outside of the process whereas what the non 
: standard gettid() returns can actually be used to identify a thread from 
: "outside" the process, like the shell.

gettid() is also non-standard.  If you want to interact with a thread,
you gotta use pthread_self() if you want your code to be portable.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]