- SIMIX_execution_destroy(synchro);
-}
-
-
-void SIMIX_post_host_execute(smx_synchro_t synchro)
-{
- simgrid::simix::Exec *exec = dynamic_cast<simgrid::simix::Exec *>(synchro);
-
- if (exec != nullptr && exec->host && /* FIMXE: handle resource failure for parallel tasks too */
- exec->host->isOff()) {
- /* If the host running the synchro failed, notice it. This way, the asking
- * process can be killed if it runs on that host itself */
- synchro->state = SIMIX_FAILED;
- } else if (exec->surf_exec->getState() == simgrid::surf::Action::State::failed) {
- /* If the host running the synchro didn't fail, then the synchro was canceled */
- synchro->state = SIMIX_CANCELED;
- } else {
- synchro->state = SIMIX_DONE;
- }
-
- if (exec != nullptr && exec->surf_exec) {
- exec->surf_exec->unref();
- exec->surf_exec = NULL;
- }
-
- /* If there are simcalls associated with the synchro, then answer them */
- if (xbt_fifo_size(synchro->simcalls)) {
- SIMIX_execution_finish(synchro);
- }