Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make SIMIX_context_new() accept std::function
[simgrid.git] / src / simix / smx_global.cpp
index d693ac8..dbfb7f9 100644 (file)
@@ -12,7 +12,6 @@
 #include "src/surf/storage_interface.hpp"
 #include "src/surf/xml/platf.hpp"
 #include "smx_private.h"
-#include "smx_private.hpp"
 #include "xbt/str.h"
 #include "xbt/ex.h"             /* ex_backtrace_display */
 #include "mc/mc.h"
@@ -189,11 +188,10 @@ void SIMIX_global_init(int *argc, char **argv)
   simgrid::mc::Client::initialize();
 #endif
 
-  s_smx_process_t proc;
-
   if (!simix_global) {
     simix_global = xbt_new0(s_smx_global_t, 1);
 
+    simgrid::simix::Process proc;
     simix_global->process_to_run = xbt_dynar_new(sizeof(smx_process_t), NULL);
     simix_global->process_that_ran = xbt_dynar_new(sizeof(smx_process_t), NULL);
     simix_global->process_list = xbt_swag_new(xbt_swag_offset(proc, process_hookup));
@@ -293,7 +291,7 @@ void SIMIX_clean(void)
   simix_global->mutex = NULL;
 
   /* Let's free maestro now */
-  SIMIX_context_free(simix_global->maestro_process->context);
+  delete simix_global->maestro_process->context;
   xbt_free(simix_global->maestro_process->running_ctx);
   xbt_free(simix_global->maestro_process);
   simix_global->maestro_process = NULL;