about summary refs log tree commit diff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-06-26 15:13:54 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-06-26 15:27:12 +0200
commit124e025864bb39732c71fc60c1443d5680881a0a (patch)
tree2af69c84acc461764f9b8873089b3277b22725c0 /malloc/arena.c
parent935d920e763626dbcbbf655117285d1d270791a1 (diff)
downloadglibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.gz
glibc-124e025864bb39732c71fc60c1443d5680881a0a.tar.xz
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 'malloc/arena.c')
-rw-r--r--malloc/arena.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 37183cfb6a..497ae475e7 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -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: