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: Async-signal-safe access to __thread variables from dlopen()ed libraries?


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


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