void Actor::set_auto_restart(bool autorestart)
{
- simgrid::simix::simcall([this, autorestart]() { pimpl_->auto_restart_ = autorestart; });
+ simgrid::simix::simcall([this, autorestart]() { pimpl_->set_auto_restart(autorestart); });
}
void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
process->on_exit.emplace_back(s_smx_process_exit_fun_t{fun, data});
}
-/**
- * \brief Sets the auto-restart status of the process.
- * If set to 1, the process will be automatically restarted when its host comes back.
- */
-void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart) {
- process->auto_restart_ = auto_restart;
-}
-
/** @brief Restart a process, starting it again from the beginning. */
/**
* \ingroup simix_process_management
ActorImpl() : piface_(this) {}
~ActorImpl();
+ void set_auto_restart(bool autorestart) { auto_restart_ = autorestart; }
+
boost::intrusive::list_member_hook<> host_process_list_hook; /* simgrid::simix::Host::process_list */
boost::intrusive::list_member_hook<> smx_destroy_list_hook; /* simix_global->process_to_destroy */
boost::intrusive::list_member_hook<> smx_synchro_hook; /* {mutex,cond,sem}->sleeping */
XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
XBT_PRIVATE void SIMIX_process_change_host(smx_actor_t process, sg_host_t dest);
-XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart);
-
extern void (*SMPI_switch_data_segment)(simgrid::s4u::ActorPtr actor);
XBT_PRIVATE void SIMIX_process_sleep_destroy(smx_activity_t synchro);
if (arg->kill_time >= 0)
simcall_process_set_kill_time(actor, arg->kill_time);
if (auto_restart)
- SIMIX_process_auto_restart_set(actor, auto_restart);
+ actor->set_auto_restart(auto_restart);
delete arg;
});
} else { // start_time <= SIMIX_get_clock()
if (arg->kill_time >= 0)
simcall_process_set_kill_time(actor, arg->kill_time);
if (auto_restart)
- SIMIX_process_auto_restart_set(actor, auto_restart);
+ actor->set_auto_restart(auto_restart);
}
}
}