提交 1f970609 编写于 作者: B Behdad Esfahbod

Put back MemoryBarrier fallback implementation on MINGW32

This almost reverts 2761e8a6,
but only if under MINGW32, so it doesn't affect MSVC.
上级 f368ba4a
......@@ -47,6 +47,14 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if defined(__MINGW32__) && !defined(MemoryBarrier)
static inline void _HBMemoryBarrier (void) {
long dummy = 0;
InterlockedExchange (&dummy, 1);
}
# define MemoryBarrier _HBMemoryBarrier
#endif
typedef LONG hb_atomic_int_t;
#define hb_atomic_int_add(AI, V) InterlockedExchangeAdd (&(AI), (V))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册