From d604870504cc8dd8870e8c1a6e719f88eb6c5ba7 Mon Sep 17 00:00:00 2001 From: ivmai Date: Tue, 10 May 2011 15:39:29 +0000 Subject: [PATCH] 2011-05-10 Ivan Maidanski * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join adjacent "#ifdef". * thread_local_alloc.c (GC_malloc_atomic): Call GC_core_malloc_atomic (instead of GC_core_malloc). --- ChangeLog | 9 ++++++++- thread_local_alloc.c | 8 ++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index be0b4b45..457a1d76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-05-10 Ivan Maidanski + + * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join + adjacent "#ifdef". + * thread_local_alloc.c (GC_malloc_atomic): Call + GC_core_malloc_atomic (instead of GC_core_malloc). + 2011-05-10 Ivan Maidanski * pthread_start.c (GC_start_rtn_prepare_thread): Change return @@ -1236,7 +1243,7 @@ type). * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected (for SIGSEGV/BUS) only if GC_print_stats. - * os_dep.c (catch_exception_raise): Join 2 adjucent GC_err_printf + * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf calls. 2010-11-25 Ivan Maidanski diff --git a/thread_local_alloc.c b/thread_local_alloc.c index 2e27331d..1540f9ff 100644 --- a/thread_local_alloc.c +++ b/thread_local_alloc.c @@ -147,8 +147,6 @@ GC_API void * GC_CALL GC_malloc(size_t bytes) tsd = GC_getspecific(k); # else tsd = GC_getspecific(GC_thread_key); -# endif -# if defined(USE_PTHREAD_SPECIFIC) || defined(USE_WIN32_SPECIFIC) if (EXPECT(0 == tsd, FALSE)) { return GC_core_malloc(bytes); } @@ -179,15 +177,13 @@ GC_API void * GC_CALL GC_malloc_atomic(size_t bytes) if (EXPECT(0 == k, FALSE)) { /* We haven't yet run GC_init_parallel. That means */ /* we also aren't locking, so this is fairly cheap. */ - return GC_core_malloc(bytes); + return GC_core_malloc_atomic(bytes); } tsd = GC_getspecific(k); # else tsd = GC_getspecific(GC_thread_key); -# endif -# if defined(USE_PTHREAD_SPECIFIC) || defined(USE_WIN32_SPECIFIC) if (EXPECT(0 == tsd, FALSE)) { - return GC_core_malloc(bytes); + return GC_core_malloc_atomic(bytes); } # endif GC_ASSERT(GC_is_initialized); -- 2.40.0