A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to chain calls to activity::Comm functions
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Io.hpp
diff --git
a/include/simgrid/s4u/Io.hpp
b/include/simgrid/s4u/Io.hpp
index
360dd4f
..
4e7ae31
100644
(file)
--- a/
include/simgrid/s4u/Io.hpp
+++ b/
include/simgrid/s4u/Io.hpp
@@
-10,10
+10,16
@@
#include <simgrid/s4u/Activity.hpp>
#include <atomic>
#include <simgrid/s4u/Activity.hpp>
#include <atomic>
+#include <string>
namespace simgrid {
namespace s4u {
namespace simgrid {
namespace s4u {
+/** I/O Activity, representing the asynchronous disk access.
+ *
+ * They are generated from simgrid::s4u::Storage::read() and simgrid::s4u::Storage::write().
+ */
+
class XBT_PUBLIC Io : public Activity {
public:
enum class OpType { READ, WRITE };
class XBT_PUBLIC Io : public Activity {
public:
enum class OpType { READ, WRITE };
@@
-23,18
+29,23
@@
private:
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Io* i);
friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Io* i);
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Io* i);
friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Io* i);
- friend Storage; // Factory of IOs
+ friend
simgrid::s4u::
Storage; // Factory of IOs
~Io() = default;
~Io() = default;
- Activity* start() override;
- Activity* wait() override;
- Activity* wait(double timeout) override;
- Activity* cancel() override;
+ Io* start() override;
+ Io* wait() override;
+ Io* wait_for(double timeout) override;
+ Io* cancel() override;
+ bool test() override;
double get_remaining() override;
sg_size_t get_performed_ioops();
double get_remaining() override;
sg_size_t get_performed_ioops();
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v324("Please use Io::wait_for()") void wait(double t) override { wait_for(t); }
+#endif
+
private:
sg_size_t size_ = 0;
sg_storage_t storage_ = nullptr;
private:
sg_size_t size_ = 0;
sg_storage_t storage_ = nullptr;