Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #279 from sthibaul/breakpoint
[simgrid.git] / src / simix / smx_global.cpp
index 9973945..f0b03ad 100644 (file)
@@ -158,14 +158,12 @@ static void kill_process(smx_actor_t process)
 namespace simgrid {
 namespace simix {
 
-simgrid::xbt::signal<void()> onDeadlock;
-
 simgrid::config::Flag<double> breakpoint{"simix/breakpoint",
                                          "When non-negative, raise a SIGTRAP after given (simulated) time", -1.0};
 }
 }
 
-static std::function<void()> maestro_code;
+static simgrid::simix::ActorCode maestro_code;
 void SIMIX_set_maestro(void (*code)(void*), void* data)
 {
 #ifdef _WIN32
@@ -399,7 +397,7 @@ void SIMIX_run()
   do {
     XBT_DEBUG("New Schedule Round; size(queue)=%zu", simix_global->process_to_run.size());
 
-    if (simgrid::simix::breakpoint >= 0.0 && time >= simgrid::simix::breakpoint) {
+    if (simgrid::simix::breakpoint >= 0.0 && surf_get_clock() >= simgrid::simix::breakpoint) {
       XBT_DEBUG("Breakpoint reached (%g)", simgrid::simix::breakpoint.get());
       simgrid::simix::breakpoint = -1.0;
 #ifdef SIGTRAP
@@ -531,9 +529,6 @@ void SIMIX_run()
     XBT_DEBUG("### time %f, #processes %zu, #to_run %zu", time, simix_global->process_list.size(),
               simix_global->process_to_run.size());
 
-    if (simix_global->process_to_run.empty() && not simix_global->process_list.empty())
-      simgrid::simix::onDeadlock();
-
   } while (time > -1.0 || not simix_global->process_to_run.empty());
 
   if (not simix_global->process_list.empty()) {