void PendingSelfSignals::pass_to_Self(oop resultArg) { if (SignalInterface::are_self_signals_blocked()) fatal("signals are blocked -- shouldn't transfer"); // must block interrupts to avoid interference from signal_handler { SignalBlocker sb; fint index = 1; for (fint i = 0; i < n_real_SelfSignals; ++i ) { smi c = count(SelfSignal(i)); if ( c != 0) { resultArg->obj_at_put(index++, name(SelfSignal(i))); resultArg->obj_at_put(index++, as_smiOop(c)); reset(SelfSignal(i)); } } _are_any_pending = false; _know_if_any_pending = true; resultArg->obj_at_put(0, as_smiOop(index / 2)); } }
oop processOopClass::get_result(oop resultArg) { // compute result and fill in result vector if necessary oop res; switch (preemptCause) { case cTerminated: case cAborted: res = VMString[causeString[preemptCause]]; delete prevProcess; break; case cStackOverflowed: case cNonLIFOBlock: res = VMString[causeString[preemptCause]]; assert(prevProcess->state == stopped, "wrong state"); break; case cSingleStepped: case cFinishedActivation: case cCouldntAllocateStack: case cLowOnSpace: res = VMString[causeString[preemptCause]]; break; case cYielded: res = VMString[causeString[preemptCause]]; resultArg->obj_at_put(0, yieldRcvr); resultArg->obj_at_put(1, yieldArg); break; case cSignal: res = VMString[SIGNAL]; PendingSelfSignals::pass_to_Self(resultArg); break; case cNoCause: case cLast: default: fatal1("unknown/illegal preemptCause %ld", preemptCause); } return res; }