More of the thread infrastructure.
We can now run managed code on multiple threads.
Change-Id: Ia4ce9c94602773db238c967c15194a6db780d12f
diff --git a/src/thread_list.h b/src/thread_list.h
index 12fdde4..df9eb7e 100644
--- a/src/thread_list.h
+++ b/src/thread_list.h
@@ -41,6 +41,9 @@
void VisitRoots(Heap::RootVisitor* visitor, void* arg) const;
+ void SignalGo(Thread* child);
+ void WaitForGo();
+
private:
uint32_t AllocThreadId();
void ReleaseThreadId(uint32_t id);
@@ -49,6 +52,8 @@
std::bitset<kMaxThreadId> allocated_ids_;
std::list<Thread*> list_;
+ static pthread_cond_t thread_start_cond_;
+
friend class Thread;
friend class ThreadListLock;
@@ -64,7 +69,7 @@
}
Thread::State old_state;
if (self != NULL) {
- old_state = self->SetState(Thread::kWaiting); // TODO: VMWAIT
+ old_state = self->SetState(Thread::kVmWait);
} else {
// This happens during VM shutdown.
old_state = Thread::kUnknown;