+ actors_to_run.swap(actors_that_ran);
+ actors_to_run.clear();
+}
+
+/** Wake up all actors waiting for a Surf action to finish */
+void Global::wake_all_waiting_actors()
+{
+ for (auto const& model : all_existing_models) {
+ kernel::resource::Action* action;
+
+ XBT_DEBUG("Handling the failed actions (if any)");
+ while ((action = model->extract_failed_action())) {
+ XBT_DEBUG(" Handling Action %p", action);
+ if (action->get_activity() != nullptr)
+ kernel::activity::ActivityImplPtr(action->get_activity())->post();
+ }
+ XBT_DEBUG("Handling the terminated actions (if any)");
+ while ((action = model->extract_done_action())) {
+ XBT_DEBUG(" Handling Action %p", action);
+ if (action->get_activity() == nullptr)
+ XBT_DEBUG("probably vcpu's action %p, skip", action);
+ else
+ kernel::activity::ActivityImplPtr(action->get_activity())->post();
+ }
+ }
+}
+
+config::Flag<double> cfg_breakpoint{
+ "debug/breakpoint", {"simix/breakpoint"}, "When non-negative, raise a SIGTRAP after given (simulated) time", -1.0};
+} // namespace simix
+} // namespace simgrid
+
+static simgrid::simix::ActorCode maestro_code;