[runtime] Fix the mingw build by defining InterlockedCompareExchange64 () which is...
authorZoltan Varga <vargaz@gmail.com>
Sun, 8 Sep 2013 08:52:42 +0000 (10:52 +0200)
committerZoltan Varga <vargaz@gmail.com>
Sun, 8 Sep 2013 08:52:42 +0000 (10:52 +0200)
mono/utils/atomic.c [changed mode: 0644->0755]
mono/utils/atomic.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b5267b6..577fd9d
 #include <windows.h>
 #define HAS_64BITS_ATOMICS 1
 
+/* mingw is missing InterlockedCompareExchange64 () from winbase.h */
+#ifdef __MINGW32__
+static inline gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
+{
+       return __sync_val_compare_and_swap (dest, comp, exch);
+}
+#endif
+
 /* Prefer GCC atomic ops if the target supports it (see configure.in). */
 #elif defined(USE_GCC_ATOMIC_OPS)