diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 16:50:28 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 16:50:28 -0400 |
commit | d063d164335938d557460bebaa7cfe388157b627 (patch) | |
tree | 92ef3f54771c0a28190b76ee45f90d16fd39714f /malloc/arena.c | |
parent | 3ce1f2959437e952b9db4eaeed2407424f11a4d1 (diff) | |
download | glibc-d063d164335938d557460bebaa7cfe388157b627.zip glibc-d063d164335938d557460bebaa7cfe388157b627.tar.gz glibc-d063d164335938d557460bebaa7cfe388157b627.tar.bz2 |
Remove support for !USE___THREAD
Diffstat (limited to 'malloc/arena.c')
-rw-r--r-- | malloc/arena.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index 29d8b2d..aab5535 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -173,10 +173,6 @@ int __malloc_initialized = -1; static __malloc_ptr_t (*save_malloc_hook) (size_t __size, __const __malloc_ptr_t); -# if !defined _LIBC || (defined SHARED && !USE___THREAD) -static __malloc_ptr_t (*save_memalign_hook) (size_t __align, size_t __size, - __const __malloc_ptr_t); -# endif static void (*save_free_hook) (__malloc_ptr_t __ptr, __const __malloc_ptr_t); static Void_t* save_arena; @@ -432,34 +428,6 @@ __failing_morecore (ptrdiff_t d) extern struct dl_open_hook *_dl_open_hook; libc_hidden_proto (_dl_open_hook); # endif - -# if defined SHARED && !USE___THREAD -/* This is called by __pthread_initialize_minimal when it needs to use - malloc to set up the TLS state. We cannot do the full work of - ptmalloc_init (below) until __pthread_initialize_minimal has finished, - so it has to switch to using the special startup-time hooks while doing - those allocations. */ -void -__libc_malloc_pthread_startup (bool first_time) -{ - if (first_time) - { - ptmalloc_init_minimal (); - save_malloc_hook = __malloc_hook; - save_memalign_hook = __memalign_hook; - save_free_hook = __free_hook; - __malloc_hook = malloc_starter; - __memalign_hook = memalign_starter; - __free_hook = free_starter; - } - else - { - __malloc_hook = save_malloc_hook; - __memalign_hook = save_memalign_hook; - __free_hook = save_free_hook; - } -} -# endif #endif static void @@ -475,14 +443,7 @@ ptmalloc_init (void) if(__malloc_initialized >= 0) return; __malloc_initialized = 0; -#ifdef _LIBC -# if defined SHARED && !USE___THREAD - /* ptmalloc_init_minimal may already have been called via - __libc_malloc_pthread_startup, above. */ - if (mp_.pagesize == 0) -# endif -#endif - ptmalloc_init_minimal(); + ptmalloc_init_minimal(); mutex_init(&main_arena.mutex); main_arena.next = &main_arena; |