Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_storage_cb
[simgrid.git] / src / simix / smx_global.c
index dba3029..b37a920 100644 (file)
@@ -21,6 +21,8 @@
 #include "src/mc/mc_replay.h"
 #include "simgrid/sg_config.h"
 
+#include "src/surf/callbacks.h"
+
 #ifdef HAVE_MC
 #include "src/mc/mc_private.h"
 #include "src/mc/mc_protocol.h"
@@ -157,6 +159,12 @@ static void kill_process(smx_process_t process)
   SIMIX_process_kill(process, NULL);
 }
 
+static void SIMIX_storage_create_(smx_storage_t storage)
+{
+  const char* key = xbt_dict_get_elm_key(storage);
+  SIMIX_storage_create(key, storage, NULL);
+}
+
 /**
  * \ingroup SIMIX_API
  * \brief Initialize SIMIX internal data.
@@ -219,6 +227,8 @@ void SIMIX_global_init(int *argc, char **argv)
     /* register a function to be called by SURF after the environment creation */
     sg_platf_init();
     sg_platf_postparse_add_cb(SIMIX_post_create_environment);
+    surf_on_host_created(SIMIX_host_create);
+    surf_on_storage_created(SIMIX_storage_create_);
 
   }
   if (!simix_timers) {