while (not actors_to_destroy.empty()) {
smx_actor_t actor = &actors_to_destroy.front();
actors_to_destroy.pop_front();
- XBT_DEBUG("Getting rid of %p", actor);
+ XBT_DEBUG("Getting rid of %s (refcount: %d)", actor->get_cname(), actor->get_refcount());
intrusive_ptr_release(actor);
}
#if SIMGRID_HAVE_MC
*/
void Global::run_all_actors()
{
- SIMIX_context_runall();
+ simix_global->context_factory->run_all();
actors_to_run.swap(actors_that_ran);
actors_to_run.clear();
/* Kill all processes (but maestro) */
simix_global->maestro_process->kill_all();
- SIMIX_context_runall();
+ simix_global->context_factory->run_all();
simix_global->empty_trash();
/* Exit the SIMIX network module */
for (auto const& model : all_existing_models) {
simgrid::kernel::resource::Action* action;
- XBT_DEBUG("Handling the processes whose action failed (if any)");
+ 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)
simgrid::kernel::activity::ActivityImplPtr(action->get_activity())->post();
}
- XBT_DEBUG("Handling the processes whose action terminated normally (if any)");
+ 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)
// FIXME: make the timers being real callbacks (i.e. provide dispatchers that read and expand the args)
smx_timer_t timer = simgrid::simix::simix_timers.top().second;
simgrid::simix::simix_timers.pop();
- try {
- timer->callback();
- } catch (...) {
- xbt_die("Exception thrown out of timer callback");
- }
+ timer->callback();
delete timer;
}
return result;
*/
void SIMIX_run()
{
- if (not MC_record_path.empty()) {
+ if (MC_record_replay_is_active()) {
simgrid::mc::replay(MC_record_path);
return;
}
* - If a process is added because it's getting killed, its subsequent actions shouldn't matter
* - If a process gets added to actors_to_run because one of their blocking action constituting the meat
* of a simcall terminates, we're still good. Proof:
- * - You are added from SIMIX_simcall_answer() only. When this function is called depends on the resource
+ * - You are added from ActorImpl::simcall_answer() only. When this function is called depends on the resource
* kind (network, cpu, disk, whatever), but the same arguments hold. Let's take communications as an
* example.
* - For communications, this function is called from SIMIX_comm_finish().
for (smx_actor_t const& process : simix_global->actors_that_ran) {
if (process->simcall.call != SIMCALL_NONE) {
- SIMIX_simcall_handle(&process->simcall, 0);
+ process->simcall_handle(0);
}
}