Index: include/core/SkAtomics.h |
diff --git a/include/core/SkAtomics.h b/include/core/SkAtomics.h |
index 1a84049970ddbe97ce8fdca5c890080ee27d64c9..e62d6e093155204dbbae14c3ccb9b7fe2d24eddf 100644 |
--- a/include/core/SkAtomics.h |
+++ b/include/core/SkAtomics.h |
@@ -34,6 +34,11 @@ bool sk_atomic_compare_exchange(T*, T* expected, T desired, |
#include "../ports/SkAtomics_sync.h" |
#endif |
+inline void sk_memory_barrier(sk_memory_order mo) { |
+ int junk; |
+ (void)sk_atomic_fetch_add(&junk, 42, mo); |
+} |
+ |
// From here down we have shims for our old atomics API, to be weaned off of. |
// We use the default sequentially-consistent memory order to make things simple |
// and to match the practical reality of our old _sync and _win implementations. |