Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into hypervisor
[simgrid.git] / src / include / surf / surf.h
index 3749e61..441070f 100644 (file)
@@ -278,11 +278,11 @@ typedef struct surf_workstation_model_extension_public {
 
 typedef struct surf_vm_workstation_model_extension_public {
   s_surf_model_extension_workstation_t basic;
-  void* (*create) (const char *name, void *workstation); // First operation of the VM model
+  void* (*create) (const char *name, void *ind_phys_workstation); // First operation of the VM model
   // start does not appear here as it corresponds to turn the state from created to running (see smx_vm.c)
-  int (*get_state) (void *workstation);
-  void (*set_state) (void *workstation, int state);
-  void (*destroy) (smx_host_t *host); // destory the vm-specific data
+  int (*get_state) (void *ind_phys_workstation);
+  void (*set_state) (void *ind_phys_workstation, int state);
+  void (*destroy) (void *ind_phys_workstation); // will be vm_ws_destroy(), which destroies the vm-specific data
 } s_surf_model_extension_vm_workstation_t;
 
 /** \ingroup SURF_models
@@ -608,6 +608,16 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_storage_model_description[];
  */
 XBT_PUBLIC_DATA(surf_model_t) surf_workstation_model;
 
+/** \ingroup SURF_models
+ *  \brief The vm_workstation model
+ *
+ *  Note that when you create an API on top of SURF,
+ *  the vm_workstation model should be the only one you use
+ *  because depending on the platform model, the network model and the CPU model
+ *  may not exist.
+ */
+XBT_PUBLIC_DATA(surf_model_t) surf_vm_workstation_model;
+
 /** \ingroup SURF_models
  *  \brief Initializes the platform with a compound workstation model
  *