Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Convert integer literals to bool literals.
[simgrid.git] / src / kernel / activity / CommImpl.cpp
index 0ed0972fa7da551dfa9c78d94a900aefea5f785f..63cb6a505a992dadd9551f1135d3797e0cdb7200 100644 (file)
@@ -25,7 +25,7 @@ XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sr
                                            void* data, double timeout)
 {
   simgrid::kernel::activity::ActivityImplPtr comm = simcall_HANDLER_comm_isend(
-      simcall, src, mbox, task_size, rate, src_buff, src_buff_size, match_fun, nullptr, copy_data_fun, data, 0);
+      simcall, src, mbox, task_size, rate, src_buff, src_buff_size, match_fun, nullptr, copy_data_fun, data, false);
   SIMCALL_SET_MC_VALUE(*simcall, 0);
   simcall_HANDLER_comm_wait(simcall, static_cast<simgrid::kernel::activity::CommImpl*>(comm.get()), timeout);
 }
@@ -78,7 +78,7 @@ XBT_PRIVATE simgrid::kernel::activity::ActivityImplPtr simcall_HANDLER_comm_isen
     other_comm->clean_fun = clean_fun;
   } else {
     other_comm->clean_fun = nullptr;
-    src_proc->comms.push_back(other_comm);
+    src_proc->activities_.push_back(other_comm);
   }
 
   /* Setup the communication synchro */
@@ -162,7 +162,7 @@ simcall_HANDLER_comm_irecv(smx_simcall_t /*simcall*/, smx_actor_t receiver, smx_
       other_comm->state_ = simgrid::kernel::activity::State::READY;
       other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::READY);
     }
-    receiver->comms.push_back(other_comm);
+    receiver->activities_.push_back(other_comm);
   }
 
   /* Setup communication synchro */
@@ -699,18 +699,18 @@ void CommImpl::finish()
       }
     }
 
-    simcall->issuer_->waiting_synchro = nullptr;
-    simcall->issuer_->comms.remove(this);
+    simcall->issuer_->waiting_synchro_ = nullptr;
+    simcall->issuer_->activities_.remove(this);
     if (detached_) {
       if (simcall->issuer_ == src_actor_) {
         if (dst_actor_)
-          dst_actor_->comms.remove(this);
+          dst_actor_->activities_.remove(this);
       } else if (simcall->issuer_ == dst_actor_) {
         if (src_actor_)
-          src_actor_->comms.remove(this);
+          src_actor_->activities_.remove(this);
       } else {
-        dst_actor_->comms.remove(this);
-        src_actor_->comms.remove(this);
+        dst_actor_->activities_.remove(this);
+        src_actor_->activities_.remove(this);
       }
     }
   }