Implement Zygote_nativeForkSystemServer
Change-Id: I2f0c7b93e8ac3b3fa4bb350e787065f92c17972f
diff --git a/src/thread.h b/src/thread.h
index 884aa64..0884d6a 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -167,6 +167,9 @@
// Creates a new thread from the calling thread.
static Thread* Attach(const Runtime* runtime, const char* name, bool as_daemon);
+ // Reset internal state of child thread after fork.
+ void InitAfterFork();
+
static Thread* Current() {
void* thread = pthread_getspecific(Thread::pthread_key_self_);
return reinterpret_cast<Thread*>(thread);
@@ -206,7 +209,9 @@
static int GetNativePriority();
bool CanAccessDirectReferences() const {
+#ifdef MOVING_GARBAGE_COLLECTOR
// TODO: when we have a moving collector, we'll need: return state_ == kRunnable;
+#endif
return true;
}
@@ -469,6 +474,9 @@
void InitCpu();
void InitFunctionPointers();
+ void InitTid();
+ void InitPthread();
+ void InitPthreadKeySelf();
void InitStackHwm();
void NotifyLocked() {