Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Save a cast per action completion
[simgrid.git] / src / kernel / activity / CommImpl.cpp
index cdd8160..5852dad 100644 (file)
@@ -134,7 +134,7 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_irecv(
       other_comm = std::move(this_synchro);
       mbox->push(other_comm);
     } else {
-      if (other_comm->surf_action_ && other_comm->remains() < 1e-12) {
+      if (other_comm->surf_action_ && other_comm->get_remaining() < 1e-12) {
         XBT_DEBUG("comm %p has been already sent, and is finished, destroy it", other_comm.get());
         other_comm->state_ = SIMIX_DONE;
         other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::DONE);
@@ -218,7 +218,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity:
     comm->finish();
   } else { /* we need a sleep action (even when there is no timeout) to be notified of host failures */
     simgrid::kernel::resource::Action* sleep = simcall->issuer->get_host()->pimpl_cpu->sleep(timeout);
-    sleep->set_data(comm);
+    sleep->set_activity(comm);
 
     if (simcall->issuer == comm->src_actor_)
       comm->src_timeout_ = sleep;
@@ -422,7 +422,7 @@ CommImpl* CommImpl::start()
     s4u::Host* receiver = dst_actor_->get_host();
 
     surf_action_ = surf_network_model->communicate(sender, receiver, size_, rate_);
-    surf_action_->set_data(this);
+    surf_action_->set_activity(this);
     surf_action_->set_category(get_tracing_category());
     state_ = SIMIX_RUNNING;
 
@@ -517,12 +517,6 @@ void CommImpl::cancel()
   }
 }
 
-/**  @brief get the amount remaining from the communication */
-double CommImpl::remains()
-{
-  return surf_action_->get_remains();
-}
-
 /** @brief This is part of the cleanup process, probably an internal command */
 void CommImpl::cleanupSurf()
 {