XBT_VERB("This exec is suspended (remain: %f)", surf_action_->get_remains());
if (surf_action_ != nullptr)
surf_action_->suspend();
+ on_suspended(this);
}
void simgrid::kernel::activity::ExecImpl::resume()
XBT_VERB("This exec is resumed (remain: %f)", surf_action_->get_remains());
if (surf_action_ != nullptr)
surf_action_->resume();
+ on_resumed(this);
}
void simgrid::kernel::activity::ExecImpl::cancel()
{
surf_action_->set_priority(priority);
}
+void simgrid::kernel::activity::ExecImpl::set_category(std::string category)
+{
+ if (surf_action_)
+ surf_action_->set_category(category);
+}
+
void simgrid::kernel::activity::ExecImpl::post()
{
if (host_ && host_->is_off()) { /* FIXME: handle resource failure for parallel tasks too */
state_ = SIMIX_DONE;
}
+ on_completion(this);
+
if (surf_action_) {
surf_action_->unref();
surf_action_ = nullptr;
timeout_detector_ = nullptr;
}
- on_completion(this);
/* If there are simcalls associated with the synchro, then answer them */
if (not simcalls_.empty())
SIMIX_execution_finish(this);
*************/
simgrid::xbt::signal<void(simgrid::kernel::activity::ExecImplPtr)> simgrid::kernel::activity::ExecImpl::on_creation;
simgrid::xbt::signal<void(simgrid::kernel::activity::ExecImplPtr)> simgrid::kernel::activity::ExecImpl::on_completion;
+simgrid::xbt::signal<void(simgrid::kernel::activity::ExecImplPtr)> simgrid::kernel::activity::ExecImpl::on_resumed;
+simgrid::xbt::signal<void(simgrid::kernel::activity::ExecImplPtr)> simgrid::kernel::activity::ExecImpl::on_suspended;
simgrid::xbt::signal<void(simgrid::kernel::activity::ExecImplPtr, simgrid::s4u::Host*)>
simgrid::kernel::activity::ExecImpl::on_migration;