namespace kernel {
namespace activity {
+ExecImpl::ExecImpl()
+{
+ actor::ActorImpl* self = actor::ActorImpl::self();
+ if (self) {
+ actor_ = self;
+ self->activities.push_back(this);
+ }
+}
+
ExecImpl& ExecImpl::set_host(s4u::Host* host)
{
hosts_.assign(1, host);
clean_action();
timeout_detector_.reset();
+ if (actor_) {
+ actor_->activities.remove(this);
+ actor_ = nullptr;
+ }
/* Answer all simcalls associated with the synchro */
finish();
}
class XBT_PUBLIC ExecImpl : public ActivityImpl_T<ExecImpl> {
std::unique_ptr<resource::Action, std::function<void(resource::Action*)>> timeout_detector_{
nullptr, [](resource::Action* a) { a->unref(); }};
+ actor::ActorImpl* actor_ = nullptr;
double sharing_penalty_ = 1.0;
double bound_ = 0.0;
std::vector<s4u::Host*> hosts_;
std::vector<double> bytes_amounts_;
public:
+ ExecImpl();
+
ExecImpl& set_timeout(double timeout) override;
ExecImpl& set_bound(double bound);
ExecImpl& set_sharing_penalty(double sharing_penalty);