1 /* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMIX_SYNCHRO_IO_HPP
7 #define SIMIX_SYNCHRO_IO_HPP
9 #include "src/kernel/activity/ActivityImpl.hpp"
10 #include "surf/surf.hpp"
16 class XBT_PUBLIC IoImpl : public ActivityImpl {
19 explicit IoImpl(std::string name, resource::Action* surf_action, s4u::Storage* storage);
21 void suspend() override;
22 void resume() override;
25 double get_remaining();
26 sg_size_t get_performed_ioops() { return performed_ioops_; }
28 s4u::Storage* storage_ = nullptr;
29 simgrid::kernel::resource::Action* surf_action_ = nullptr;
30 sg_size_t performed_ioops_ = 0;
31 static simgrid::xbt::signal<void(kernel::activity::IoImplPtr)> on_creation;
32 static simgrid::xbt::signal<void(kernel::activity::IoImplPtr)> on_completion;
36 } // namespace simgrid::kernel::activity