Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rewrite how we search for libunwind (hopefully correctly this time)
[simgrid.git] / src / simix / smx_global.cpp
index c9a39e0..37a4e4a 100644 (file)
@@ -210,8 +210,6 @@ void SIMIX_global_init(int *argc, char **argv)
 
   if (not simix_global) {
     simix_global = std::unique_ptr<simgrid::simix::Global>(new simgrid::simix::Global());
-
-    simgrid::simix::ActorImpl proc;
     simix_global->maestro_process = nullptr;
     simix_global->create_process_function = &SIMIX_process_create;
     simix_global->kill_process_function = &kill_process;
@@ -443,7 +441,7 @@ void SIMIX_run()
        *   Long proof: processes remain sorted through an arbitrary (implicit, complex but fixed) order in all cases.
        *
        *   - if there is no kill during the simulation, processes remain sorted according by their PID.
-       *     rational: This can be proved inductively.
+       *     Rationale: This can be proved inductively.
        *        Assume that process_to_run is sorted at a beginning of one round (it is at round 0: the deployment file
        *        is parsed linearly).
        *        Let's show that it is still so at the end of this round.
@@ -556,6 +554,7 @@ void SIMIX_run()
 
     XBT_CRITICAL("Oops ! Deadlock or code not perfectly clean.");
     SIMIX_display_process_status();
+    simgrid::s4u::onDeadlock();
     xbt_abort();
   }
   simgrid::s4u::onSimulationEnd();
@@ -572,7 +571,7 @@ void SIMIX_run()
  */
 smx_timer_t SIMIX_timer_set(double date, void (*callback)(void*), void *arg)
 {
-  smx_timer_t timer = new s_smx_timer_t(date, [callback, arg]() { callback(arg); });
+  smx_timer_t timer = new s_smx_timer_t(date, simgrid::xbt::makeTask([callback, arg]() { callback(arg); }));
   timer->handle_    = simix_timers.emplace(std::make_pair(date, timer));
   return timer;
 }