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
ActorImpl: postpone the on_destroy signal to the destructor
[simgrid.git]
/
src
/
kernel
/
activity
/
IoImpl.hpp
diff --git
a/src/kernel/activity/IoImpl.hpp
b/src/kernel/activity/IoImpl.hpp
index
71f1a45
..
2ab4ff7
100644
(file)
--- a/
src/kernel/activity/IoImpl.hpp
+++ b/
src/kernel/activity/IoImpl.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-201
9
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-8,21
+8,34
@@
#include "src/kernel/activity/ActivityImpl.hpp"
#include "surf/surf.hpp"
#include "src/kernel/activity/ActivityImpl.hpp"
#include "surf/surf.hpp"
+#include <simgrid/s4u/Io.hpp>
namespace simgrid {
namespace kernel {
namespace activity {
namespace simgrid {
namespace kernel {
namespace activity {
-class XBT_PUBLIC IoImpl : public ActivityImpl {
+class XBT_PUBLIC IoImpl : public ActivityImpl_T<IoImpl> {
+ resource::StorageImpl* storage_ = nullptr;
+ sg_size_t size_ = 0;
+ s4u::Io::OpType type_ = s4u::Io::OpType::READ;
+ sg_size_t performed_ioops_ = 0;
+
public:
public:
- void suspend() override;
- void resume() override;
+ IoImpl& set_size(sg_size_t size);
+ IoImpl& set_type(s4u::Io::OpType type);
+ IoImpl& set_storage(resource::StorageImpl* storage);
+
+ sg_size_t get_performed_ioops() { return performed_ioops_; }
+
+ IoImpl* start();
void post() override;
void post() override;
+ void finish() override;
- simgrid::kernel::resource::Action* surf_action_ = nullptr;
+ static xbt::signal<void(IoImpl const&)> on_start;
+ static xbt::signal<void(IoImpl const&)> on_completion;
};
};
-}
-}
-} // namespace simgrid
::kernel::activity
+}
// namespace activity
+}
// namespace kernel
+} // namespace simgrid
#endif
#endif