action, action->comm.detached, (int)action->state, action->comm.src_proc, action->comm.dst_proc);
action->comm.src_proc = NULL;
- if (action->comm.detached) {
- if (action->comm.refcount == 0) {
- XBT_DEBUG("Increase the refcount before destroying it since it's detached");
- /* I'm not supposed to destroy a detached comm from the sender side,
- * unless there is no receiver matching the rdv */
- action->comm.refcount++;
- SIMIX_comm_destroy(action);
- }
- else {
- XBT_DEBUG("Don't destroy it since its refcount is %d", action->comm.refcount);
- }
- } else {
+ /* I'm not supposed to destroy a detached comm from the sender side, */
+ if (!action->comm.detached)
SIMIX_comm_destroy(action);
- }
+ else
+ XBT_DEBUG("Don't destroy it since it's a detached comm");
+
}
else if (action->comm.dst_proc == process){
XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
{
- xbt_assert((process != NULL), "Invalid parameters");
-
XBT_IN("process = %p, issuer = %p", process, issuer);
if(process->context->iwannadie) {
if (self->suspended) {
XBT_DEBUG("Hey! I'm suspended.");
- xbt_assert(!self->doexception, "Gloups! This exception may be lost by subsequent calls.");
+ xbt_assert(!self->doexception, "Gasp! This exception may be lost by subsequent calls.");
self->suspended = 0;
SIMIX_process_suspend(self, self);
}