1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

C++11 thread_local destructors support

This feature is specifically for the C++ compiler to offload calling
thread_local object destructors on thread program exit, to glibc.
This is to overcome the possible complication of destructors of
thread_local objects getting called after the DSO in which they're
defined is unloaded by the dynamic linker.  The DSO is marked as
'unloadable' if it has a constructed thread_local object and marked as
'unloadable' again when all the constructed thread_local objects
defined in it are destroyed.
This commit is contained in:
Siddhesh Poyarekar
2013-02-18 19:08:21 +05:30
parent ffaa74cf68
commit ba384f6ed9
40 changed files with 422 additions and 2 deletions

View File

@ -100,6 +100,11 @@ extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
extern int __cxa_atexit_internal (void (*func) (void *), void *arg, void *d)
attribute_hidden;
extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,
void *d);
extern void __call_tls_dtors (void);
libc_hidden_proto (__call_tls_dtors);
extern void __cxa_finalize (void *d);
extern int __posix_memalign (void **memptr, size_t alignment, size_t size);