Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: src/ports/SkAtomics_win.h

Issue 198643004: Fixed cross compilation with mingw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ports/SkOSFile_win.cpp » ('j') | src/ports/SkOSFile_win.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/ports/SkOSFile_win.cpp » ('j') | src/ports/SkOSFile_win.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698