X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9478b64da2f09f9bd3f996a173da98d47f9c7b4c..21fe278c8460849931b37ccde22e944edec46f71:/src/kernel/resource/DiskImpl.hpp diff --git a/src/kernel/resource/DiskImpl.hpp b/src/kernel/resource/DiskImpl.hpp index dde80f529b..80ae7a66e0 100644 --- a/src/kernel/resource/DiskImpl.hpp +++ b/src/kernel/resource/DiskImpl.hpp @@ -49,6 +49,7 @@ public: ************/ class DiskImpl : public Resource, public surf::PropertyHolder { bool currently_destroying_ = false; + s4u::Host* host_ = nullptr; public: DiskImpl(Model* model, const std::string& name, kernel::lmm::System* maxmin_system, double read_bw, double bwrite_bw); @@ -59,7 +60,7 @@ public: /** @brief Public interface */ s4u::Disk piface_; - + s4u::Disk* get_iface() { return &piface_; } /** @brief Check if the Storage is used (if an action currently uses its resources) */ bool is_used() override; @@ -68,6 +69,9 @@ public: void turn_on() override; void turn_off() override; + s4u::Host* get_host() { return host_; } + void set_host(s4u::Host* host) { host_ = host; } + void destroy(); // Must be called instead of the destructor virtual DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) = 0; virtual DiskAction* read(sg_size_t size) = 0;