Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename SIMIX_process_get_maxpid() to SIMIX_process_get_nextpid() and make it public
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Jul 2015 20:02:33 +0000 (22:02 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Jul 2015 20:02:53 +0000 (22:02 +0200)
This ends the Fix #15 after the recent commit of @mpoquet. Thanks for
that again.

include/simgrid/simix.h
src/msg/msg_process.c
src/simix/smx_private.h
src/simix/smx_process.c

index c16e39d..a4f89eb 100644 (file)
@@ -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));
index 419e710..6ce98b8 100644 (file)
@@ -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,
index afc5e64..7e975d4 100644 (file)
@@ -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()
index f91a7a2..86a581f 100644 (file)
@@ -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;
 }