X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cb025a65332d7a4d6b878b00873b3da07f15021a..1ae612ef301a26795068505cf761169ed29a5451:/src/smpi/smpi_global.c diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 6fa73d2ef6..470be9c857 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -70,6 +70,17 @@ void smpi_process_destroy(void) XBT_DEBUG("<%d> Process left the game", index); } +/** + * @brief Prepares the current process for termination. + */ +void smpi_process_finalize(void) +{ + // wait for all pending asynchronous comms to finish + while (SIMIX_process_has_pending_comms(SIMIX_process_self())) { + SIMIX_req_process_sleep(1); + } +} + int smpi_process_argc(void) { smpi_process_data_t data = smpi_process_data();