From 53782855f0f3041e92f763891722e8a253479451 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 6 Jul 2017 07:51:13 +0200 Subject: [PATCH] Fix clang build I've no idea of why g++ don't see the deprecation marker on this function... --- examples/s4u/actions-comm/s4u_actions-comm.cpp | 2 +- examples/s4u/app-masterworker/s4u_app-masterworker.cpp | 2 +- examples/s4u/app-token-ring/s4u_app-token-ring.cpp | 4 ++-- teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp | 2 +- teshsuite/s4u/listen_async/listen_async.cpp | 4 ++-- teshsuite/s4u/pid/pid.cpp | 2 +- teshsuite/s4u/storage_client_server/storage_client_server.cpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/s4u/actions-comm/s4u_actions-comm.cpp b/examples/s4u/actions-comm/s4u_actions-comm.cpp index a478625cfe..bb7db5d830 100644 --- a/examples/s4u/actions-comm/s4u_actions-comm.cpp +++ b/examples/s4u/actions-comm/s4u_actions-comm.cpp @@ -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::this_actor::recv(from); + from->recv(); log_action(action, simgrid::s4u::Engine::getClock() - clock); } }; diff --git a/examples/s4u/app-masterworker/s4u_app-masterworker.cpp b/examples/s4u/app-masterworker/s4u_app-masterworker.cpp index 0699bb0a01..d6797f709d 100644 --- a/examples/s4u/app-masterworker/s4u_app-masterworker.cpp +++ b/examples/s4u/app-masterworker/s4u_app-masterworker.cpp @@ -70,7 +70,7 @@ public: void operator()() { while (1) { /* The worker waits in an infinite loop for tasks sent by the \ref master */ - char* res = static_cast(simgrid::s4u::this_actor::recv(mailbox)); + char* res = static_cast(mailbox->recv()); xbt_assert(res != nullptr, "MSG_task_get failed"); if (strcmp(res, "finalize") == 0) { /* - Exit if 'finalize' is received */ diff --git a/examples/s4u/app-token-ring/s4u_app-token-ring.cpp b/examples/s4u/app-token-ring/s4u_app-token-ring.cpp index 0bbedb06e6..d2c70ea96a 100644 --- a/examples/s4u/app-token-ring/s4u_app-token-ring.cpp +++ b/examples/s4u/app-token-ring/s4u_app-token-ring.cpp @@ -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); - char* res = static_cast(simgrid::s4u::this_actor::recv(my_mailbox)); + char* res = static_cast(my_mailbox->recv()); XBT_INFO("Host \"%u\" received \"%s\"", rank, res); xbt_free(res); } else { - char* res = static_cast(simgrid::s4u::this_actor::recv(my_mailbox)); + char* res = static_cast(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); diff --git a/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp b/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp index 42f5214da3..84141ec172 100644 --- a/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp +++ b/teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp @@ -104,7 +104,7 @@ static void receiver(std::vector args) 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); diff --git a/teshsuite/s4u/listen_async/listen_async.cpp b/teshsuite/s4u/listen_async/listen_async.cpp index 2beec01bdb..cfd90270b7 100644 --- a/teshsuite/s4u/listen_async/listen_async.cpp +++ b/teshsuite/s4u/listen_async/listen_async.cpp @@ -21,7 +21,7 @@ static void server() xbt_assert(mailbox->listen()); // True (1) XBT_INFO("Task listen works on regular mailboxes"); - char* res = static_cast(simgrid::s4u::this_actor::recv(mailbox)); + char* res = static_cast(mailbox->recv()); 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"); - res = static_cast(simgrid::s4u::this_actor::recv(mailbox2)); + res = static_cast(mailbox2->recv()); xbt_assert(not strcmp("More data", res)); xbt_free(res); diff --git a/teshsuite/s4u/pid/pid.cpp b/teshsuite/s4u/pid/pid.cpp index 420540c414..d92d7d5a06 100644 --- a/teshsuite/s4u/pid/pid.cpp +++ b/teshsuite/s4u/pid/pid.cpp @@ -31,7 +31,7 @@ static void killall() { simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox"); for (int i = 0; i < 3; i++) { - int* pid = static_cast(simgrid::s4u::this_actor::recv(mailbox)); + int* pid = static_cast(mailbox->recv()); XBT_INFO("Killing process \"%d\".", *pid); simgrid::s4u::Actor::byPid(*pid)->kill(); } diff --git a/teshsuite/s4u/storage_client_server/storage_client_server.cpp b/teshsuite/s4u/storage_client_server/storage_client_server.cpp index 1592629176..85eabc7569 100644 --- a/teshsuite/s4u/storage_client_server/storage_client_server.cpp +++ b/teshsuite/s4u/storage_client_server/storage_client_server.cpp @@ -142,7 +142,7 @@ static void server() XBT_INFO("Server waiting for transfers ..."); while (1) { - char* msg = static_cast(simgrid::s4u::this_actor::recv(mailbox)); + char* msg = static_cast(mailbox->recv()); if (not strcmp(msg, "finalize")) { // Shutdown ... xbt_free(msg); break; -- 2.20.1