Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Regenerated.
[simgrid.git] / examples / s4u / app-token-ring / s4u-app-token-ring.cpp
index 8e76889..2774114 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2019. 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. */
@@ -13,8 +13,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_app_token_ring, "Messages specific for this s4u
 
 class RelayRunner {
   size_t task_comm_size = 1000000; /* The token is 1MB long*/
-  simgrid::s4u::MailboxPtr my_mailbox;
-  simgrid::s4u::MailboxPtr neighbor_mailbox;
+  simgrid::s4u::Mailbox* my_mailbox;
+  simgrid::s4u::Mailbox* neighbor_mailbox;
   unsigned int rank      = 0;
 
 public:
@@ -28,13 +28,13 @@ public:
       throw std::invalid_argument(std::string("Processes of this example must have a numerical name, not ") +
                                   ia.what());
     }
-    my_mailbox = simgrid::s4u::Mailbox::byName(std::to_string(rank));
+    my_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(rank));
     if (rank + 1 == simgrid::s4u::Engine::get_instance()->get_host_count())
       /* The last process, which sends the token back to rank 0 */
-      neighbor_mailbox = simgrid::s4u::Mailbox::byName("0");
+      neighbor_mailbox = simgrid::s4u::Mailbox::by_name("0");
     else
       /* The others processes send to their right neighbor (rank+1) */
-      neighbor_mailbox = simgrid::s4u::Mailbox::byName(std::to_string(rank + 1));
+      neighbor_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(rank + 1));
 
     if (rank == 0) {
       /* The root process (rank 0) first sends the token then waits to receive it back */