diff options
author | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 02:48:05 +0000 |
---|---|---|
committer | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 02:48:05 +0000 |
commit | 5d2b449b4f0b3d13c75e540c834c550ed38c0912 (patch) | |
tree | 6224e6d93676677f19fb03e7d80b46ea15dcf3b5 /base/synchronization | |
parent | c4e678d0902b04606ff2a21714e33643d01a74ed (diff) | |
download | chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.zip chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.tar.gz chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.tar.bz2 |
More DCHECK() updates. A mixture of _EQ and _GE.
Bug=58409
Review URL: http://codereview.chromium.org/6469070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/synchronization')
-rw-r--r-- | base/synchronization/condition_variable_posix.cc | 12 | ||||
-rw-r--r-- | base/synchronization/waitable_event_win.cc | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/base/synchronization/condition_variable_posix.cc b/base/synchronization/condition_variable_posix.cc index eff7053..fc68b64 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 diff --git a/base/synchronization/waitable_event_win.cc b/base/synchronization/waitable_event_win.cc index 0fcf488..a0e39c1 100644 --- a/base/synchronization/waitable_event_win.cc +++ b/base/synchronization/waitable_event_win.cc @@ -50,7 +50,7 @@ bool WaitableEvent::Wait() { DWORD result = WaitForSingleObject(handle_, INFINITE); // It is most unexpected that this should ever fail. Help consumers learn // about it if it should ever fail. - DCHECK(result == WAIT_OBJECT_0) << "WaitForSingleObject failed"; + DCHECK_EQ(WAIT_OBJECT_0, result) << "WaitForSingleObject failed"; return result == WAIT_OBJECT_0; } |