Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
one more legacy MSG function
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 22 May 2018 00:46:23 +0000 (02:46 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 22 May 2018 00:46:23 +0000 (02:46 +0200)
include/simgrid/actor.h
include/simgrid/msg.h
src/msg/msg_legacy.cpp
src/msg/msg_process.cpp
src/s4u/s4u_Actor.cpp

index 0e72156..e44db8c 100644 (file)
@@ -31,6 +31,7 @@ XBT_PUBLIC void sg_actor_suspend(sg_actor_t actor);
 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);
 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 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);
index 93a9c97..3ff8e91 100644 (file)
@@ -140,6 +140,7 @@ XBT_PUBLIC void MSG_process_suspend(msg_process_t process);
 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_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 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);
@@ -253,7 +254,6 @@ XBT_PUBLIC void* MSG_process_get_data(msg_process_t process);
 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 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);
 
 XBT_PUBLIC void MSG_process_ref(msg_process_t process);
 XBT_PUBLIC void MSG_process_unref(msg_process_t process);
index eb797db..43ac177 100644 (file)
@@ -74,6 +74,11 @@ void MSG_process_restart(sg_actor_t actor)
 {
   sg_actor_restart(actor);
 }
 {
   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_daemonize(sg_actor_t actor)
 {
   sg_actor_daemonize(actor);
index 3d637e4..1932fc5 100644 (file)
@@ -307,15 +307,6 @@ smx_context_t MSG_process_get_smx_ctx(msg_process_t process) { // deprecated --
 void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data) {
   simgrid::s4u::this_actor::on_exit(fun, data);
 }
 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
 
 /** @ingroup m_process_management
  * @brief Take an extra reference on that process to prevent it to be garbage-collected
index 1aac413..18339ed 100644 (file)
@@ -541,6 +541,16 @@ sg_actor_t sg_actor_restart(sg_actor_t actor)
   return actor->restart();
 }
 
   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
  */
 /** @ingroup m_actor_management
  * @brief This actor will be terminated automatically when the last non-daemon actor finishes
  */