Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 12 May 2016 21:59:53 +0000 (23:59 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 12 May 2016 21:59:53 +0000 (23:59 +0200)
1  2 
src/simix/smx_process.cpp

@@@ -91,10 -91,11 +91,11 @@@ void SIMIX_process_cleanup(smx_process_
            comm, (int)comm->state, comm->src_proc, comm->dst_proc);
        comm->dst_proc = NULL;
  
-       if (comm->detached && /* FIXME: This code should be moved within comm->unref() anyway. comm->refcount == 1 &&*/ comm->src_proc != NULL) {
+       if (comm->detached && comm->src_proc != NULL) {
          /* the comm will be freed right now, remove it from the sender */
          xbt_fifo_remove(comm->src_proc->comms, comm);
        }
+       
        comm->unref();
      } else {
        xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
@@@ -627,14 -628,15 +628,14 @@@ void SIMIX_process_change_host(smx_proc
  
  void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process)
  {
 -  smx_synchro_t sync_suspend =
 -      SIMIX_process_suspend(process, simcall->issuer);
 +  smx_synchro_t sync_suspend = SIMIX_process_suspend(process, simcall->issuer);
  
    if (process != simcall->issuer) {
      SIMIX_simcall_answer(simcall);
    } else {
      xbt_fifo_push(sync_suspend->simcalls, simcall);
      process->waiting_synchro = sync_suspend;
 -    SIMIX_execution_suspend(process->waiting_synchro);
 +    process->waiting_synchro->suspend();
    }
    /* If we are suspending ourselves, then just do not finish the simcall now */
  }