Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add the capacity the update the priority of an I/O during its execution
[simgrid.git] / src / s4u / s4u_Io.cpp
index 4906e79..ea8960b 100644 (file)
@@ -105,6 +105,14 @@ IoPtr Io::set_op_type(OpType 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;
+}
+
 /** @brief Returns the amount of flops that remain to be done */
 double Io::get_remaining() const
 {