diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-06-26 15:13:54 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-06-26 15:27:12 +0200 |
commit | 124e025864bb39732c71fc60c1443d5680881a0a (patch) | |
tree | 2af69c84acc461764f9b8873089b3277b22725c0 /string | |
parent | sunrpc: Remove always-defined _RPC_THREAD_SAFE_ macro (diff) | |
download | glibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.gz glibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.bz2 glibc-124e025864bb39732c71fc60c1443d5680881a0a.zip |
Run thread shutdown functions in an explicit order
This removes the __libc_thread_subfreeres hook in favor of explict
calls.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'string')
-rw-r--r-- | string/strerror_l.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/string/strerror_l.c b/string/strerror_l.c index 7d90e809ce..2a9c3b5e0b 100644 --- a/string/strerror_l.c +++ b/string/strerror_l.c @@ -57,15 +57,9 @@ strerror_l (int errnum, locale_t loc) } -#ifdef _LIBC -# ifdef _LIBC_REENTRANT -/* This is called when a thread is exiting to free the last_value string. */ -static void __attribute__ ((section ("__libc_thread_freeres_fn"))) -strerror_thread_freeres (void) +void +__strerror_thread_freeres (void) { free (last_value); } -text_set_element (__libc_thread_subfreeres, strerror_thread_freeres); -text_set_element (__libc_subfreeres, strerror_thread_freeres); -# endif -#endif +text_set_element (__libc_subfreeres, __strerror_thread_freeres); |