This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/14300] Add pid_t pthread_gettid_np(pthread_t *thr).
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 27 Jun 2012 13:02:46 +0000
- Subject: [Bug nptl/14300] Add pid_t pthread_gettid_np(pthread_t *thr).
- Auto-submitted: auto-generated
- References: <bug-14300-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14300
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2012-06-27 13:02:46 UTC ---
Converting a TID to a pthread_t is highly non-trivial; there's no direct
mapping possible. The best way I can think of is using one of the
pthread-implementation-reserved signals to signal the TID and request it to
call pthread_self and pass back the result.
Another option that would remove the need for the difficult-to-provide
interface just for the sake of having an inverse function would be to forget
pthread_gettid_np and just expose gettid (if it's not already exposed). I would
say best practices would have a thread arranging for its own receipt of signals
rather than having other threads set it up...
Anyway, shouldn't this report/request be marked as "enhancement" importance
rather than "normal" or even "minor"? It doesn't seem like a bug.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.