Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
global variables successfully moved into encapsulating structures.
[simgrid.git] / src / msg / global.c
index 6371a18..02ece3e 100644 (file)
@@ -10,6 +10,7 @@
 #include "msg/private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
+#include "xbt/virtu.h"
 #include "xbt/ex.h" /* ex_backtrace_display */
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)");    
@@ -41,6 +42,7 @@ void MSG_global_init_args(int *argc, char **argv)
  */
 void MSG_global_init(int *argc, char **argv)
 {
+  xbt_getpid = & MSG_process_self_PID;
   if (!msg_global) {
     SIMIX_global_init(argc, argv);
      
@@ -51,8 +53,7 @@ void MSG_global_init(int *argc, char **argv)
     msg_global->max_channel = 0;
     msg_global->PID = 1;
   }
-       return;
-
+  return;
 }
 
 /** \ingroup msg_easier_life
@@ -181,7 +182,7 @@ MSG_error_t MSG_main(void)
  *   number means no reset and a positive number will be used to set the PID
  *   of the next newly created process.
  */
-int MSG_process_killall(long int reset_PIDs)
+int MSG_process_killall(int reset_PIDs)
 {
   m_process_t p = NULL;
   m_process_t self = MSG_process_self();