mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 00:32:59 +00:00
Put back MemoryBarrier fallback implementation on MINGW32
This almost reverts 2761e8a632
,
but only if under MINGW32, so it doesn't affect MSVC.
This commit is contained in:
parent
f368ba4a9e
commit
1f97060985
1 changed files with 8 additions and 0 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue