projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f368ba4
)
Put back MemoryBarrier fallback implementation on MINGW32
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 4 Apr 2013 19:02:03 +0000
(15:02 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 4 Apr 2013 19:02:03 +0000
(15:02 -0400)
This almost reverts
2761e8a632c14353f286708898be8df6ebad7407
,
but only if under MINGW32, so it doesn't affect MSVC.
src/hb-atomic-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-atomic-private.hh
b/src/hb-atomic-private.hh
index
7047e21
..
9cc3bc5
100644
(file)
--- a/
src/hb-atomic-private.hh
+++ b/
src/hb-atomic-private.hh
@@
-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))