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

Unified Diff: third_party/WebKit/Source/wtf/Atomics.h

Issue 1461743002: Add noBarrierStore to WTF and use it for spinlocks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 5 years, 1 month 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 | third_party/WebKit/Source/wtf/SpinLock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Atomics.h
diff --git a/third_party/WebKit/Source/wtf/Atomics.h b/third_party/WebKit/Source/wtf/Atomics.h
index cdd631efe8aea48f021681350150f48f18274f7e..09b707e6f754336ddb7ab5cf99498b0c11417f3a 100644
--- a/third_party/WebKit/Source/wtf/Atomics.h
+++ b/third_party/WebKit/Source/wtf/Atomics.h
@@ -319,6 +319,17 @@ ALWAYS_INLINE float noBarrierLoad(volatile const float* ptr)
return value;
}
+ALWAYS_INLINE void noBarrierStore(volatile int* ptr, int value)
+{
+ *ptr = value;
+}
+
+ALWAYS_INLINE int noBarrierLoad(volatile const int* ptr)
+{
+ int value = *ptr;
+ return value;
+}
+
#if defined(ADDRESS_SANITIZER)
NO_SANITIZE_ADDRESS ALWAYS_INLINE void asanUnsafeReleaseStore(volatile unsigned* ptr, unsigned value)
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/SpinLock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698