Further simplify atomic ops on Visual Studio
This commit is contained in:
parent
0a49235701
commit
fa2bd9fb63
|
@ -46,12 +46,7 @@
|
|||
|
||||
#include <intrin.h>
|
||||
/* On x86, _InterlockedCompareExchangePointer is a macro defined in concrt.h */
|
||||
#if defined(_M_IX86)
|
||||
#include <concrt.h>
|
||||
#pragma intrinsic(_InterlockedExchangeAdd)
|
||||
#else
|
||||
#pragma intrinsic(_InterlockedExchangeAdd, _InterlockedCompareExchangePointer)
|
||||
#endif
|
||||
|
||||
typedef long hb_atomic_int_t;
|
||||
#define hb_atomic_int_add(AI, V) _InterlockedExchangeAdd (&(AI), (V))
|
||||
|
|
Loading…
Reference in New Issue