Index: webrtc/base/criticalsection.cc |
diff --git a/webrtc/base/criticalsection.cc b/webrtc/base/criticalsection.cc |
index 1f50c2355dbcef57b016f31dcc8c68501b9a84ca..3cf4fed447c26b2c5a153f0c711ea893ecf0380f 100644 |
--- a/webrtc/base/criticalsection.cc |
+++ b/webrtc/base/criticalsection.cc |
@@ -139,7 +139,7 @@ void GlobalLockPod::Lock() { |
const struct timespec ts_null = {0}; |
#endif |
- while (AtomicOps::CompareAndSwap(&lock_acquired, 0, 1)) { |
+ while (AtomicInt::CompareAndSwap(&lock_acquired, 0, 1)) { |
#if defined(WEBRTC_WIN) |
::Sleep(0); |
#else |
@@ -149,16 +149,11 @@ void GlobalLockPod::Lock() { |
} |
void GlobalLockPod::Unlock() { |
- int old_value = AtomicOps::CompareAndSwap(&lock_acquired, 1, 0); |
+ int old_value = AtomicInt::CompareAndSwap(&lock_acquired, 1, 0); |
RTC_DCHECK_EQ(1, old_value) << "Unlock called without calling Lock first"; |
} |
-GlobalLock::GlobalLock() { |
- lock_acquired = 0; |
-} |
- |
-GlobalLockScope::GlobalLockScope(GlobalLockPod* lock) |
- : lock_(lock) { |
+GlobalLockScope::GlobalLockScope(GlobalLockPod* lock) : lock_(lock) { |
lock_->Lock(); |
} |