X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd0d3c14d401269513e9fdc38d8a8df875a15ed3..86a1011750f50a04258aa9cf0eeb23e666cf6bf2:/teshsuite/s4u/actor-suspend/actor-suspend.cpp diff --git a/teshsuite/s4u/actor-suspend/actor-suspend.cpp b/teshsuite/s4u/actor-suspend/actor-suspend.cpp index 3e82259f77..657b2fcab1 100644 --- a/teshsuite/s4u/actor-suspend/actor-suspend.cpp +++ b/teshsuite/s4u/actor-suspend/actor-suspend.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2020-2021. 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. */ @@ -22,7 +22,7 @@ public: { XBT_INFO("Starting."); auto mailbox = simgrid::s4u::Mailbox::by_name("receiver"); - int data = *(int*)mailbox->get(); + int data = *mailbox->get(); XBT_INFO("Got %d at the end", data); } }; @@ -53,7 +53,7 @@ int main(int argc, char** argv) simgrid::s4u::Engine engine(&argc, argv); engine.load_platform(argv[1]); - simgrid::s4u::Host* host = simgrid::s4u::Host::by_name("Tremblay"); + simgrid::s4u::Host* host = engine.host_by_name("Tremblay"); simgrid::s4u::Actor::create("Suspender", host, Suspender()); receiver = simgrid::s4u::Actor::create("Receiver", host, Receiver());