+Exec* Exec::wait()
+{
+ return this->wait_for(-1);
+}
+
+Exec* Exec::wait_for(double timeout)
+{
+ if (state_ == State::INITED)
+ vetoable_start();
+ simcall_execution_wait(get_impl(), timeout);
+ state_ = State::FINISHED;
+ on_completion(*Actor::self(), *this);
+ this->release_dependencies();
+ return this;
+}
+
+int Exec::wait_any_for(std::vector<ExecPtr>* execs, double timeout)
+{
+ std::unique_ptr<kernel::activity::ExecImpl* []> rexecs(new kernel::activity::ExecImpl*[execs->size()]);
+ std::transform(begin(*execs), end(*execs), rexecs.get(),
+ [](const ExecPtr& exec) { return static_cast<kernel::activity::ExecImpl*>(exec->pimpl_.get()); });
+
+ int changed_pos = simcall_execution_waitany_for(rexecs.get(), execs->size(), timeout);
+ if (changed_pos != -1)
+ execs->at(changed_pos)->release_dependencies();
+ return changed_pos;
+}
+
+Exec* Exec::cancel()
+{
+ kernel::actor::simcall([this] { boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->cancel(); });
+ state_ = State::CANCELED;
+ return this;
+}
+
+/** @brief change the execution bound
+ * This means changing the maximal amount of flops per second that it may consume, regardless of what the host may
+ * deliver. Currently, this cannot be changed once the exec started.
+ */
+ExecPtr Exec::set_bound(double bound)
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the bound of an exec after its start");
+ bound_ = bound;
+ return this;
+}
+ExecPtr Exec::set_timeout(double timeout) // XBT_ATTRIB_DEPRECATED_v329
+{
+ xbt_assert(state_ == State::INITED, "Cannot change the bound of an exec after its start");
+ timeout_ = timeout;
+ return this;
+}
+
+/** @brief Retrieve the host on which this activity takes place.
+ * If it runs on more than one host, only the first host is returned.
+ */
+Host* Exec::get_host() const
+{
+ return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_host();
+}
+unsigned int Exec::get_host_number() const
+{
+ return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_host_number();
+}
+double Exec::get_start_time() const
+{
+ return (pimpl_->surf_action_ == nullptr) ? -1 : pimpl_->surf_action_->get_start_time();
+}
+double Exec::get_finish_time() const
+{
+ return (pimpl_->surf_action_ == nullptr) ? -1 : pimpl_->surf_action_->get_finish_time();
+}
+double Exec::get_cost() const
+{
+ return (pimpl_->surf_action_ == nullptr) ? -1 : pimpl_->surf_action_->get_cost();
+}
+