X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6d0a1577e793ff234e7f12de5f13572685538d10..66c9e04ef6dbd72bb5dbc76dfaeb7ed02d6a8c57:/src/s4u/s4u_Io.cpp diff --git a/src/s4u/s4u_Io.cpp b/src/s4u/s4u_Io.cpp index 5f6303fd55..e77c117486 100644 --- a/src/s4u/s4u_Io.cpp +++ b/src/s4u/s4u_Io.cpp @@ -16,7 +16,10 @@ namespace s4u { Activity* Io::start() { - pimpl_ = simix::simcall([this] { return SIMIX_io_start(name_, size_, storage_, type_); }); + Activity::set_remaining(size_); + pimpl_ = simix::simcall([this] { + return boost::static_pointer_cast(SIMIX_io_start(name_, size_, storage_, type_)); + }); state_ = State::STARTED; return this; } @@ -54,13 +57,6 @@ sg_size_t Io::get_performed_ioops() [this]() { return boost::static_pointer_cast(pimpl_)->get_performed_ioops(); }); } -IoPtr Io::set_io_type(OpType type) -{ - xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start"); - type_ = type; - return this; -} - void intrusive_ptr_release(simgrid::s4u::Io* i) { if (i->refcount_.fetch_sub(1, std::memory_order_release) == 1) {