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
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git]
/
teshsuite
/
xbt
/
signals
/
signals.cpp
diff --git
a/teshsuite/xbt/signals/signals.cpp
b/teshsuite/xbt/signals/signals.cpp
index 7effa0ebb31a74c52ffbf60e325709fb83abf2e4..a0c1676d8ef30f07787eb533fe7794832c6ff2e5 100644
(file)
--- a/
teshsuite/xbt/signals/signals.cpp
+++ b/
teshsuite/xbt/signals/signals.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010-202
1
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-202
3
. 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. */
@@
-11,29
+11,29
@@
static void worker()
{
simgrid::s4u::Host* other_host = simgrid::s4u::Host::by_name("Fafard");
unsigned int first =
{
simgrid::s4u::Host* other_host = simgrid::s4u::Host::by_name("Fafard");
unsigned int first =
- simgrid::s4u::Host::on_
state_change
.connect([](simgrid::s4u::Host const&) { XBT_INFO("First callback"); });
+ simgrid::s4u::Host::on_
onoff
.connect([](simgrid::s4u::Host const&) { XBT_INFO("First callback"); });
unsigned int second =
unsigned int second =
- simgrid::s4u::Host::on_
state_change
.connect([](simgrid::s4u::Host const&) { XBT_INFO("Second callback"); });
+ simgrid::s4u::Host::on_
onoff
.connect([](simgrid::s4u::Host const&) { XBT_INFO("Second callback"); });
unsigned int third =
unsigned int third =
- simgrid::s4u::Host::on_
state_change
.connect([](simgrid::s4u::Host const&) { XBT_INFO("Third callback"); });
+ simgrid::s4u::Host::on_
onoff
.connect([](simgrid::s4u::Host const&) { XBT_INFO("Third callback"); });
XBT_INFO("Turning off: Three callbacks should be triggered");
other_host->turn_off();
XBT_INFO("Disconnect the second callback");
XBT_INFO("Turning off: Three callbacks should be triggered");
other_host->turn_off();
XBT_INFO("Disconnect the second callback");
- simgrid::s4u::Host::on_
state_change
.disconnect(second);
+ simgrid::s4u::Host::on_
onoff
.disconnect(second);
XBT_INFO("Turning on: Two callbacks should be triggered");
other_host->turn_on();
XBT_INFO("Disconnect the first callback");
XBT_INFO("Turning on: Two callbacks should be triggered");
other_host->turn_on();
XBT_INFO("Disconnect the first callback");
- simgrid::s4u::Host::on_
state_change
.disconnect(first);
+ simgrid::s4u::Host::on_
onoff
.disconnect(first);
XBT_INFO("Turning off: One callback should be triggered");
other_host->turn_off();
XBT_INFO("Disconnect the third callback");
XBT_INFO("Turning off: One callback should be triggered");
other_host->turn_off();
XBT_INFO("Disconnect the third callback");
- simgrid::s4u::Host::on_
state_change
.disconnect(third);
+ simgrid::s4u::Host::on_
onoff
.disconnect(third);
XBT_INFO("Turning on: No more callbacks");
other_host->turn_on();
}
XBT_INFO("Turning on: No more callbacks");
other_host->turn_on();
}
@@
-43,7
+43,7
@@
int main(int argc, char* argv[])
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
simgrid::s4u::Engine e(&argc, argv);
e.load_platform(argv[1]);
- simgrid::s4u::Actor::create("worker",
simgrid::s4u::Host::
by_name("Tremblay"), worker);
+ simgrid::s4u::Actor::create("worker",
e.host_
by_name("Tremblay"), worker);
e.run();
e.run();