Add thread state descriptive comment
I would have found this comment helpful while investigating the bug below.
Bug: 113361290
Test: Treehugger
Change-Id: Ibb4299f4e9c08f9561db42ffeeec296b869fb416
diff --git a/runtime/thread_state.h b/runtime/thread_state.h
index c8f3826..f36bc80 100644
--- a/runtime/thread_state.h
+++ b/runtime/thread_state.h
@@ -21,7 +21,12 @@
namespace art {
+// State stored in our C++ class Thread.
+// When we refer to "a suspended state", or when function names mention "ToSuspended" or
+// "FromSuspended", we mean any state other than kRunnable, i.e. any state in which the thread is
+// guaranteed not to access the Java heap. The kSuspended state is merely one of these.
enum ThreadState {
+ // Java
// Thread.State JDWP state
kTerminated = 66, // TERMINATED TS_ZOMBIE Thread.run has returned, but Thread* still around
kRunnable, // RUNNABLE TS_RUNNING runnable