Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / simix / smx_process.cpp
index 32b5c8c..87d4355 100644 (file)
@@ -516,7 +516,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
     } else if (raw != nullptr) {
       SIMIX_synchro_stop_waiting(process, &process->simcall);
-      SIMIX_synchro_destroy(process->waiting_synchro);
+      delete process->waiting_synchro;
 
     } else if (io != nullptr) {
       SIMIX_io_destroy(process->waiting_synchro);
@@ -628,15 +628,14 @@ void SIMIX_process_change_host(smx_process_t process,
 
 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 */
 }