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

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>
This commit is contained in:
Florian Weimer
2018-06-26 15:13:54 +02:00
parent 935d920e76
commit 124e025864
14 changed files with 70 additions and 46 deletions

View File

@ -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);