From: Martin Quinson Date: Tue, 14 Jul 2015 20:02:33 +0000 (+0200) Subject: rename SIMIX_process_get_maxpid() to SIMIX_process_get_nextpid() and make it public X-Git-Tag: v3_12~523 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9306ddd4b063b1934dbab43f967e380d0181e393?hp=14dcc36f158833d880504001fa1aa67e51db822a rename SIMIX_process_get_maxpid() to SIMIX_process_get_nextpid() and make it public This ends the Fix #15 after the recent commit of @mpoquet. Thanks for that again. --- diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index c16e39d1cc..a4f89eb63c 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -281,6 +281,8 @@ XBT_PUBLIC(void) SIMIX_process_set_context(smx_process_t p,smx_context_t c); XBT_PUBLIC(int) SIMIX_process_has_pending_comms(smx_process_t process); XBT_PUBLIC(void) SIMIX_process_on_exit_runall(smx_process_t process); XBT_PUBLIC(void) SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data); +XBT_PUBLIC(int) SIMIX_process_get_nextpid(void); + /****************************** Communication *********************************/ XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_synchro_t, void*, size_t)); diff --git a/src/msg/msg_process.c b/src/msg/msg_process.c index 419e710c35..6ce98b84fe 100644 --- a/src/msg/msg_process.c +++ b/src/msg/msg_process.c @@ -164,7 +164,7 @@ msg_process_t MSG_process_create_with_environment(const char *name, simdata->data = data; simdata->last_errno = MSG_OK; - int future_simix_process_pid = SIMIX_process_get_maxpid(); + int future_simix_process_pid = SIMIX_process_get_nextpid(); TRACE_msg_process_create(name, future_simix_process_pid, host); /* Let's create the process: SIMIX may decide to start it right now, diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index afc5e64af3..7e975d4676 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -327,8 +327,6 @@ static XBT_INLINE smx_process_t SIMIX_context_get_process(smx_context_t context) return simix_global->context_factory->get_process(context); } -XBT_PUBLIC(int) SIMIX_process_get_maxpid(void); - void SIMIX_post_create_environment(void); SG_END_DECL() diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index f91a7a2a91..86a581f132 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -596,7 +596,9 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer) XBT_OUT(); } -int SIMIX_process_get_maxpid(void) { +/* Warning, the tracing mechanism uses this function to guess the future PID of the + * currently created process, Please do not change that feature */ +int SIMIX_process_get_nextpid(void) { return simix_process_maxpid; }