summaryrefslogtreecommitdiff
path: root/runtime/base/mutex-inl.h
diff options
context:
space:
mode:
author David Sehr <sehr@google.com> 2016-10-19 13:20:45 -0700
committer David Sehr <sehr@google.com> 2016-10-20 13:40:56 -0700
commitf42eb2c7801dbb45a6ba20a372d5ba4712ebefba (patch)
tree62939df36e0d113aab0307f75ab728de72b80953 /runtime/base/mutex-inl.h
parentfc5fbfc13fd6873d42fe82c308ee68a685258b4c (diff)
Remove mutex dependency on art::Runtime
Breaks the cyclic dependency between mutex and the runtime. This allows the use of mutexes without instantiating a runtime. Bug: 22322814 Test: test-art Change-Id: Ia642e515937068d385e5bb1e10bbd3e50a6e36d2
Diffstat (limited to 'runtime/base/mutex-inl.h')
-rw-r--r--runtime/base/mutex-inl.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index 1c320243dc..92b7c6537c 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -23,7 +23,6 @@
#include "base/stringprintf.h"
#include "base/value_object.h"
-#include "runtime.h"
#include "thread.h"
#include "utils.h"
@@ -59,8 +58,7 @@ static inline void CheckUnattachedThread(LockLevel level) NO_THREAD_SAFETY_ANALY
// on a thread. Lock checking is disabled to avoid deadlock when checking shutdown lock.
// TODO: tighten this check.
if (kDebugLocking) {
- Runtime* runtime = Runtime::Current();
- CHECK(runtime == nullptr || !runtime->IsStarted() || runtime->IsShuttingDownLocked() ||
+ CHECK(!Locks::IsSafeToCallAbortRacy() ||
// Used during thread creation to avoid races with runtime shutdown. Thread::Current not
// yet established.
level == kRuntimeShutdownLock ||