Async-signal-safe access to __thread variables from dlopen()ed libraries?
Alexandre Oliva
aoliva@redhat.com
Thu Sep 19 21:25:00 GMT 2013
On Sep 18, 2013, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> We really need a TLS that is both async-signal safe, and can be used from
> dlopen()ed shared library.
I suggest you switch to GNU2 TLS, disable lazy relocations, and tune the
static TLS area reserved by glibc (a tunable we still don't have, but
probably should) so that all dlopened libs will fit (and thus be
assigned to) static TLS. You'll not only get the desired safety, but
also a significant speed boost to TLS access, if you can reliably
predict the maximum static TLS segment size the application will need.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
More information about the Libc-alpha
mailing list