This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6399] gettid() should have a wrapper


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]