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

Unified Diff: base/synchronization/condition_variable_posix.cc

Issue 6469070: More DCHECK() updates. A mixture of _EQ and _GE. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updating pickle.h order Created 9 years, 10 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 | « base/shared_memory_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/condition_variable_posix.cc
diff --git a/base/synchronization/condition_variable_posix.cc b/base/synchronization/condition_variable_posix.cc
index eff7053c893e0ad79911dd68fef1b893971afedc..fc68b64973a412e4bbee5d743f131af16c3f1d2e 100644
--- a/base/synchronization/condition_variable_posix.cc
+++ b/base/synchronization/condition_variable_posix.cc
@@ -20,12 +20,12 @@ ConditionVariable::ConditionVariable(Lock* user_lock)
#endif
{
int rv = pthread_cond_init(&condition_, NULL);
- DCHECK(rv == 0);
+ DCHECK_EQ(0, rv);
}
ConditionVariable::~ConditionVariable() {
int rv = pthread_cond_destroy(&condition_);
- DCHECK(rv == 0);
+ DCHECK_EQ(0, rv);
}
void ConditionVariable::Wait() {
@@ -33,7 +33,7 @@ void ConditionVariable::Wait() {
user_lock_->CheckHeldAndUnmark();
#endif
int rv = pthread_cond_wait(&condition_, user_mutex_);
- DCHECK(rv == 0);
+ DCHECK_EQ(0, rv);
#if !defined(NDEBUG)
user_lock_->CheckUnheldAndMark();
#endif
@@ -52,7 +52,7 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {
Time::kNanosecondsPerMicrosecond;
abstime.tv_sec += abstime.tv_nsec / Time::kNanosecondsPerSecond;
abstime.tv_nsec %= Time::kNanosecondsPerSecond;
- DCHECK(abstime.tv_sec >= now.tv_sec); // Overflow paranoia
+ DCHECK_GE(abstime.tv_sec, now.tv_sec); // Overflow paranoia
#if !defined(NDEBUG)
user_lock_->CheckHeldAndUnmark();
@@ -66,12 +66,12 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {
void ConditionVariable::Broadcast() {
int rv = pthread_cond_broadcast(&condition_);
- DCHECK(rv == 0);
+ DCHECK_EQ(0, rv);
}
void ConditionVariable::Signal() {
int rv = pthread_cond_signal(&condition_);
- DCHECK(rv == 0);
+ DCHECK_EQ(0, rv);
}
} // namespace base
« no previous file with comments | « base/shared_memory_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698