]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/CommImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SIMIX_run becomes EngineImpl::run
[simgrid.git] / src / kernel / activity / CommImpl.cpp
index faf9eecafcad8f16530bfa5efc956557feed2a7c..b914b3de3a5410ae36b5fbeb1111e1af0e86a882 100644 (file)
@@ -422,7 +422,7 @@ void CommImpl::wait_for(actor::ActorImpl* issuer, double timeout)
   }
 }
 
-int CommImpl::test_any(actor::ActorImpl* issuer, const std::vector<CommImpl*>& comms)
+int CommImpl::test_any(const actor::ActorImpl* issuer, const std::vector<CommImpl*>& comms)
 {
   if (MC_is_active() || MC_record_replay_is_active()) {
     int idx = issuer->simcall_.mc_value_;
@@ -453,7 +453,7 @@ void CommImpl::wait_any_for(actor::ActorImpl* issuer, const std::vector<CommImpl
   if (timeout < 0.0) {
     issuer->simcall_.timeout_cb_ = nullptr;
   } else {
-    issuer->simcall_.timeout_cb_ = simix::Timer::set(SIMIX_get_clock() + timeout, [issuer, comms]() {
+    issuer->simcall_.timeout_cb_ = timer::Timer::set(SIMIX_get_clock() + timeout, [issuer, comms]() {
       // FIXME: Vector `comms' is copied here. Use a reference once its lifetime is extended (i.e. when the simcall is
       // modernized).
       issuer->simcall_.timeout_cb_ = nullptr;
@@ -579,8 +579,6 @@ void CommImpl::finish()
         simcall->timeout_cb_ = nullptr;
       }
       if (not MC_is_active() && not MC_record_replay_is_active()) {
-        CommImpl** comms   = simcall_comm_waitany__get__comms(simcall);
-        size_t count       = simcall_comm_waitany__get__count(simcall);
         CommImpl** element = std::find(comms, comms + count, this);
         int rank           = (element != comms + count) ? element - comms : -1;
         simcall_comm_waitany__set__result(simcall, rank);