From: Ivan Maidanski Date: Mon, 26 Mar 2018 07:15:50 +0000 (+0300) Subject: Do not use AO_store in FAST_MALLOC_GRANS() in the single-threaded mode X-Git-Tag: v8.0.0~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66e193b4d6fe3e91562da475952cf83de1438ff6;p=gc Do not use AO_store in FAST_MALLOC_GRANS() in the single-threaded mode (fix of commit effa229) Issue #214 (bdwgc). * include/gc_inline.h (GC_FAST_M_AO_STORE): Do not use AO_store unless GC_THREADS. --- diff --git a/include/gc_inline.h b/include/gc_inline.h index f28dcfcc..fb28fc5f 100644 --- a/include/gc_inline.h +++ b/include/gc_inline.h @@ -85,7 +85,7 @@ GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL /* An internal macro to update the free list pointer atomically (if */ /* the AO primitives are available) to avoid race with the marker. */ -#ifdef AO_HAVE_store +#if defined(GC_THREADS) && defined(AO_HAVE_store) # define GC_FAST_M_AO_STORE(my_fl, next) \ AO_store((volatile AO_t *)(my_fl), (AO_t)(next)) #else