summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/mutex.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index b924798..21ba0d2 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -238,7 +238,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex {
// Assert the current thread has exclusive access to the ReaderWriterMutex.
void AssertExclusiveHeld(const Thread* self) {
- if (kDebugLocking & (gAborting == 0)) {
+ if (kDebugLocking && (gAborting == 0)) {
CHECK(IsExclusiveHeld(self)) << *this;
}
}
@@ -246,7 +246,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex {
// Assert the current thread doesn't have exclusive access to the ReaderWriterMutex.
void AssertNotExclusiveHeld(const Thread* self) {
- if (kDebugLocking & (gAborting == 0)) {
+ if (kDebugLocking && (gAborting == 0)) {
CHECK(!IsExclusiveHeld(self)) << *this;
}
}
@@ -257,7 +257,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex {
// Assert the current thread has shared access to the ReaderWriterMutex.
void AssertSharedHeld(const Thread* self) {
- if (kDebugLocking & (gAborting == 0)) {
+ if (kDebugLocking && (gAborting == 0)) {
// TODO: we can only assert this well when self != NULL.
CHECK(IsSharedHeld(self) || self == NULL) << *this;
}