diff options
author | Ian Rogers <irogers@google.com> | 2014-12-05 04:05:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-05 04:05:51 +0000 |
commit | c5454372f23da8248c84c29e251fb1b21c421a63 (patch) | |
tree | 4b08c00ba9bc427771413a758c669df56dbba62d /runtime/runtime.h | |
parent | aad9c0767a8f8ae6250a7b4edee52cfb6d598687 (diff) | |
parent | 015b137efb434528173779bc3ec8d72494456254 (diff) | |
download | art-c5454372f23da8248c84c29e251fb1b21c421a63.tar.gz art-c5454372f23da8248c84c29e251fb1b21c421a63.tar.bz2 art-c5454372f23da8248c84c29e251fb1b21c421a63.zip |
Merge "Tidy gAborting."
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r-- | runtime/runtime.h | 11 |
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; |