Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
attempt to extend S4U to migrate actors
[simgrid.git] / src / s4u / s4u_actor.cpp
index abc984a..97d7ec1 100644 (file)
@@ -52,6 +52,11 @@ void Actor::setAutoRestart(bool autorestart) {
   simcall_process_auto_restart_set(pimpl_,autorestart);
 }
 
+void Actor::migrate(Host* new_host)
+{
+  simcall_process_set_host(pimpl_, new_host);
+}
+
 s4u::Host* Actor::host()
 {
   return this->pimpl_->host;
@@ -173,6 +178,16 @@ std::string name()
 {
   return SIMIX_process_self()->name;
 }
+
+Host* host()
+{
+  return SIMIX_process_self()->host;
+}
+
+void migrate(Host* new_host)
+{
+  simcall_process_set_host(SIMIX_process_self(), new_host);
+}
 }
 }
 }