[Bug libc/6399] gettid() should have a wrapper
bugdal at aerifal dot cx
sourceware-bugzilla@sourceware.org
Sat Feb 9 00:01:00 GMT 2013
http://sourceware.org/bugzilla/show_bug.cgi?id=6399
--- Comment #11 from Rich Felker <bugdal at aerifal dot cx> 2013-02-09 00:01:04 UTC ---
If an application is calling gettid frequently enough for performance to
matter, it's probably doing something very wrong anyway.
With that said, most of the problems with caching pid/tid come from use of
clone() (or worse, vfork) directly by applications, which should probably not
be a supported use. With TLS being a mandatory feature in modern glibc and the
thread-pointer being always-initialized for purposes like ssp, I don't think
there's any way applications can safely clone, whereby "safely" I mean "without
a risk that internal libc state is inconsistent afterwards".
Anyway, I'm pretty indifferent on tid caching -- I don't see it as necessary,
but I don't think it would be a problem, either.
--
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.
More information about the Glibc-bugs
mailing list