Index: include/core/SkThread.h |
diff --git a/include/core/SkThread.h b/include/core/SkThread.h |
index c8cd4e9112aad6492ece41d40c06ac8d628a8b37..3038e2d9542325503295f7603fd60b45b4fca80f 100644 |
--- a/include/core/SkThread.h |
+++ b/include/core/SkThread.h |
@@ -60,6 +60,25 @@ static inline int32_t sk_atomic_conditional_inc(int32_t* addr) { |
return prev; |
} |
+// SK_BARRIERS_PLATFORM_H must provide implementations for the following declarations: |
+ |
+/** Prevent the compiler from reordering across this barrier. */ |
+static void sk_compiler_barrier(); |
+ |
+/** Read T*, with at least an acquire barrier. |
+ * |
+ * Only needs to be implemented for T which can be atomically read. |
+ */ |
+template <typename T> T sk_acquire_load(T*); |
+ |
+/** Write T*, with at least a release barrier. |
+ * |
+ * Only needs to be implemented for T which can be atomically written. |
+ */ |
+template <typename T> void sk_release_store(T*, T); |
+ |
+#include SK_BARRIERS_PLATFORM_H |
+ |
/** SK_MUTEX_PLATFORM_H must provide the following (or equivalent) declarations. |
class SkBaseMutex { |