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

Unified Diff: src/core/SkOnce.h

Issue 34353009: Borrow Android's ARMv6 memory barrier for SkOnce. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkOnce.h
diff --git a/src/core/SkOnce.h b/src/core/SkOnce.h
index ddef0d56c438abbfed1870ae2460e6d743c627f4..a469e22c86246d681f4acbbab0da404223d01e48 100644
--- a/src/core/SkOnce.h
+++ b/src/core/SkOnce.h
@@ -64,7 +64,11 @@ inline static void compiler_barrier() {
inline static void full_barrier_on_arm() {
#ifdef SK_CPU_ARM
+#if SK_ARM_ARCH >= 7
asm volatile("dmb" : : : "memory");
+#else
+ asm volatile("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
+#endif
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698