From ca655b9db689ee0e655248b1a9f166b8db6cc984 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 15 Feb 2019 11:21:40 -0500 Subject: Fix bug #868 Define a InterlockedAddNoFence64() function using gcc's atomics on mingw(32|64) (https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html) --- src/platform/windows/win_thread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index 3ba143bf..f9037f7d 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -14,6 +14,11 @@ #ifdef NNG_PLATFORM_WINDOWS +//mingw does not define InterlockedAddNoFence64, use the mingw equivelent +#ifdef __MINGW32__ || __MINGW64__ +#define InterlockedAddNoFence64(a,b) __atomic_add_fetch(a,b,__ATOMIC_RELAXED) +#endif + #include void * -- cgit v1.2.3-70-g09d2