X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50ddfe2f5b5035e0ed9556b334d6977ee81ff83a..9fa0e6bf860ab0a45cb0fde9093bc01442f3698b:/src/s4u/s4u_Io.cpp diff --git a/src/s4u/s4u_Io.cpp b/src/s4u/s4u_Io.cpp index 88d78a7040..65421f45be 100644 --- a/src/s4u/s4u_Io.cpp +++ b/src/s4u/s4u_Io.cpp @@ -8,6 +8,7 @@ #include "src/kernel/activity/IoImpl.hpp" #include "src/simix/smx_io_private.hpp" #include "xbt/log.h" +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_io, s4u_activity, "S4U asynchronous IOs"); @@ -16,8 +17,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(SIMIX_io_start(name_, size_, storage_, type_)); + }); state_ = State::STARTED; return this; } @@ -55,13 +58,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) {