From 0f4241aa9f9b43c402f1c7bb7bda54f66a8c69e3 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Tue, 14 Jan 2020 16:13:27 +0200 Subject: [PATCH] [utils] Make sure we include WRAP_ATOMIC_INTRINSIC if needed Currently, this doesn't impact any targets, but do it for consistency. Fixes https://github.com/mono/mono/issues/10651 Commit migrated from https://github.com/mono/mono/commit/fef06df53729a7e0159660494b0ecc1c5b3fe0c7 --- src/mono/mono/utils/atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/mono/utils/atomic.c b/src/mono/mono/utils/atomic.c index 519448b..eac6be3 100644 --- a/src/mono/mono/utils/atomic.c +++ b/src/mono/mono/utils/atomic.c @@ -508,7 +508,7 @@ void mono_atomic_store_ptr(volatile gpointer *dst, gpointer val) gint64 mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) { - return __sync_val_compare_and_swap (dest, comp, exch); + return gcc_sync_val_compare_and_swap (dest, comp, exch); } #elif defined (__arm__) && defined (HAVE_ARMV7) && (defined(TARGET_IOS) || defined(TARGET_WATCHOS) || defined(TARGET_ANDROID)) @@ -526,7 +526,7 @@ mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) gint64 mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp) { - return __sync_val_compare_and_swap (dest, comp, exch); + return gcc_sync_val_compare_and_swap (dest, comp, exch); } #elif defined (TARGET_ANDROID) -- 2.7.4