1 /* Copyright (c) 2017-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 SIMGRID_S4U_IO_HPP
7 #define SIMGRID_S4U_IO_HPP
9 #include <simgrid/forward.h>
10 #include <simgrid/s4u/Activity.hpp>
17 class XBT_PUBLIC Io : public Activity {
20 friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Io* i);
21 friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Io* i);
22 friend Storage; // Factory of IOs
26 Activity* start() override;
27 Activity* wait() override;
28 Activity* wait(double timeout) override;
29 Activity* cancel() override;
31 double get_remaining() override;
35 sg_storage_t storage_ = nullptr;
36 std::atomic_int_fast32_t refcount_{0};
39 }; // Namespace simgrid::s4u
41 #endif /* SIMGRID_S4U_IO_HPP */