Index: include/core/SkAtomics.h |
diff --git a/include/core/SkAtomics.h b/include/core/SkAtomics.h |
index cdd39ef4b753ffdba6ccc577eb014f2868451dcd..9866db4860cea31df1289391748e23bb7288cc58 100644 |
--- a/include/core/SkAtomics.h |
+++ b/include/core/SkAtomics.h |
@@ -1,3 +1,10 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
#ifndef SkAtomics_DEFINED |
#define SkAtomics_DEFINED |
@@ -27,6 +34,9 @@ bool sk_atomic_compare_exchange(T*, T* expected, T desired, |
sk_memory_order success = sk_memory_order_seq_cst, |
sk_memory_order failure = sk_memory_order_seq_cst); |
+template <typename T> |
+T sk_atomic_exchange(T*, T, sk_memory_order = sk_memory_order_seq_cst); |
+ |
// A little wrapper class for small T (think, builtins: int, float, void*) to |
// ensure they're always used atomically. This is our stand-in for std::atomic<T>. |
template <typename T> |