]> AND Public Git Repository - simgrid.git/blobdiff - examples/cpp/synchro-semaphore/s4u-synchro-semaphore.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / examples / cpp / synchro-semaphore / s4u-synchro-semaphore.cpp
index 7acc1ac3d32cdff74ebc4c519b3f6c1dc6d6c9c9..8f7e2536cd40af8bd5488921d3f17a3ed8a030e1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2022. 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. */
@@ -45,8 +45,8 @@ int main(int argc, char **argv)
   std::vector<std::string> args({"one", "two", "three", ""});
   simgrid::s4u::Engine e(&argc, argv);
   e.load_platform("../../platforms/two_hosts.xml");
-  simgrid::s4u::Actor::create("producer", simgrid::s4u::Host::by_name("Tremblay"), producer, std::cref(args));
-  simgrid::s4u::Actor::create("consumer", simgrid::s4u::Host::by_name("Jupiter"), consumer);
+  simgrid::s4u::Actor::create("producer", e.host_by_name("Tremblay"), producer, std::cref(args));
+  simgrid::s4u::Actor::create("consumer", e.host_by_name("Jupiter"), consumer);
   e.run();
 
   return 0;