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]
/
teshsuite
/
s4u
/
pid
/
pid.cpp
diff --git
a/teshsuite/s4u/pid/pid.cpp
b/teshsuite/s4u/pid/pid.cpp
index
e0831e2
..
8620544
100644
(file)
--- a/
teshsuite/s4u/pid/pid.cpp
+++ b/
teshsuite/s4u/pid/pid.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009-20
18
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-20
20
. 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. */
@@
-9,10
+9,10
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this msg example")
static void sendpid()
{
static void sendpid()
{
- simgrid::s4u::Mailbox
Ptr mailbox
= simgrid::s4u::Mailbox::by_name("mailbox");
+ simgrid::s4u::Mailbox
* mailbox
= simgrid::s4u::Mailbox::by_name("mailbox");
int pid = simgrid::s4u::this_actor::get_pid();
double comm_size = 100000;
int pid = simgrid::s4u::this_actor::get_pid();
double comm_size = 100000;
- simgrid::s4u::this_actor::on_exit([
](int, void* pid) { XBT_INFO("Process \"%d\" killed.", *(int*)pid); }, &pid
);
+ simgrid::s4u::this_actor::on_exit([
pid](bool /*failed*/) { XBT_INFO("Process \"%d\" killed.", pid); }
);
XBT_INFO("Sending pid of \"%d\".", pid);
mailbox->put(&pid, comm_size);
XBT_INFO("Sending pid of \"%d\".", pid);
mailbox->put(&pid, comm_size);
@@
-23,9
+23,9
@@
static void sendpid()
static void killall()
{
static void killall()
{
- simgrid::s4u::Mailbox
Ptr
mailbox = simgrid::s4u::Mailbox::by_name("mailbox");
+ simgrid::s4u::Mailbox
*
mailbox = simgrid::s4u::Mailbox::by_name("mailbox");
for (int i = 0; i < 3; i++) {
for (int i = 0; i < 3; i++) {
- int* pid = static_cast<int*>(mailbox->get());
+
const
int* pid = static_cast<int*>(mailbox->get());
XBT_INFO("Killing process \"%d\".", *pid);
simgrid::s4u::Actor::by_pid(*pid)->kill();
}
XBT_INFO("Killing process \"%d\".", *pid);
simgrid::s4u::Actor::by_pid(*pid)->kill();
}