示例#1
0
  void VM::after_fork_child(STATE) {
    thread_nexus_->after_fork_child(state);

    interrupt_lock_.init();
    set_main_thread();
    become_managed();

    // TODO: Remove need for root_vm.
    state->shared().env()->set_root_vm(state->vm());

    state->shared().env()->after_fork_child(state);
  }
示例#2
0
 void restore_thread_phase(ThreadNexus::Phase thread_phase) {
   switch(thread_phase) {
   case ThreadNexus::cManaged:
     become_managed();
     break;
   case ThreadNexus::cBlocking:
   case ThreadNexus::cUnmanaged:
   case ThreadNexus::cWaiting:
   case ThreadNexus::cSleeping:
   default:
     thread_phase_ = thread_phase;
   }
 }