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
please sonar, even if it is really pesky sometimes
[simgrid.git]
/
src
/
s4u
/
s4u_host.cpp
diff --git
a/src/s4u/s4u_host.cpp
b/src/s4u/s4u_host.cpp
index
bffb071
..
d918006
100644
(file)
--- a/
src/s4u/s4u_host.cpp
+++ b/
src/s4u/s4u_host.cpp
@@
-46,7
+46,7
@@
Host::Host(const char* name)
{
xbt_assert(Host::by_name_or_null(name) == nullptr, "Refusing to create a second host named '%s'.", name);
host_list[name_] = this;
- new simgrid::surf::HostImpl(this
, nullptr
);
+ new simgrid::surf::HostImpl(this);
}
Host::~Host()
@@
-105,13
+105,18
@@
void Host::turnOn() {
simgrid::simix::kernelImmediate([&]{
this->extension<simgrid::simix::Host>()->turnOn();
this->pimpl_cpu->turnOn();
+ onStateChange(*this);
});
}
}
void Host::turnOff() {
if (isOn()) {
- simgrid::simix::kernelImmediate(std::bind(SIMIX_host_off, this, SIMIX_process_self()));
+ smx_actor_t self = SIMIX_process_self();
+ simgrid::simix::kernelImmediate([&] {
+ SIMIX_host_off(this, self);
+ onStateChange(*this);
+ });
}
}