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
Update copyright lines with new year.
[simgrid.git]
/
examples
/
s4u
/
actor-kill
/
s4u-actor-kill.cpp
diff --git
a/examples/s4u/actor-kill/s4u-actor-kill.cpp
b/examples/s4u/actor-kill/s4u-actor-kill.cpp
index
3442fd2
..
785ab6d
100644
(file)
--- a/
examples/s4u/actor-kill/s4u-actor-kill.cpp
+++ b/
examples/s4u/actor-kill/s4u-actor-kill.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2017-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-201
9
. 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. */
@@
-7,15
+7,9
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_kill, "Messages specific for this s4u example");
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_kill, "Messages specific for this s4u example");
-static int on_exit(void*, void*)
-{
- XBT_INFO("I have been killed!");
- return 0;
-}
-
static void victimA_fun()
{
static void victimA_fun()
{
- simgrid::s4u::this_actor::on_exit(
on_exit
, nullptr);
+ simgrid::s4u::this_actor::on_exit(
[](int, void*) { XBT_INFO("I have been killed!"); }
, nullptr);
XBT_INFO("Hello!");
XBT_INFO("Suspending myself");
simgrid::s4u::this_actor::suspend(); /* - Start by suspending itself */
XBT_INFO("Hello!");
XBT_INFO("Suspending myself");
simgrid::s4u::this_actor::suspend(); /* - Start by suspending itself */
@@
-63,9
+57,9
@@
static void killer()
simgrid::s4u::Actor::kill_all();
XBT_INFO("OK, goodbye now. I commit a suicide.");
simgrid::s4u::Actor::kill_all();
XBT_INFO("OK, goodbye now. I commit a suicide.");
- simgrid::s4u::this_actor::
kill
();
+ simgrid::s4u::this_actor::
exit
();
- XBT_INFO("This line
will never get
displayed: I'm already dead since the previous line.");
+ XBT_INFO("This line
never gets
displayed: I'm already dead since the previous line.");
}
int main(int argc, char* argv[])
}
int main(int argc, char* argv[])