summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/WebKit/Source/wtf/Atomics.h11
-rw-r--r--third_party/WebKit/Source/wtf/SpinLock.cpp4
2 files changed, 2 insertions, 13 deletions
diff --git a/third_party/WebKit/Source/wtf/Atomics.h b/third_party/WebKit/Source/wtf/Atomics.h
index 09b707e..cdd631e 100644
--- a/third_party/WebKit/Source/wtf/Atomics.h
+++ b/third_party/WebKit/Source/wtf/Atomics.h
@@ -319,17 +319,6 @@ 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)
diff --git a/third_party/WebKit/Source/wtf/SpinLock.cpp b/third_party/WebKit/Source/wtf/SpinLock.cpp
index f958c0f..0b5586e 100644
--- a/third_party/WebKit/Source/wtf/SpinLock.cpp
+++ b/third_party/WebKit/Source/wtf/SpinLock.cpp
@@ -62,13 +62,13 @@ void slowSpinLockLock(int volatile* lock)
for (int count = 0; count < kYieldProcessorTries; ++count) {
// Let the Processor know we're spinning.
YIELD_PROCESSOR;
- if (!noBarrierLoad(lock) && LIKELY(!atomicTestAndSetToOne(lock)))
+ if (!*lock && LIKELY(!atomicTestAndSetToOne(lock)))
return;
}
// Give the OS a chance to schedule something on this core.
YIELD_THREAD;
- } while (noBarrierLoad(lock));
+ } while (*lock);
} while (UNLIKELY(atomicTestAndSetToOne(lock)));
}