Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix clang build
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 05:51:13 +0000 (07:51 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 05:51:16 +0000 (07:51 +0200)
I've no idea of why g++ don't see the deprecation marker on this
function...

examples/s4u/actions-comm/s4u_actions-comm.cpp
examples/s4u/app-masterworker/s4u_app-masterworker.cpp
examples/s4u/app-token-ring/s4u_app-token-ring.cpp
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
teshsuite/s4u/listen_async/listen_async.cpp
teshsuite/s4u/pid/pid.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp

index a478625..bb7db5d 100644 (file)
@@ -77,7 +77,7 @@ public:
         simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::name());
 
     ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::name().c_str(), from->name());
         simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::name());
 
     ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::name().c_str(), from->name());
-    simgrid::s4u::this_actor::recv(from);
+    from->recv();
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
   }
 };
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
   }
 };
index 0699bb0..d6797f7 100644 (file)
@@ -70,7 +70,7 @@ public:
   void operator()()
   {
     while (1) { /* The worker waits in an infinite loop for tasks sent by the \ref master */
   void operator()()
   {
     while (1) { /* The worker waits in an infinite loop for tasks sent by the \ref master */
-      char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
+      char* res = static_cast<char*>(mailbox->recv());
       xbt_assert(res != nullptr, "MSG_task_get failed");
 
       if (strcmp(res, "finalize") == 0) { /* - Exit if 'finalize' is received */
       xbt_assert(res != nullptr, "MSG_task_get failed");
 
       if (strcmp(res, "finalize") == 0) { /* - Exit if 'finalize' is received */
index 0bbedb0..d2c70ea 100644 (file)
@@ -37,11 +37,11 @@ public:
       /* 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());
       neighbor_mailbox->send(xbt_strdup("Token"), task_comm_size);
       /* 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());
       neighbor_mailbox->send(xbt_strdup("Token"), task_comm_size);
-      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_free(res);
     } else {
       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());
       neighbor_mailbox->send(res, task_comm_size);
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
       XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->name());
       neighbor_mailbox->send(res, task_comm_size);
index 42f5214..84141ec 100644 (file)
@@ -104,7 +104,7 @@ static void receiver(std::vector<std::string> args)
     switch (args[0][test - 1]) {
       case 'r':
         XBT_INFO("Test %d: r (regular receive)", test);
     switch (args[0][test - 1]) {
       case 'r':
         XBT_INFO("Test %d: r (regular receive)", test);
-        received = simgrid::s4u::this_actor::recv(mbox);
+        received = mbox->recv();
         break;
       case 'R':
         XBT_INFO("Test %d: R (sleep + regular receive)", test);
         break;
       case 'R':
         XBT_INFO("Test %d: R (sleep + regular receive)", test);
index 2beec01..cfd9027 100644 (file)
@@ -21,7 +21,7 @@ static void server()
 
   xbt_assert(mailbox->listen()); // True (1)
   XBT_INFO("Task listen works on regular mailboxes");
 
   xbt_assert(mailbox->listen()); // True (1)
   XBT_INFO("Task listen works on regular mailboxes");
-  char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
+  char* res = static_cast<char*>(mailbox->recv());
 
   xbt_assert(not strcmp("Some data", res), "Data received: %s", res);
   XBT_INFO("Data successfully received from regular mailbox");
 
   xbt_assert(not strcmp("Some data", res), "Data received: %s", res);
   XBT_INFO("Data successfully received from regular mailbox");
@@ -36,7 +36,7 @@ static void server()
   xbt_assert(mailbox2->listen()); // used to break.
   XBT_INFO("Task listen works on asynchronous mailboxes");
 
   xbt_assert(mailbox2->listen()); // used to break.
   XBT_INFO("Task listen works on asynchronous mailboxes");
 
-  res = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox2));
+  res = static_cast<char*>(mailbox2->recv());
   xbt_assert(not strcmp("More data", res));
   xbt_free(res);
 
   xbt_assert(not strcmp("More data", res));
   xbt_free(res);
 
index 420540c..d92d7d5 100644 (file)
@@ -31,7 +31,7 @@ static void killall()
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
   for (int i = 0; i < 3; i++) {
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
   for (int i = 0; i < 3; i++) {
-    int* pid = static_cast<int*>(simgrid::s4u::this_actor::recv(mailbox));
+    int* pid = static_cast<int*>(mailbox->recv());
     XBT_INFO("Killing process \"%d\".", *pid);
     simgrid::s4u::Actor::byPid(*pid)->kill();
   }
     XBT_INFO("Killing process \"%d\".", *pid);
     simgrid::s4u::Actor::byPid(*pid)->kill();
   }
index 1592629..85eabc7 100644 (file)
@@ -142,7 +142,7 @@ static void server()
 
   XBT_INFO("Server waiting for transfers ...");
   while (1) {
 
   XBT_INFO("Server waiting for transfers ...");
   while (1) {
-    char* msg = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
+    char* msg = static_cast<char*>(mailbox->recv());
     if (not strcmp(msg, "finalize")) { // Shutdown ...
       xbt_free(msg);
       break;
     if (not strcmp(msg, "finalize")) { // Shutdown ...
       xbt_free(msg);
       break;