Added CheckSuspend and UpdateDebugger to interpreter loop.
Moved CheckSuspend so that the code doesn't need to be repeated in LLVM
as well.
Change-Id: I1073f82352593bf0d5f99b28d382e4687f3a0d90
diff --git a/src/runtime_support.h b/src/runtime_support.h
index 5a5cdcd..e54e05b 100644
--- a/src/runtime_support.h
+++ b/src/runtime_support.h
@@ -280,6 +280,20 @@
}
}
+static inline void CheckSuspend(Thread* thread)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ for (;;) {
+ if (thread->ReadFlag(kCheckpointRequest)) {
+ thread->RunCheckpointFunction();
+ thread->AtomicClearFlag(kCheckpointRequest);
+ } else if (thread->ReadFlag(kSuspendRequest)) {
+ thread->FullSuspendCheck();
+ } else {
+ break;
+ }
+ }
+}
+
} // namespace art
#endif // ART_SRC_RUNTIME_SUPPORT_H_