int procKill(int pid){ if(pid == IDLE_PROCCES || pid == INIT_PROCESS) /* Estos procesos no se pueden matar */ return 0; /* El proceso no existe o no está vivo */ if(proc[pid%MAX_PROCESS].pid != pid || proc[pid%MAX_PROCESS].status != READY) return 0; untagAll(); tagDescendants(pid); removeTagged(); return 1; }
bool arlCore::PlaneSystem::getTrf( unsigned int plane1, unsigned int plane2, vnl_rigid_matrix &T, bool verbose ) { // verbose = false; // TODO : Manage the cases when there are many paths to reach plane2 // TODO : Prendre uniquement le chemin le plus r�cent, le plus court, celui de poids minimum // TODO : Ne pas poursuivre dans les chemins incompatible avec la date // assert(!outOfRange(plane1, plane2)); if(outOfRange(plane1, plane2)) { T.setIdentity(); T.setTime(0, 0); return false; } // Object::update(); // ? const long int Date = 0, Time = 0; // FIXME if(plane1 != plane2) { if(isConnected( plane1, plane2, Date, Time, true, false )) { if(verbose) std::cout<<"From "<<plane1<<" to "<<plane2<<"\n"; T = m_trfTable[getIndex(plane1, plane2)]; return true; } //std::vector< unsigned int >path; PlaneSystem::Path path(*this); bool b=findPath( plane1, plane2, path, Date, Time ); if(b) { if(verbose) path.print(); setTrf(path); T = m_trfTable[getIndex(plane1, plane2)]; }else { T.setIdentity(); T.setTime(0, 0); } untagAll(); return b; } T.setIdentity(); T.setTime(getDate(), getTime()); return true; }