Fix Windows atomic get/set
According to: http://msdn.microsoft.com/en-us/library/65tt87y8.aspx MemoryBarrier() is the right macro to protect these, not _ReadBarrier() and/or _WriteBarrier().
This commit is contained in:
parent
8f8956a55f
commit
303d5850ec
@ -47,8 +47,8 @@
|
||||
#include <intrin.h>
|
||||
typedef long hb_atomic_int_t;
|
||||
#define hb_atomic_int_add(AI, V) _InterlockedExchangeAdd (&(AI), (V))
|
||||
#define hb_atomic_int_set(AI, V) _InterlockedExchange (&(AI), (V))
|
||||
#define hb_atomic_int_get(AI) (_ReadBarrier (), (AI))
|
||||
#define hb_atomic_int_set(AI, V) ((AI) = (V), MemoryBarrier ())
|
||||
#define hb_atomic_int_get(AI) (MemoryBarrier (), (AI))
|
||||
|
||||
|
||||
#elif !defined(HB_NO_MT) && defined(__APPLE__)
|
||||
|
Loading…
Reference in New Issue
Block a user