A little bit more of the threads implementation.
The most important change here is understanding that Thread's id_ field
was unrelated to java.lang.Thread's id field.
Change-Id: I832b92145332e1ded63a7824033dae684eeacf28
diff --git a/src/runtime.h b/src/runtime.h
index 8a6ffe3..db86a96 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -68,6 +68,8 @@
// Starts a runtime, which may cause threads to be started and code to run.
void Start();
+ bool IsStarted();
+
static Runtime* Current() {
return instance_;
}
@@ -119,8 +121,7 @@
private:
static void PlatformAbort(const char*, int);
- Runtime() : stack_size_(0), thread_list_(NULL), intern_table_(NULL), class_linker_(NULL),
- signal_catcher_(NULL) {}
+ Runtime();
void BlockSignals();
@@ -141,6 +142,8 @@
JavaVMExt* java_vm_;
+ bool started_;
+
// Hooks supported by JNI_CreateJavaVM
jint (*vfprintf_)(FILE* stream, const char* format, va_list ap);
void (*exit_)(jint status);