summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-05-10 15:39:29 +0000
committerIvan Maidanski <ivmai@mail.ru>2012-11-14 13:49:25 +0400
commit8ee04ef1a4f84c5a7e9e6c94e9e8261a218ff4f0 (patch)
tree50765dbcb228ca27f80420327917cd02a1d36e37
parent3646e1bfbcff575e3a1304b14ec0b3fed493107c (diff)
downloadbdwgc-8ee04ef1a4f84c5a7e9e6c94e9e8261a218ff4f0.tar.gz
2011-05-10 Ivan Maidanski <ivmai@mail.ru>
* 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). --HG-- branch : bdwgc
-rw-r--r--ChangeLog9
-rw-r--r--thread_local_alloc.c8
2 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index be0b4b45..457a1d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-05-10 Ivan Maidanski <ivmai@mail.ru>
+ * 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 <ivmai@mail.ru>
+
* pthread_start.c (GC_start_rtn_prepare_thread): Change return
type to GC_thread.
* pthread_start.c (GC_inner_start_routine): Pass the current
@@ -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 <ivmai@mail.ru>
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);