Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : remove unused files in examples/ms/mc
[simgrid.git] / examples / msg / migration / migration.c
index cd2b65dbb8e828850e506b5129b3e46bf58cccad..898ac256e8cc8d3b9d45ab50cbd1f65bd0797044 100644 (file)
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
                              "Messages specific for this msg example");
 
+/** @addtogroup MSG_examples
+ *  
+ *  - <b>migration/migration.c</b> Demonstrates how to use the @ref
+ *    MSG_process_migrate function to let processes change the host they 
+ *    run on after their start. 
+ */
+
 xbt_mutex_t mutex = NULL;
 xbt_cond_t cond = NULL;
 static m_process_t process_to_migrate = NULL;
@@ -39,7 +46,7 @@ static int emigrant(int argc, char *argv[])
   xbt_mutex_release(mutex);
   MSG_process_suspend(MSG_process_self());
   m_host_t h = MSG_process_get_host(MSG_process_self());
-  XBT_INFO("I've been moved on this new host: %s", h->name);
+  XBT_INFO("I've been moved on this new host: %s", MSG_host_get_name(h));
   XBT_INFO("Uh, nothing to do here. Stopping now");
   return 0;
 }                               /* end_of_emigrant */