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

@ -941,8 +941,8 @@ arena_get_retry (mstate ar_ptr, size_t bytes)
return ar_ptr;
}
static void __attribute__ ((section ("__libc_thread_freeres_fn")))
arena_thread_freeres (void)
void
__malloc_arena_thread_freeres (void)
{
/* Shut down the thread cache first. This could deallocate data for
the thread arena, so do this before we put the arena on the free
@ -966,7 +966,6 @@ arena_thread_freeres (void)
__libc_lock_unlock (free_list_lock);
}
}
text_set_element (__libc_thread_subfreeres, arena_thread_freeres);
/*
* Local variables: