comm->simcalls_.push_back(simcall);
comm->finish();
} else {
- SIMIX_simcall_answer(simcall);
+ simcall->issuer->simcall_answer();
}
}
if (MC_is_active() || MC_record_replay_is_active()) {
int idx = SIMCALL_GET_MC_VALUE(*simcall);
if (idx == -1) {
- SIMIX_simcall_answer(simcall);
+ simcall->issuer->simcall_answer();
} else {
simgrid::kernel::activity::CommImpl* comm = comms[idx];
simcall_comm_testany__set__result(simcall, idx);
return;
}
}
- SIMIX_simcall_answer(simcall);
+ simcall->issuer->simcall_answer();
}
static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
}
if (timeout < 0.0) {
- simcall->timer = NULL;
+ simcall->timeout_cb = NULL;
} else {
- simcall->timer = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
+ simcall->timeout_cb = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall]() {
SIMIX_waitany_remove_simcall_from_actions(simcall);
simcall_comm_waitany__set__result(simcall, -1);
- SIMIX_simcall_answer(simcall);
+ simcall->issuer->simcall_answer();
});
}
continue; // if process handling comm is killed
if (simcall->call == SIMCALL_COMM_WAITANY) {
SIMIX_waitany_remove_simcall_from_actions(simcall);
- if (simcall->timer) {
- simcall->timer->remove();
- simcall->timer = nullptr;
+ if (simcall->timeout_cb) {
+ simcall->timeout_cb->remove();
+ simcall->timeout_cb = nullptr;
}
if (not MC_is_active() && not MC_record_replay_is_active()) {
CommImpl** comms = simcall_comm_waitany__get__comms(simcall);
}
if (simcall->issuer->get_host()->is_on())
- SIMIX_simcall_answer(simcall);
+ simcall->issuer->simcall_answer();
else
simcall->issuer->context_->iwannadie = true;
}