Index: src/ports/SkAtomics_win.h |
diff --git a/src/ports/SkAtomics_win.h b/src/ports/SkAtomics_win.h |
index f4d6da4e3e28bdd5ae6c140a0a35962747898d7f..bb9f89b38da7b8a490c8791c293364d4e40f91c6 100644 |
--- a/src/ports/SkAtomics_win.h |
+++ b/src/ports/SkAtomics_win.h |
@@ -13,12 +13,14 @@ |
#include <intrin.h> |
#include <stdint.h> |
+#ifdef _MSC_VER |
bungeman-skia
2014/03/14 14:50:37
Why are you using this file at all? Why not #defin
|
//MSDN says in order to declare an interlocked function for use as an |
//intrinsic, include intrin.h and put the function in a #pragma intrinsic |
//directive. |
//The pragma appears to be unnecessary, but doesn't hurt. |
#pragma intrinsic(_InterlockedIncrement, _InterlockedExchangeAdd, _InterlockedDecrement) |
#pragma intrinsic(_InterlockedCompareExchange) |
+#endif |
static inline int32_t sk_atomic_inc(int32_t* addr) { |
// InterlockedIncrement returns the new value, we want to return the old. |