on_resumed(*this);
}
+void ActivityImpl::cancel()
+{
+ XBT_VERB("Activity %p is canceled", this);
+ if (surf_action_ != nullptr)
+ surf_action_->cancel();
+}
+
// boost::intrusive_ptr<Activity> support:
void intrusive_ptr_add_ref(simgrid::kernel::activity::ActivityImpl* activity)
{
virtual void suspend();
virtual void resume();
+ virtual void cancel();
virtual void post() = 0; // What to do when a simcall terminates
virtual void finish() = 0;
void resume() override;
void post() override;
void finish() override;
- void cancel();
+ void cancel() override;
CommImpl::Type type_; /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
MailboxImpl* mbox = nullptr; /* Rendez-vous where the comm is queued */
return this;
}
-void ExecImpl::cancel()
-{
- XBT_VERB("This exec %p is canceled", this);
- if (surf_action_ != nullptr)
- surf_action_->cancel();
-}
-
double ExecImpl::get_seq_remaining_ratio()
{
return (surf_action_ == nullptr) ? 0 : surf_action_->get_remains() / surf_action_->get_cost();
virtual ActivityImpl* migrate(s4u::Host* to);
ExecImpl* start();
- void cancel();
void post() override;
void finish() override;
return this;
}
-void IoImpl::cancel()
-{
- XBT_VERB("This exec %p is canceled", this);
- if (surf_action_ != nullptr)
- surf_action_->cancel();
- state_ = SIMIX_CANCELED;
-}
-
void IoImpl::post()
{
performed_ioops_ = surf_action_->get_cost();
IoImpl* start();
void post() override;
void finish() override;
- void cancel();
static xbt::signal<void(IoImpl const&)> on_start;
static xbt::signal<void(IoImpl const&)> on_completion;
/* I cannot resume raw synchros directly. This is delayed to when the process is rescheduled at
* the end of the synchro. */
}
+
+void RawImpl::cancel()
+{
+ /* I cannot cancel raw synchros directly. */
+}
+
void RawImpl::post()
{
if (surf_action_->get_state() == resource::Action::State::FAILED) {
RawImpl* start();
void suspend() override;
void resume() override;
+ void cancel() override;
void post() override;
void finish() override;
};