Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Still fixing bugs - Adrien
authoralebre <adrien.lebre@inria.fr>
Thu, 31 Jan 2013 21:15:04 +0000 (22:15 +0100)
committeralebre <adrien.lebre@inria.fr>
Thu, 31 Jan 2013 21:17:47 +0000 (22:17 +0100)
src/msg/msg_vm.c
src/surf/vm_workstation.c

index eaa697b..c6ce9b0 100644 (file)
@@ -114,6 +114,7 @@ msg_vm_t MSG_vm_create(msg_host_t location, const char *name,
   MSG_vm_set_property_value(new, "MEM_CAP", bprintf("%d", core_nb), free);
   MSG_vm_set_property_value(new, "NET_CAP", bprintf("%d", core_nb), free);
 
   MSG_vm_set_property_value(new, "MEM_CAP", bprintf("%d", core_nb), free);
   MSG_vm_set_property_value(new, "NET_CAP", bprintf("%d", core_nb), free);
 
+  XBT_DEBUG("A new VM has been created");
   // TODO check whether the vm (i.e the virtual host) has been correctly added into the list of all hosts.
 
   #ifdef HAVE_TRACING
   // TODO check whether the vm (i.e the virtual host) has been correctly added into the list of all hosts.
 
   #ifdef HAVE_TRACING
index 8c1326c..94933eb 100644 (file)
@@ -13,7 +13,7 @@
 
 typedef struct workstation_VM2013 {
   s_surf_resource_t generic_resource;   /* Must remain first to add this to a trace */
 
 typedef struct workstation_VM2013 {
   s_surf_resource_t generic_resource;   /* Must remain first to add this to a trace */
-  surf_resource_t ind_physical_workstation;  // Pointer to the host OS
+  surf_resource_t physical_workstation;  // Pointer to the host OS
   e_msg_vm_state_t current_state;           // See include/msg/datatypes.h
 } s_workstation_VM2013_t, *workstation_VM2013_t;
 
   e_msg_vm_state_t current_state;           // See include/msg/datatypes.h
 } s_workstation_VM2013_t, *workstation_VM2013_t;
 
@@ -29,7 +29,7 @@ static void vm_ws_create(const char *name, void *ind_phys_workstation)
   vm_ws->generic_resource.model = surf_vm_workstation_model;
   vm_ws->generic_resource.name = xbt_strdup(name);
  // ind means ''indirect'' that this is a reference on the whole dict_elm structure (i.e not on the surf_resource_private infos)
   vm_ws->generic_resource.model = surf_vm_workstation_model;
   vm_ws->generic_resource.name = xbt_strdup(name);
  // ind means ''indirect'' that this is a reference on the whole dict_elm structure (i.e not on the surf_resource_private infos)
-  vm_ws->ind_physical_workstation = ind_phys_workstation;
+  vm_ws->physical_workstation = surf_workstation_resource_priv(ind_phys_workstation);
   vm_ws->current_state=msg_vm_state_created,
   xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, vm_ws);
 }
   vm_ws->current_state=msg_vm_state_created,
   xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, vm_ws);
 }