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
use signal to trace link usage
[simgrid.git]
/
src
/
surf
/
network_interface.cpp
diff --git
a/src/surf/network_interface.cpp
b/src/surf/network_interface.cpp
index
2ccae96
..
7391e1d
100644
(file)
--- a/
src/surf/network_interface.cpp
+++ b/
src/surf/network_interface.cpp
@@
-145,7
+145,7
@@
void LinkImpl::destroy()
{
if (not currentlyDestroying_) {
currentlyDestroying_ = true;
- s4u::Link::on
D
estruction(this->piface_);
+ s4u::Link::on
_d
estruction(this->piface_);
delete this;
}
}
@@
-174,14
+174,14
@@
void LinkImpl::turn_on()
{
if (is_off()) {
Resource::turn_on();
- s4u::Link::on
StateC
hange(this->piface_);
+ s4u::Link::on
_state_c
hange(this->piface_);
}
}
void LinkImpl::turn_off()
{
if (is_on()) {
Resource::turn_off();
- s4u::Link::on
StateC
hange(this->piface_);
+ s4u::Link::on
_state_c
hange(this->piface_);
}
}
@@
-216,8
+216,10
@@
void LinkImpl::setLatencyTrace(tmgr_trace_t trace)
void NetworkAction::set_state(Action::State state)
{
+ Action::State previous = get_state();
Action::set_state(state);
- s4u::Link::onCommunicationStateChange(this);
+ if (previous != state) // Trigger only if the state changed
+ s4u::Link::on_communication_state_change(this);
}
/** @brief returns a list of all Links that this action is using */