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

Unified Diff: include/ports/SkAtomics_atomic.h

Issue 1264103003: Parallel cache - preliminary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove atomics from skglyph Created 5 years, 3 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
Index: include/ports/SkAtomics_atomic.h
diff --git a/include/ports/SkAtomics_atomic.h b/include/ports/SkAtomics_atomic.h
index ddbf7c3f372124be0881cc4c49308fc5b7f50ad3..64ee823f90d290da335da093beb7165ba7cfde28 100644
--- a/include/ports/SkAtomics_atomic.h
+++ b/include/ports/SkAtomics_atomic.h
@@ -32,6 +32,12 @@ T sk_atomic_fetch_add(T* ptr, T val, sk_memory_order mo) {
}
template <typename T>
+T sk_atomic_fetch_sub(T* ptr, T val, sk_memory_order mo) {
+ // All values of mo are valid.
+ return __atomic_fetch_sub(ptr, val, mo);
+}
+
+template <typename T>
bool sk_atomic_compare_exchange(T* ptr, T* expected, T desired,
sk_memory_order success,
sk_memory_order failure) {

Powered by Google App Engine
This is Rietveld 408576698