Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This commit concerned the reimplementation of the xbt context switch mechanism.
[simgrid.git] / src / msg / global.c
index eb92d76..3436087 100644 (file)
@@ -43,7 +43,7 @@ void MSG_global_init_args(int *argc, char **argv)
  */
 void MSG_global_init(int *argc, char **argv)
 {
-  xbt_getpid = &MSG_process_self_PID;
+  xbt_getpid = MSG_process_self_PID;
   if (!msg_global) {
     SIMIX_global_init(argc, argv);
 
@@ -231,6 +231,7 @@ MSG_error_t MSG_clean(void)
   xbt_fifo_free(msg_global->process_list);
 
   free(msg_global);
+  msg_global = NULL;
   SIMIX_clean();
 
   return MSG_OK;