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

Unified Diff: third_party/WebKit/Source/web/tests/SpinLockTest.cpp

Issue 1502023002: Revert of Switch wtf/SpinLock to std::atomic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/AddressSpaceRandomization.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/SpinLockTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/SpinLockTest.cpp b/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
index 7806b5bb710660837a4542b76f17e509474a9d6f..18abef96e2ecfe6f7b0adb4d3fa976f61400979f 100644
--- a/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
+++ b/third_party/WebKit/Source/web/tests/SpinLockTest.cpp
@@ -44,7 +44,7 @@
static const size_t bufferSize = 16;
-static SpinLock lock;
+static int lock = 0;
static void fillBuffer(volatile char* buffer, char fillPattern)
{
@@ -69,8 +69,9 @@
static void threadMain(volatile char* buffer)
{
for (int i = 0; i < 500000; ++i) {
- SpinLock::Guard guard(lock);
+ spinLockLock(&lock);
changeAndCheckBuffer(buffer);
+ spinLockUnlock(&lock);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/AddressSpaceRandomization.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698