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
Merge branch 'master' into depencencies
[simgrid.git]
/
src
/
kernel
/
activity
/
IoImpl.hpp
diff --git
a/src/kernel/activity/IoImpl.hpp
b/src/kernel/activity/IoImpl.hpp
index
8d8f04c
..
897cfb5
100644
(file)
--- a/
src/kernel/activity/IoImpl.hpp
+++ b/
src/kernel/activity/IoImpl.hpp
@@
-1,10
+1,10
@@
-/* Copyright (c) 2007-20
19
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-20
20
. 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. */
-#ifndef SIM
IX_SYNCHRO
_IO_HPP
-#define SIM
IX_SYNCHRO
_IO_HPP
+#ifndef SIM
GRID_KERNEL_ACTIVITY
_IO_HPP
+#define SIM
GRID_KERNEL_ACTIVITY
_IO_HPP
#include "src/kernel/activity/ActivityImpl.hpp"
#include "surf/surf.hpp"
#include "src/kernel/activity/ActivityImpl.hpp"
#include "surf/surf.hpp"
@@
-20,6
+20,7
@@
class XBT_PUBLIC IoImpl : public ActivityImpl_T<IoImpl> {
sg_size_t size_ = 0;
s4u::Io::OpType type_ = s4u::Io::OpType::READ;
sg_size_t performed_ioops_ = 0;
sg_size_t size_ = 0;
s4u::Io::OpType type_ = s4u::Io::OpType::READ;
sg_size_t performed_ioops_ = 0;
+ resource::Action* timeout_detector_ = nullptr;
public:
IoImpl& set_size(sg_size_t size);
public:
IoImpl& set_size(sg_size_t size);
@@
-27,7
+28,15
@@
public:
IoImpl& set_storage(resource::StorageImpl* storage);
IoImpl& set_disk(resource::DiskImpl* disk);
IoImpl& set_storage(resource::StorageImpl* storage);
IoImpl& set_disk(resource::DiskImpl* disk);
+ void set_timeout_detector(resource::Action* action)
+ {
+ timeout_detector_ = action;
+ timeout_detector_->set_activity(this);
+ }
+
sg_size_t get_performed_ioops() { return performed_ioops_; }
sg_size_t get_performed_ioops() { return performed_ioops_; }
+ resource::DiskImpl* get_disk() { return disk_; }
+ resource::StorageImpl* get_storage() { return storage_; }
IoImpl* start();
void post() override;
IoImpl* start();
void post() override;