[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.
Warner
[Qemu-devel] Re: [PATCH 0/3] Expose thread id through info cpus, Glauber Costa, 2008/03/05
[Qemu-devel] Re: [PATCH 0/3] Expose thread id through info cpus, Avi Kivity, 2008/03/06