summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-12-05 04:05:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-05 04:05:51 +0000
commitc5454372f23da8248c84c29e251fb1b21c421a63 (patch)
tree4b08c00ba9bc427771413a758c669df56dbba62d /runtime/runtime.h
parentaad9c0767a8f8ae6250a7b4edee52cfb6d598687 (diff)
parent015b137efb434528173779bc3ec8d72494456254 (diff)
downloadart-c5454372f23da8248c84c29e251fb1b21c421a63.tar.gz
art-c5454372f23da8248c84c29e251fb1b21c421a63.tar.bz2
art-c5454372f23da8248c84c29e251fb1b21c421a63.zip
Merge "Tidy gAborting."
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 39fd91089..e334764da 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -71,6 +71,11 @@ class ThreadList;
class Trace;
class Transaction;
+// 0 if not abort, non-zero if an abort is in progress. Used on fatal exit to prevents recursive
+// aborts. Global declaration allows us to disable some error checking to ensure fatal shutdown
+// makes forward progress.
+extern volatile unsigned int gAborting;
+
typedef std::vector<std::pair<std::string, const void*>> RuntimeOptions;
// Not all combinations of flags are valid. You may not visit all roots as well as the new roots
@@ -175,9 +180,9 @@ class Runtime {
return instance_;
}
- // Aborts semi-cleanly. Used in the implementation of LOG(FATAL), which most
- // callers should prefer.
- [[noreturn]] static void Abort() LOCKS_EXCLUDED(Locks::abort_lock_);
+ // Aborts semi-cleanly. Used in the implementation of LOG(FATAL), which most callers should
+ // prefer. Not [[noreturn]] due to returning early in the case of recursive aborts.
+ static void Abort() LOCKS_EXCLUDED(Locks::abort_lock_);
// Returns the "main" ThreadGroup, used when attaching user threads.
jobject GetMainThreadGroup() const;