Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move code in simgrid::mc
[simgrid.git] / src / msg / msg_global.cpp
index d2f631b..bc81e86 100644 (file)
@@ -7,20 +7,14 @@
 #include "simgrid/msg.h"
 #include "instr/instr_interface.h"
 #include "msg_private.h"
-#include "msg_mailbox.h"
 #include "mc/mc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
-#include "xbt/virtu.h"
-#include "xbt/ex.h"             /* ex_backtrace_display */
-#include "xbt/replay.h"
 #include "simgrid/sg_config.h" /* Configuration mechanism of SimGrid */
-#include "src/surf/callbacks.h"
-#include "src/surf/platform.hpp"
+#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME by removing MSG_post_create_environment()
 
 XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg,
-                                "Logging specific to MSG (kernel)");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)");
 
 MSG_Global_t msg_global = NULL;
 static void MSG_exit(void);
@@ -69,6 +63,10 @@ void MSG_init_nocheck(int *argc, char **argv) {
     simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
       MSG_host_create_(&host);
     });
+    MSG_HOST_LEVEL = simgrid::s4u::Host::extension_create([](void *p) {
+      __MSG_host_priv_free((msg_host_priv_t) p);
+    });
+
   }
 
   if(MC_is_active()){
@@ -112,7 +110,6 @@ void MSG_config(const char *key, const char *value){
   xbt_cfg_set_as_string(_sg_cfg_set, key, value);
 }
 
-
 /** \ingroup msg_simulation
  * \brief Kill all running process
 
@@ -141,7 +138,6 @@ static void MSG_exit(void) {
   msg_global = NULL;
 }
 
-
 /** \ingroup msg_simulation
  * \brief A clock (in second).
  */