- return simgrid::simix::simcall(
- [this]() { return boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->get_remaining(); });
+ xbt_assert(state_ == State::INITED || state_ == State::STARTING, "Cannot set size once the Io is started");
+ kernel::actor::simcall(
+ [this, size] { boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->set_size(size); });
+ Activity::set_remaining(size);
+ return this;
+}
+
+IoPtr Io::set_op_type(OpType type)
+{
+ xbt_assert(state_ == State::INITED || state_ == State::STARTING, "Cannot set size once the Io is started");
+ kernel::actor::simcall(
+ [this, type] { boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->set_type(type); });
+ return this;
+}
+
+IoPtr Io::update_priority(double priority)
+{
+ kernel::actor::simcall([this, priority] {
+ boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->update_sharing_penalty(1. / priority);
+ });
+ return this;