]> AND Public Git Repository - simgrid.git/blobdiff - src/msg/msg_process.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused variable.
[simgrid.git] / src / msg / msg_process.c
index 3cf193e2f4923074e272589889d567224662fc2e..2c03e8d3458f4cb4d8b6785c78fd978e4864cc0a 100644 (file)
@@ -51,6 +51,12 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
     msg_global->process_data_cleanup(msg_proc->data);
   }
 
+  // remove the process from its virtual machine
+  if (msg_proc->vm) {
+       int pos = xbt_dynar_search(msg_proc->vm->processes,&smx_proc);
+       xbt_dynar_remove_at(msg_proc->vm->processes,pos, NULL);
+  }
+
   // free the MSG process
   xbt_free(msg_proc);
 }
@@ -322,8 +328,6 @@ xbt_dynar_t MSG_processes_as_dynar(void) {
  */
 MSG_error_t MSG_process_set_kill_time(m_process_t process, double kill_time)
 {
-  xbt_assert(process != NULL, "Invalid parameter");
-
   simcall_process_set_kill_time(process,kill_time);
   return MSG_OK;
 }