Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix clang build
[simgrid.git] / examples / s4u / app-token-ring / s4u_app-token-ring.cpp
index c2d375b..d2c70ea 100644 (file)
@@ -36,15 +36,15 @@ public:
     if (rank == 0) {
       /* The root process (rank 0) first sends the token then waits to receive it back */
       XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->name());
-      simgrid::s4u::this_actor::send(neighbor_mailbox, xbt_strdup("Token"), task_comm_size);
-      char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(my_mailbox));
+      neighbor_mailbox->send(xbt_strdup("Token"), task_comm_size);
+      char* res = static_cast<char*>(my_mailbox->recv());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
       xbt_free(res);
     } else {
-      char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(my_mailbox));
+      char* res = static_cast<char*>(my_mailbox->recv());
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
       XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->name());
-      simgrid::s4u::this_actor::send(neighbor_mailbox, res, task_comm_size);
+      neighbor_mailbox->send(res, task_comm_size);
     }
   }
 };