This is the mail archive of the libc-alpha@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]

Re: [RFC] killing remaining USE___THREAD use


I'm not sure what you think the mystery is.  There was a period when we
thought we'd want to use __thread inside ld.so itself.  We later concluded
that RTLD_PRIVATE_ERRNO served the only need for it at least as well and it
simplified things not to need ld.so to have a PT_TLS.  I'm not sure whether
USE___THREAD-on state in ld.so was ever really used and tested or not, but
I don't think it matters.  Either it was always broken or it bit-rotted.
Either way, it's dead code now and there's no reason not to remove it.
There is no mystery as to the intent of the code.

Removing that code will leave us with the TLS_INIT_TP macro having a second
argument that is never used (always passed 0).  That argument is only
consulted on i386 (and AFAIK was only ever used there).  We could remove
it, though it doesn't hurt to leave that much smaller piece of dead code
around just to move a little more slowly.  (Actually there are two pieces:
in linux/i386/tls.h and in hurd/i386/tls.h.)  It's in macros (and an inline
for Hurd) where it should always be optimized away at compile time.  The
comment in sysdeps/generic/tls.h that should be setting the API for these
macros inverts the sense of the second argument.  That should be updated
either to fix that or to remove the argument if that's what we decide.


Thanks,
Roland


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