summaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2019-02-23 11:42:13 -0800
committerGarrett D'Amore <garrett@damore.org>2019-02-23 11:50:17 -0800
commita67f63f00811de2a7af3b419a8fb354c059badc7 (patch)
tree00ca90bc34d0ab9a43ec08d1e050550fbac97b7d /src/platform
parent64e784237d143aa032311942bc44abd22e1e4114 (diff)
downloadnng-a67f63f00811de2a7af3b419a8fb354c059badc7.tar.gz
nng-a67f63f00811de2a7af3b419a8fb354c059badc7.tar.bz2
nng-a67f63f00811de2a7af3b419a8fb354c059badc7.zip
fixes #890 Windows mingw interlocked exchange not quite right
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/windows/win_thread.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c
index f9037f7d..158b8133 100644
--- a/src/platform/windows/win_thread.c
+++ b/src/platform/windows/win_thread.c
@@ -1,5 +1,5 @@
//
-// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -14,9 +14,10 @@
#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)
+// mingw does not define InterlockedAddNoFence64, use the mingw equivelent
+#if defined(__MINGW32__) || defined(__MINGW64__)
+#define InterlockedAddNoFence64(a, b) \
+ __atomic_add_fetch(a, b, __ATOMIC_RELAXED)
#endif
#include <stdlib.h>