I've no idea of why g++ don't see the deprecation marker on this
function...
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);
log_action(action, simgrid::s4u::Engine::getClock() - clock);
}
};
log_action(action, simgrid::s4u::Engine::getClock() - clock);
}
};
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 */
/* 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);
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);
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");
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);
{
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();
}
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;