Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] add intrusive_ptr for mailbox receiver.
[simgrid.git] / src / simix / smx_network.cpp
index 266b0cd..bf5aa8b 100644 (file)
@@ -198,7 +198,7 @@ XBT_PRIVATE smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_
     if (mbox->permanent_receiver!=nullptr){
       //this mailbox is for small messages, which have to be sent right now
       other_synchro->state = SIMIX_READY;
-      other_comm->dst_proc=mbox->permanent_receiver;
+      other_comm->dst_proc=mbox->permanent_receiver.get();
       other_comm->ref();
       mbox->done_comm_queue->push_back(other_synchro);
       other_comm->mbox=mbox;
@@ -455,6 +455,8 @@ void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t synchros)
 {
   unsigned int cursor;
   smx_synchro_t synchro;
+  // The default result is -1 -- this means, "nothing is ready".
+  // It can be changed below, but only if something matches.
   simcall_comm_testany__set__result(simcall, -1);
 
   if (MC_is_active() || MC_record_replay_is_active()){