A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
declare an Io::OpType enum class
[simgrid.git]
/
src
/
s4u
/
s4u_Io.cpp
diff --git
a/src/s4u/s4u_Io.cpp
b/src/s4u/s4u_Io.cpp
index
4dfbfa2
..
2f6d6ed
100644
(file)
--- a/
src/s4u/s4u_Io.cpp
+++ b/
src/s4u/s4u_Io.cpp
@@
-6,6
+6,7
@@
#include "simgrid/s4u/Io.hpp"
#include "simgrid/s4u/Storage.hpp"
#include "src/kernel/activity/IoImpl.hpp"
#include "simgrid/s4u/Io.hpp"
#include "simgrid/s4u/Storage.hpp"
#include "src/kernel/activity/IoImpl.hpp"
+#include "src/simix/smx_io_private.hpp"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_io, s4u_activity, "S4U asynchronous IOs");
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_io, s4u_activity, "S4U asynchronous IOs");
@@
-15,7
+16,7
@@
namespace s4u {
Activity* Io::start()
{
Activity* Io::start()
{
- pimpl_ = sim
call_io_start("", size_, storage_
);
+ pimpl_ = sim
ix::simcall([this] { return SIMIX_io_start(name_, size_, storage_, type_); }
);
state_ = State::STARTED;
return this;
}
state_ = State::STARTED;
return this;
}
@@
-66,6
+67,13
@@
double Io::get_remaining()
[this]() { return boost::static_pointer_cast<simgrid::kernel::activity::IoImpl>(pimpl_)->get_remaining(); });
}
[this]() { return boost::static_pointer_cast<simgrid::kernel::activity::IoImpl>(pimpl_)->get_remaining(); });
}
+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;
+}
+
// double Io::get_remaining_ratio()
//{
// return simgrid::simix::simcall([this]() {
// double Io::get_remaining_ratio()
//{
// return simgrid::simix::simcall([this]() {