Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tuto_s4u: add exo 1
[simgrid.git] / include / simgrid / s4u / Storage.hpp
index f9d55c4..b807c7f 100644 (file)
@@ -7,6 +7,7 @@
 #define INCLUDE_SIMGRID_S4U_STORAGE_HPP_
 
 #include <simgrid/forward.h>
+#include <simgrid/s4u/Io.hpp>
 #include <xbt/Extendable.hpp>
 #include <xbt/base.h>
 #include <xbt/signal.hpp>
@@ -34,7 +35,6 @@ public:
 
 protected:
   virtual ~Storage() = default;
-
 public:
   /** @brief Callback signal fired when a new Storage is created */
   static simgrid::xbt::signal<void(s4u::Storage&)> on_creation;
@@ -63,9 +63,12 @@ public:
   void set_data(void* data) { userdata_ = data; }
   void* get_data() { return userdata_; }
 
-  static IoPtr io_init(sg_size_t size);
+  IoPtr io_init(sg_size_t size, s4u::Io::OpType type);
 
+  IoPtr read_async(sg_size_t size);
   sg_size_t read(sg_size_t size);
+
+  IoPtr write_async(sg_size_t size);
   sg_size_t write(sg_size_t size);
   surf::StorageImpl* get_impl() { return pimpl_; }