summaryrefslogtreecommitdiffstats
path: root/base/synchronization
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-09 11:47:42 +0100
committerKristian Monsen <kristianm@google.com>2011-06-29 14:33:03 +0100
commitdc0f95d653279beabeb9817299e2902918ba123e (patch)
tree32eb121cd532053a5b9cb0c390331349af8d6baa /base/synchronization
parentba160cd4054d13d0cb0b1b46e61c3bed67095811 (diff)
downloadexternal_chromium-dc0f95d653279beabeb9817299e2902918ba123e.zip
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.gz
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.bz2
Merge Chromium at r11.0.696.0: Initial merge by git
Change-Id: I273dde2843af0839dfc08b419bb443fbd449532d
Diffstat (limited to 'base/synchronization')
-rw-r--r--base/synchronization/condition_variable_posix.cc12
-rw-r--r--base/synchronization/waitable_event_win.cc2
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;
}