X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d3c3c5a5d42d3147315c7b9080025558610e5502..1c75860aa49dbde3f251678a7d00a2e27660efa8:/src/kernel/activity/ExecImpl.cpp diff --git a/src/kernel/activity/ExecImpl.cpp b/src/kernel/activity/ExecImpl.cpp index 5b60a5781a..cfdf73e8e1 100644 --- a/src/kernel/activity/ExecImpl.cpp +++ b/src/kernel/activity/ExecImpl.cpp @@ -43,7 +43,7 @@ void simcall_HANDLER_execution_test(smx_simcall_t simcall, simgrid::kernel::acti synchro->simcalls_.push_back(simcall); synchro->finish(); } else { - SIMIX_simcall_answer(simcall); + simcall->issuer->simcall_answer(); } simcall_execution_test__set__result(simcall, res); } @@ -52,9 +52,9 @@ void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kerne size_t count, double timeout) { if (timeout < 0.0) { - simcall->timer = nullptr; + simcall->timeout_cb = nullptr; } else { - simcall->timer = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() { + simcall->timeout_cb = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() { for (size_t i = 0; i < count; i++) { // Remove the first occurence of simcall: auto* exec = execs[i]; @@ -63,7 +63,7 @@ void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kerne exec->simcalls_.erase(j); } simcall_execution_waitany_for__set__result(simcall, -1); - SIMIX_simcall_answer(simcall); + simcall->issuer->simcall_answer(); }); } @@ -141,7 +141,7 @@ ExecImpl* ExecImpl::start() if (not MC_is_active() && not MC_record_replay_is_active()) { if (hosts_.size() == 1) { surf_action_ = hosts_.front()->pimpl_cpu->execution_start(flops_amounts_.front()); - surf_action_->set_priority(priority_); + surf_action_->set_sharing_penalty(sharing_penalty_); surf_action_->set_category(get_tracing_category()); if (bound_ > 0) @@ -174,9 +174,9 @@ ExecImpl& ExecImpl::set_bound(double bound) return *this; } -ExecImpl& ExecImpl::set_priority(double priority) +ExecImpl& ExecImpl::set_sharing_penalty(double sharing_penalty) { - priority_ = priority; + sharing_penalty_ = sharing_penalty; return *this; } @@ -232,9 +232,9 @@ void ExecImpl::finish() if (j != exec->simcalls_.end()) exec->simcalls_.erase(j); - if (simcall->timer) { - simcall->timer->remove(); - simcall->timer = nullptr; + if (simcall->timeout_cb) { + simcall->timeout_cb->remove(); + simcall->timeout_cb = nullptr; } } @@ -269,7 +269,7 @@ void ExecImpl::finish() case SIMIX_TIMEOUT: XBT_DEBUG("ExecImpl::finish(): execution timeouted"); - simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutError(XBT_THROW_POINT, "Timeouted")); + simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutException(XBT_THROW_POINT, "Timeouted")); break; default: @@ -279,7 +279,7 @@ void ExecImpl::finish() simcall->issuer->waiting_synchro = nullptr; /* Fail the process if the host is down */ if (simcall->issuer->get_host()->is_on()) - SIMIX_simcall_answer(simcall); + simcall->issuer->simcall_answer(); else simcall->issuer->context_->iwannadie = true; } @@ -292,7 +292,7 @@ ActivityImpl* ExecImpl::migrate(s4u::Host* to) resource::Action* new_action = to->pimpl_cpu->execution_start(old_action->get_cost()); new_action->set_remains(old_action->get_remains()); new_action->set_activity(this); - new_action->set_priority(old_action->get_priority()); + new_action->set_sharing_penalty(old_action->get_sharing_penalty()); // FIXME: the user-defined bound seem to not be kept by LMM, that seem to overwrite it for the multi-core modeling. // I hope that the user did not provide any.