if (comm->detached)
XBT_DEBUG("Don't destroy it since it's a detached comm and I'm the sender");
else
- comm->unref();
-
- }
- else if (comm->dst_proc == process){
+ SIMIX_comm_unref(comm);
+ } else if (comm->dst_proc == process) {
XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
comm, (int)comm->state, comm->src_proc, comm->dst_proc);
comm->dst_proc = nullptr;
/* the comm will be freed right now, remove it from the sender */
comm->src_proc->comms.remove(comm);
}
-
- comm->unref();
+ SIMIX_comm_unref(comm);
} else {
xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
}
} else if (comm != nullptr) {
process->comms.remove(process->waiting_synchro);
comm->cancel();
-
// Remove first occurrence of &process->simcall:
- auto i = boost::range::find(
- process->waiting_synchro->simcalls,
- &process->simcall);
+ auto i = boost::range::find(process->waiting_synchro->simcalls, &process->simcall);
if (i != process->waiting_synchro->simcalls.end())
process->waiting_synchro->simcalls.remove(&process->simcall);
-
- comm->unref();
-
+ SIMIX_comm_unref(comm);
} else if (sleep != nullptr) {
SIMIX_process_sleep_destroy(process->waiting_synchro);