Index: webrtc/base/criticalsection.cc |
diff --git a/webrtc/base/criticalsection.cc b/webrtc/base/criticalsection.cc |
index 4f3a28f2f456dcaa3b7a673e7dadefd8073bc8aa..851635d051d8f47717717bcfe680268e91540bbf 100644 |
--- a/webrtc/base/criticalsection.cc |
+++ b/webrtc/base/criticalsection.cc |
@@ -43,10 +43,10 @@ void CriticalSection::Enter() EXCLUSIVE_LOCK_FUNCTION() { |
pthread_mutex_lock(&mutex_); |
#if CS_DEBUG_CHECKS |
if (!recursion_count_) { |
- DCHECK(!thread_); |
+ RTC_DCHECK(!thread_); |
thread_ = pthread_self(); |
} else { |
- DCHECK(CurrentThreadIsOwner()); |
+ RTC_DCHECK(CurrentThreadIsOwner()); |
} |
++recursion_count_; |
#endif |
@@ -61,10 +61,10 @@ bool CriticalSection::TryEnter() EXCLUSIVE_TRYLOCK_FUNCTION(true) { |
return false; |
#if CS_DEBUG_CHECKS |
if (!recursion_count_) { |
- DCHECK(!thread_); |
+ RTC_DCHECK(!thread_); |
thread_ = pthread_self(); |
} else { |
- DCHECK(CurrentThreadIsOwner()); |
+ RTC_DCHECK(CurrentThreadIsOwner()); |
} |
++recursion_count_; |
#endif |
@@ -72,13 +72,13 @@ bool CriticalSection::TryEnter() EXCLUSIVE_TRYLOCK_FUNCTION(true) { |
#endif |
} |
void CriticalSection::Leave() UNLOCK_FUNCTION() { |
- DCHECK(CurrentThreadIsOwner()); |
+ RTC_DCHECK(CurrentThreadIsOwner()); |
#if defined(WEBRTC_WIN) |
LeaveCriticalSection(&crit_); |
#else |
#if CS_DEBUG_CHECKS |
--recursion_count_; |
- DCHECK(recursion_count_ >= 0); |
+ RTC_DCHECK(recursion_count_ >= 0); |
if (!recursion_count_) |
thread_ = 0; |
#endif |
@@ -119,7 +119,7 @@ TryCritScope::TryCritScope(CriticalSection* cs) |
} |
TryCritScope::~TryCritScope() { |
- CS_DEBUG_CODE(DCHECK(lock_was_called_)); |
+ CS_DEBUG_CODE(RTC_DCHECK(lock_was_called_)); |
if (locked_) |
cs_->Leave(); |
} |
@@ -145,7 +145,7 @@ void GlobalLockPod::Lock() { |
void GlobalLockPod::Unlock() { |
int old_value = AtomicOps::CompareAndSwap(&lock_acquired, 1, 0); |
- DCHECK_EQ(1, old_value) << "Unlock called without calling Lock first"; |
+ RTC_DCHECK_EQ(1, old_value) << "Unlock called without calling Lock first"; |
} |
GlobalLock::GlobalLock() { |