X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/53cde8dfb94134348e908b3c2845200ffc582dc7..ca5cc1d2fdfb164231ab83a916e0e5902693d164:/src/simix/smx_process.c diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index e830985671..4ef99fc25d 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -96,6 +96,7 @@ void SIMIX_process_cleanup(smx_process_t process) xbt_swag_remove(process, simix_global->process_list); xbt_swag_remove(process, process->smx_host->process_list); xbt_swag_insert(process, simix_global->process_to_destroy); + process->context->iwannadie = 0; } /** @@ -380,11 +381,6 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer) { xbt_assert((process != NULL), "Invalid parameters"); - if (!process->suspended) { - XBT_DEBUG("Process '%s' is not suspended", process->name); - return; - } - process->suspended = 0; /* If we are resuming another process, resume the action it was waiting for @@ -662,3 +658,13 @@ smx_process_t SIMIX_process_from_PID(int PID) } return NULL; } + +/** @brief returns a dynar containg all currently existing processes */ +xbt_dynar_t SIMIX_processes_as_dynar(void) { + smx_process_t proc; + xbt_dynar_t res = xbt_dynar_new(sizeof(smx_process_t),NULL); + xbt_swag_foreach(proc, simix_global->process_list) { + xbt_dynar_push(res,&proc); + } + return res; +}