This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6399] gettid() should have a wrapper
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 11 Jan 2014 20:01:01 +0000
- Subject: [Bug libc/6399] gettid() should have a wrapper
- Auto-submitted: auto-generated
- References: <bug-6399-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=6399
--- Comment #37 from Rich Felker <bugdal at aerifal dot cx> ---
glibc already requires applications to use the pthreads API to use threads.
Attempting to "roll your own" with clone will result in random but serious
failures due to glibc's assumption that the thread pointer is valid and that it
can find the values it expects in the TCB. I don't think this was ever intended
as "imposing policy" but rather just a consequence of the fact that it's HARD
to support applications doing things behind the implementation's back.
I'm still a bit undecided as to whether exposing gettid is a good idea, but I
don't think avoiding imposing policy about bypassing pthreads is a good
argument either way.
--
You are receiving this mail because:
You are on the CC list for the bug.