mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
__call_tls_dtors: Use call_function_static_weak
This commit is contained in:
parent
2897b231a6
commit
6333a6014f
@ -47,10 +47,7 @@ __pthread_exit (void *status)
|
|||||||
(*handlers)->__handler ((*handlers)->__arg);
|
(*handlers)->__handler ((*handlers)->__arg);
|
||||||
|
|
||||||
/* Call destructors for the thread_local TLS variables. */
|
/* Call destructors for the thread_local TLS variables. */
|
||||||
#ifndef SHARED
|
call_function_static_weak (__call_tls_dtors);
|
||||||
if (&__call_tls_dtors != NULL)
|
|
||||||
#endif
|
|
||||||
__call_tls_dtors ();
|
|
||||||
|
|
||||||
__pthread_setcancelstate (oldstate, &oldstate);
|
__pthread_setcancelstate (oldstate, &oldstate);
|
||||||
|
|
||||||
|
@ -159,11 +159,7 @@ libc_hidden_proto (__cxa_atexit);
|
|||||||
|
|
||||||
extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,
|
extern int __cxa_thread_atexit_impl (void (*func) (void *), void *arg,
|
||||||
void *d);
|
void *d);
|
||||||
extern void __call_tls_dtors (void)
|
extern void __call_tls_dtors (void);
|
||||||
#ifndef SHARED
|
|
||||||
__attribute__ ((weak))
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
libc_hidden_proto (__call_tls_dtors)
|
libc_hidden_proto (__call_tls_dtors)
|
||||||
|
|
||||||
extern void __cxa_finalize (void *d);
|
extern void __cxa_finalize (void *d);
|
||||||
|
@ -446,10 +446,7 @@ start_thread (void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Call destructors for the thread_local TLS variables. */
|
/* Call destructors for the thread_local TLS variables. */
|
||||||
#ifndef SHARED
|
call_function_static_weak (__call_tls_dtors);
|
||||||
if (&__call_tls_dtors != NULL)
|
|
||||||
#endif
|
|
||||||
__call_tls_dtors ();
|
|
||||||
|
|
||||||
/* Run the destructor for the thread-local data. */
|
/* Run the destructor for the thread-local data. */
|
||||||
__nptl_deallocate_tsd ();
|
__nptl_deallocate_tsd ();
|
||||||
|
@ -37,11 +37,8 @@ __run_exit_handlers (int status, struct exit_function_list **listp,
|
|||||||
bool run_list_atexit, bool run_dtors)
|
bool run_list_atexit, bool run_dtors)
|
||||||
{
|
{
|
||||||
/* First, call the TLS destructors. */
|
/* First, call the TLS destructors. */
|
||||||
#ifndef SHARED
|
if (run_dtors)
|
||||||
if (&__call_tls_dtors != NULL)
|
call_function_static_weak (__call_tls_dtors);
|
||||||
#endif
|
|
||||||
if (run_dtors)
|
|
||||||
__call_tls_dtors ();
|
|
||||||
|
|
||||||
__libc_lock_lock (__exit_funcs_lock);
|
__libc_lock_lock (__exit_funcs_lock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user