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

Unified Diff: webrtc/base/criticalsection.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 months 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 | « webrtc/base/criticalsection.h ('k') | webrtc/base/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « webrtc/base/criticalsection.h ('k') | webrtc/base/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698