From a9aa12ac46fd2369acfc9c8122b571f07c0b3f35 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 29 May 2018 21:01:23 +0300 Subject: [PATCH] Make subthreadcreate test compilable even without libatomic_ops (fix of commit 4becbc906) * tests/subthread_create.c [HAVE_CONFIG_H]: Update comment. * tests/subthread_create.c: Do not include gc.h and gc_atomic_ops.h (and do not define AO_REQUIRE_CAS) unless GC_THREADS is defined. --- tests/subthread_create.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/subthread_create.c b/tests/subthread_create.c index 5d9c831..7c9a3cc 100644 --- a/tests/subthread_create.c +++ b/tests/subthread_create.c @@ -1,18 +1,17 @@ #ifdef HAVE_CONFIG_H - /* For PARALLEL_MARK */ + /* For GC_THREADS and PARALLEL_MARK */ # include "config.h" #endif -#ifndef GC_THREADS -# define GC_THREADS -#endif -#include "gc.h" +#ifdef GC_THREADS +# include "gc.h" -#ifdef PARALLEL_MARK -# define AO_REQUIRE_CAS -#endif -#include "private/gc_atomic_ops.h" +# ifdef PARALLEL_MARK +# define AO_REQUIRE_CAS +# endif +# include "private/gc_atomic_ops.h" +#endif /* GC_THREADS */ #include -- 2.7.4