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

Unified Diff: include/ports/SkBarriers_arm.h

Issue 896553002: Atomics overhaul. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: warning Created 5 years, 11 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 | « include/ports/SkAtomics_win.h ('k') | include/ports/SkBarriers_tsan.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/ports/SkBarriers_arm.h
diff --git a/include/ports/SkBarriers_arm.h b/include/ports/SkBarriers_arm.h
deleted file mode 100644
index 386294e9b1fcbde4b9583dc1471fdcc3771dbb6f..0000000000000000000000000000000000000000
--- a/include/ports/SkBarriers_arm.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkBarriers_arm_DEFINED
-#define SkBarriers_arm_DEFINED
-
-static inline void sk_compiler_barrier() { asm volatile("" : : : "memory"); }
-
-template <typename T>
-T sk_acquire_load(T* ptr) {
- T val = *ptr;
- __sync_synchronize(); // Issue a full barrier, which is an overkill acquire barrier.
- return val;
-}
-
-template <typename T>
-T sk_consume_load(T* ptr) {
- T val = *ptr;
- // Unlike acquire, consume loads (data-dependent loads) are guaranteed not to reorder on ARM.
- // No memory barrier is needed, so we just use a compiler barrier.
- // C.f. http://preshing.com/20140709/the-purpose-of-memory_order_consume-in-cpp11/
- sk_compiler_barrier();
- return val;
-}
-
-template <typename T>
-void sk_release_store(T* ptr, T val) {
- __sync_synchronize(); // Issue a full barrier, which is an overkill release barrier.
- *ptr = val;
-}
-
-#endif//SkBarriers_x86_DEFINED
« no previous file with comments | « include/ports/SkAtomics_win.h ('k') | include/ports/SkBarriers_tsan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698