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
explicitly capture some other callback's scopes
[simgrid.git]
/
src
/
s4u
/
s4u_host.cpp
diff --git
a/src/s4u/s4u_host.cpp
b/src/s4u/s4u_host.cpp
index
553f0bf
..
2bf9491
100644
(file)
--- a/
src/s4u/s4u_host.cpp
+++ b/
src/s4u/s4u_host.cpp
@@
-102,7
+102,7
@@
Host *Host::current(){
void Host::turnOn() {
if (isOff()) {
void Host::turnOn() {
if (isOff()) {
- simgrid::simix::kernelImmediate([
&]
{
+ simgrid::simix::kernelImmediate([
this]
{
this->extension<simgrid::simix::Host>()->turnOn();
this->pimpl_cpu->turnOn();
onStateChange(*this);
this->extension<simgrid::simix::Host>()->turnOn();
this->pimpl_cpu->turnOn();
onStateChange(*this);
@@
-113,7
+113,7
@@
void Host::turnOn() {
void Host::turnOff() {
if (isOn()) {
smx_actor_t self = SIMIX_process_self();
void Host::turnOff() {
if (isOn()) {
smx_actor_t self = SIMIX_process_self();
- simgrid::simix::kernelImmediate([
&
] {
+ simgrid::simix::kernelImmediate([
this, self
] {
SIMIX_host_off(this, self);
onStateChange(*this);
});
SIMIX_host_off(this, self);
onStateChange(*this);
});
@@
-197,7
+197,7
@@
void Host::setProperty(const char*key, const char *value){
/** Get the processes attached to the host */
xbt_swag_t Host::processes()
{
/** Get the processes attached to the host */
xbt_swag_t Host::processes()
{
- return simgrid::simix::kernelImmediate([this]
()
{
+ return simgrid::simix::kernelImmediate([this] {
return this->extension<simgrid::simix::Host>()->process_list;
});
}
return this->extension<simgrid::simix::Host>()->process_list;
});
}
@@
-230,7
+230,7
@@
int Host::coreCount() {
/** @brief Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
/** @brief Set the pstate at which the host should run */
void Host::setPstate(int pstate_index)
{
- simgrid::simix::kernelImmediate([this, pstate_index]
()
{
+ simgrid::simix::kernelImmediate([this, pstate_index]
{
this->pimpl_cpu->setPState(pstate_index);
});
}
this->pimpl_cpu->setPState(pstate_index);
});
}