XBT_PUBLIC void sg_actor_resume(sg_actor_t actor);
XBT_PUBLIC int sg_actor_is_suspended(sg_actor_t actor);
XBT_PUBLIC sg_actor_t sg_actor_restart(sg_actor_t actor);
+void sg_actor_set_auto_restart(sg_actor_t actor, int auto_restart);
XBT_PUBLIC void sg_actor_daemonize(sg_actor_t actor);
XBT_PUBLIC void sg_actor_migrate(sg_actor_t process, sg_host_t host);
XBT_PUBLIC void sg_actor_join(sg_actor_t actor, double timeout);
XBT_PUBLIC void MSG_process_resume(msg_process_t process);
XBT_PUBLIC int MSG_process_is_suspended(msg_process_t process);
XBT_PUBLIC void MSG_process_restart(msg_process_t process);
+XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
XBT_PUBLIC void MSG_process_daemonize(msg_process_t process);
XBT_PUBLIC void MSG_process_migrate(msg_process_t process, msg_host_t host);
XBT_PUBLIC void MSG_process_join(msg_process_t process, double timeout);
XBT_PUBLIC msg_error_t MSG_process_set_data(msg_process_t process, void* data);
XBT_PUBLIC void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void* data);
-XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
XBT_PUBLIC void MSG_process_ref(msg_process_t process);
XBT_PUBLIC void MSG_process_unref(msg_process_t process);
{
sg_actor_restart(actor);
}
+void MSG_process_auto_restart_set(sg_actor_t actor, int auto_restart)
+{
+ sg_actor_set_auto_restart(actor, auto_restart);
+}
+
void MSG_process_daemonize(sg_actor_t actor)
{
sg_actor_daemonize(actor);
void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data) {
simgrid::s4u::this_actor::on_exit(fun, data);
}
-/**
- * \ingroup m_process_management
- * \brief Sets the "auto-restart" flag of the process.
- * If the flag is set to 1, the process will be automatically restarted when its host comes back up.
- */
-XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart)
-{
- process->set_auto_restart(auto_restart);
-}
/** @ingroup m_process_management
* @brief Take an extra reference on that process to prevent it to be garbage-collected
return actor->restart();
}
+/**
+ * \ingroup m_actor_management
+ * \brief Sets the "auto-restart" flag of the actor.
+ * If the flag is set to 1, the actor will be automatically restarted when its host comes back up.
+ */
+void sg_actor_set_auto_restart(sg_actor_t actor, int auto_restart)
+{
+ actor->set_auto_restart(auto_restart);
+}
+
/** @ingroup m_actor_management
* @brief This actor will be terminated automatically when the last non-daemon actor finishes
*/