Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use functions from ActorImpl when available.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 17 Mar 2021 22:49:39 +0000 (23:49 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 18 Mar 2021 09:24:53 +0000 (10:24 +0100)
src/s4u/s4u_Exec.cpp
src/s4u/s4u_Io.cpp
src/smpi/mpi/smpi_request.cpp

index 223cf5b..335fe01 100644 (file)
@@ -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<void>([this, issuer, timeout] { this->get_impl()->wait_for(issuer, timeout); });
   state_ = State::FINISHED;
   on_completion(*this);
index 926f269..80423ea 100644 (file)
@@ -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<void>([this, issuer, timeout] { this->get_impl()->wait_for(issuer, timeout); });
   state_ = State::FINISHED;
   this->release_dependencies();
index df07cda..43d50fc 100644 (file)
@@ -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