Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more documented examples
[simgrid.git] / teshsuite / msg / cloud-migration / cloud-migration.c
index 0391b56..1e27f3b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2019. The SimGrid Team.
+/* Copyright (c) 2007-2020. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example")
 
 static void vm_migrate(msg_vm_t vm, msg_host_t dst_pm)
 {
-  msg_host_t src_pm = MSG_vm_get_pm(vm);
+  const_sg_host_t src_pm = MSG_vm_get_pm(vm);
   double mig_sta    = MSG_get_clock();
   MSG_vm_migrate(vm, dst_pm);
   double mig_end = MSG_get_clock();
@@ -34,7 +34,7 @@ static int migration_worker_main(int argc, char* argv[])
   return 0;
 }
 
-static void vm_migrate_async(msg_vm_t vm, msg_host_t dst_pm)
+static void vm_migrate_async(const_sg_vm_t vm, const_sg_host_t dst_pm)
 {
   const char* vm_name     = MSG_vm_get_name(vm);
   const char* dst_pm_name = MSG_host_get_name(dst_pm);
@@ -54,7 +54,7 @@ static int master_main(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[
 {
   msg_host_t pm0 = MSG_host_by_name("Fafard");
   msg_host_t pm1 = MSG_host_by_name("Tremblay");
-  msg_host_t pm2 = MSG_host_by_name("Bourassa");
+  const_sg_host_t pm2 = MSG_host_by_name("Bourassa");
 
   msg_vm_t vm0 = MSG_vm_create_core(pm0, "VM0");
   MSG_vm_set_ramsize(vm0, 1e9); // 1Gbytes