Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
stupid me. try again
[simgrid.git] / src / s4u / s4u_Io.cpp
index 88d78a7..e77c117 100644 (file)
@@ -16,8 +16,10 @@ namespace s4u {
 
 Activity* Io::start()
 {
-  set_remaining(size_);
-  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<kernel::activity::IoImpl>(SIMIX_io_start(name_, size_, storage_, type_));
+  });
   state_ = State::STARTED;
   return this;
 }
@@ -55,13 +57,6 @@ sg_size_t Io::get_performed_ioops()
       [this]() { return boost::static_pointer_cast<kernel::activity::IoImpl>(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) {