X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3a1ea70a418f393ca1677074e928c664022295bd..585dc40dd38b797005b02180030fdb2bec766b29:/teshsuite/s4u/pid/pid.cpp diff --git a/teshsuite/s4u/pid/pid.cpp b/teshsuite/s4u/pid/pid.cpp index f8e2571197..5d0c7f1fb6 100644 --- a/teshsuite/s4u/pid/pid.cpp +++ b/teshsuite/s4u/pid/pid.cpp @@ -1,11 +1,11 @@ -/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2023. 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. */ #include "simgrid/s4u.hpp" -XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this msg example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this example"); static void sendpid() { @@ -25,7 +25,7 @@ static void killall() { simgrid::s4u::Mailbox* mailbox = simgrid::s4u::Mailbox::by_name("mailbox"); for (int i = 0; i < 3; i++) { - const auto* pid = static_cast(mailbox->get()); + const auto* pid = mailbox->get(); XBT_INFO("Killing process \"%ld\".", *pid); simgrid::s4u::Actor::by_pid(*pid)->kill(); } @@ -38,10 +38,10 @@ int main(int argc, char* argv[]) simgrid::s4u::Actor::kill_all(); - simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid); - simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid); - simgrid::s4u::Actor::create("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid); - simgrid::s4u::Actor::create("killall", simgrid::s4u::Host::by_name("Tremblay"), killall); + simgrid::s4u::Actor::create("sendpid", e.host_by_name("Tremblay"), sendpid); + simgrid::s4u::Actor::create("sendpid", e.host_by_name("Tremblay"), sendpid); + simgrid::s4u::Actor::create("sendpid", e.host_by_name("Tremblay"), sendpid); + simgrid::s4u::Actor::create("killall", e.host_by_name("Tremblay"), killall); e.run();