Beispiel #1
0
void OSSim::eventExit(Pid_t cpid, int32_t err)
{
    LOG("OSSim::exit err[%d] (cpid %d)", err, cpid);
    ProcessId *proc = ProcessId::getProcessId(cpid);
    I(proc);
    // If not in InvalidState, removefrom the running queue
    if(proc->getState()==RunningState || proc->getState()==ReadyState )
        cpus.makeNonRunnable(proc);
    // Try to wakeup parent
    tryWakeupParent(cpid);
    // Destroy the process
    proc->destroy();

#ifdef SESC_THERM
    ReportTherm::stopCB();
#endif
}