diff options
Diffstat (limited to 'runtime/base/mutex.h')
-rw-r--r-- | runtime/base/mutex.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index 9c93cc6..41b5f12 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -220,7 +220,7 @@ class LOCKABLE Mutex : public BaseMutex { // Assert that the Mutex is exclusively held by the current thread. void AssertExclusiveHeld(const Thread* self) { - if (kDebugLocking && (gAborting == 0)) { + if (kDebugLocking) { CHECK(IsExclusiveHeld(self)) << *this; } } @@ -228,7 +228,7 @@ class LOCKABLE Mutex : public BaseMutex { // Assert that the Mutex is not held by the current thread. void AssertNotHeldExclusive(const Thread* self) { - if (kDebugLocking && (gAborting == 0)) { + if (kDebugLocking) { CHECK(!IsExclusiveHeld(self)) << *this; } } @@ -318,7 +318,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) { CHECK(IsExclusiveHeld(self)) << *this; } } @@ -326,7 +326,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) { CHECK(!IsExclusiveHeld(self)) << *this; } } @@ -337,7 +337,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) { // TODO: we can only assert this well when self != NULL. CHECK(IsSharedHeld(self) || self == NULL) << *this; } @@ -347,7 +347,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex { // Assert the current thread doesn't hold this ReaderWriterMutex either in shared or exclusive // mode. void AssertNotHeld(const Thread* self) { - if (kDebugLocking && (gAborting == 0)) { + if (kDebugLocking) { CHECK(!IsSharedHeld(self)) << *this; } } |