X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/939476f1fc7630eb237535b07ed0deef77ce1b24..d46afc036c17f291795eaaab14ce42d0a96e3feb:/include/simgrid/s4u/Storage.hpp diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index f9d55c4848..7559611c7f 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -7,6 +7,7 @@ #define INCLUDE_SIMGRID_S4U_STORAGE_HPP_ #include +#include #include #include #include @@ -16,17 +17,17 @@ #include namespace simgrid { -namespace xbt { -extern template class XBT_PUBLIC Extendable; -} namespace s4u { -/** @deprecated Engine::get_all_storages() */ -XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_storages()") XBT_PUBLIC void getStorageList(std::map* whereTo); +/** Storage represent the disk resources, usually associated to a given host + * + * By default, SimGrid does not keep track of the actual data being written but + * only computes the time taken by the corresponding data movement. + */ class XBT_PUBLIC Storage : public simgrid::xbt::Extendable { - friend s4u::Engine; - friend s4u::Io; + friend simgrid::s4u::Engine; + friend simgrid::s4u::Io; friend simgrid::surf::StorageImpl; public: @@ -34,7 +35,6 @@ public: protected: virtual ~Storage() = default; - public: /** @brief Callback signal fired when a new Storage is created */ static simgrid::xbt::signal 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_; }