From b2c8c5dd4ca5fc898941231f379f9f7b2cb62425 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 17 Mar 2021 23:49:39 +0100 Subject: [PATCH] Use functions from ActorImpl when available. --- src/s4u/s4u_Exec.cpp | 3 ++- src/s4u/s4u_Io.cpp | 3 ++- src/smpi/mpi/smpi_request.cpp | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 223cf5b22b..335fe011f4 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -8,6 +8,7 @@ #include "simgrid/s4u/Actor.hpp" #include "simgrid/s4u/Exec.hpp" #include "src/kernel/activity/ExecImpl.hpp" +#include "src/kernel/actor/ActorImpl.hpp" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_exec, s4u_activity, "S4U asynchronous executions"); @@ -38,7 +39,7 @@ Exec* Exec::wait_for(double timeout) if (state_ == State::INITED) vetoable_start(); - kernel::actor::ActorImpl* issuer = Actor::self()->get_impl(); + kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self(); kernel::actor::simcall_blocking([this, issuer, timeout] { this->get_impl()->wait_for(issuer, timeout); }); state_ = State::FINISHED; on_completion(*this); diff --git a/src/s4u/s4u_Io.cpp b/src/s4u/s4u_Io.cpp index 926f269024..80423ead47 100644 --- a/src/s4u/s4u_Io.cpp +++ b/src/s4u/s4u_Io.cpp @@ -7,6 +7,7 @@ #include "simgrid/s4u/Disk.hpp" #include "simgrid/s4u/Io.hpp" #include "src/kernel/activity/IoImpl.hpp" +#include "src/kernel/actor/ActorImpl.hpp" #include "xbt/log.h" namespace simgrid { @@ -61,7 +62,7 @@ Io* Io::wait_for(double timeout) if (state_ == State::INITED) vetoable_start(); - kernel::actor::ActorImpl* issuer = Actor::self()->get_impl(); + kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self(); kernel::actor::simcall_blocking([this, issuer, timeout] { this->get_impl()->wait_for(issuer, timeout); }); state_ = State::FINISHED; this->release_dependencies(); diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index df07cda084..43d50fce44 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -547,8 +547,9 @@ void Request::start() } size_t payload_size_ = size_ + 16;//MPI enveloppe size (tag+dest+communicator) - action_ = simcall_comm_isend( - simgrid::s4u::Actor::by_pid(src_)->get_impl(), mailbox->get_impl(), payload_size_, -1.0, buf, real_size_, &match_send, + action_ = simcall_comm_isend( + simgrid::kernel::actor::ActorImpl::by_pid(src_), mailbox->get_impl(), payload_size_, -1.0, buf, real_size_, + &match_send, &xbt_free_f, // how to free the userdata if a detached send fails process->replaying() ? &smpi_comm_null_copy_buffer_callback : smpi_comm_copy_data_callback, this, // detach if msg size < eager/rdv switch limit -- 2.20.1