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

Unified Diff: webrtc/system_wrappers/source/thread_posix.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/system_wrappers/source/file_impl.cc ('k') | webrtc/system_wrappers/source/thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/thread_posix.cc
diff --git a/webrtc/system_wrappers/source/thread_posix.cc b/webrtc/system_wrappers/source/thread_posix.cc
index 3eb7f2ad029bb0e1777d437f56a4de9b245c23e1..fdfbf8056cec9d1179fb4e6e1f768138640e0d77 100644
--- a/webrtc/system_wrappers/source/thread_posix.cc
+++ b/webrtc/system_wrappers/source/thread_posix.cc
@@ -39,7 +39,7 @@ struct ThreadAttributes {
int ConvertToSystemPriority(ThreadPriority priority, int min_prio,
int max_prio) {
- DCHECK(max_prio - min_prio > 2);
+ RTC_DCHECK(max_prio - min_prio > 2);
const int top_prio = max_prio - 1;
const int low_prio = min_prio + 1;
@@ -57,7 +57,7 @@ int ConvertToSystemPriority(ThreadPriority priority, int min_prio,
case kRealtimePriority:
return top_prio;
}
- DCHECK(false);
+ RTC_DCHECK(false);
return low_prio;
}
@@ -74,7 +74,7 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, void* obj,
stop_event_(false, false),
name_(thread_name ? thread_name : "webrtc"),
thread_(0) {
- DCHECK(name_.length() < 64);
+ RTC_DCHECK(name_.length() < 64);
}
uint32_t ThreadWrapper::GetThreadId() {
@@ -82,36 +82,36 @@ uint32_t ThreadWrapper::GetThreadId() {
}
ThreadPosix::~ThreadPosix() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
}
// TODO(pbos): Make Start void, calling code really doesn't support failures
// here.
bool ThreadPosix::Start() {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!thread_) << "Thread already started?";
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(!thread_) << "Thread already started?";
ThreadAttributes attr;
// Set the stack stack size to 1M.
pthread_attr_setstacksize(&attr, 1024 * 1024);
- CHECK_EQ(0, pthread_create(&thread_, &attr, &StartThread, this));
+ RTC_CHECK_EQ(0, pthread_create(&thread_, &attr, &StartThread, this));
return true;
}
bool ThreadPosix::Stop() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
if (!thread_)
return true;
stop_event_.Set();
- CHECK_EQ(0, pthread_join(thread_, nullptr));
+ RTC_CHECK_EQ(0, pthread_join(thread_, nullptr));
thread_ = 0;
return true;
}
bool ThreadPosix::SetPriority(ThreadPriority priority) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
if (!thread_)
return false;
#if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
« no previous file with comments | « webrtc/system_wrappers/source/file_impl.cc ('k') | webrtc/system_wrappers/source/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698