]> granicus.if.org Git - gc/commitdiff
Do not use AO_store in FAST_MALLOC_GRANS() in the single-threaded mode
authorIvan Maidanski <ivmai@mail.ru>
Mon, 26 Mar 2018 07:15:50 +0000 (10:15 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 26 Mar 2018 07:15:50 +0000 (10:15 +0300)
(fix of commit effa229)

Issue #214 (bdwgc).

* include/gc_inline.h (GC_FAST_M_AO_STORE): Do not use AO_store unless
GC_THREADS.

include/gc_inline.h

index f28dcfcc680f7bbf13eeb0b7db56339faab66b1b..fb28fc5fc68965a71339b4a1016267b7f7709e04 100644 (file)
@@ -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