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()edlibraries?


The obvious workaround is to make sure each thread has referred to a given
__thread variable before a signal handler it runs might refer to it.  That
will ensure the dynamic linker has done all the allocation required
beforehand.

Or else, the DSO can use __attribute__ ((tls_model ("initial-exec"))) for
the variable it wants to use in a signal handler.

Only if those are really not practical in a real-world example should we
consider adding bizarre new features for this corner case.


Thanks,
Roland


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