summaryrefslogtreecommitdiff
path: root/thread_local_alloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-02-26 22:03:30 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-02-26 23:25:47 +0300
commit272283d5b0ebf35326187c12973ee540c19eae67 (patch)
treea2d2118946a4c3f665928456f0041816663ec4cf /thread_local_alloc.c
parent2396ce1e9da95edf1f1299fd81b12560969dfc22 (diff)
downloadbdwgc-272283d5b0ebf35326187c12973ee540c19eae67.tar.gz
Always include gc_atomic_ops.h unless threads are disabled
(code refactoring) * include/private/gc_atomic_ops.h [!GC_BUILTIN_ATOMIC]: Issue #error if AO_HAVE_load or AO_HAVE_store is not defined after include atomic_ops.h. * include/private/gc_locks.h: Do not include gc_atomic_ops.h. * include/private/specific.h: Likewise. * pthread_stop_world.c: Likewise. * tests/test.c [THREADS && (GC_BUILTIN_ATOMIC || PARALLEL_MARK || !GC_WIN32_THREADS)]: Likewise. * thread_local_alloc.c: Likewise. * typd_mlc.c [GC_FORCE_INCLUDE_ATOMIC_OPS || GC_BUILTIN_ATOMIC]: Likewise. * win32_threads.c [(GC_DLL || GC_INSIDE_DLL) && !THREAD_LOCAL_ALLOC && !GC_NO_THREADS_DISCOVERY && !MSWINCE && !GC_PTHREADS]: Likewise. * include/private/gc_priv.h [THREADS && !SN_TARGET_ORBIS && !SN_TARGET_PSP2]: Include gc_atomic_ops.h (after GC_INLINE definition). * include/private/gc_priv.h (counter_t): Do not define. * include/private/gc_priv.h (hblkhdr): Change type of hb_n_marks to either volatile AO_t (if PARALLEL_MARK) or size_t * mark.c (GC_noop6): Check AO_CLEAR macro presence instead of GC_PTHREADS and !GC_WIN32_THREADS or PARALLEL_MARK. * tests/test_atomic_ops.c [_WIN32 || _MSC_VER || __CYGWIN__ || __MINGW32__] (main): Do not skip the test.
Diffstat (limited to 'thread_local_alloc.c')
-rw-r--r--thread_local_alloc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index 545812a4..4a6624dd 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -196,8 +196,6 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_kind(size_t bytes, int knd)
#ifdef GC_GCJ_SUPPORT
-# include "private/gc_atomic_ops.h" /* for AO_compiler_barrier() */
-
# include "include/gc_gcj.h"
/* Gcj-style allocation without locks is extremely tricky. The */