Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'hypervisor' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid into hypervisor
[simgrid.git] / src / simix / smx_host_private.h
index 6819f61..b91a91e 100644 (file)
 #include "smx_smurf_private.h"
 
 /** @brief Host datatype */
-typedef struct s_smx_host {
-  char *name;              /**< @brief host name if any */
-  void *host;                   /* SURF modeling */
+typedef struct s_smx_host_priv {
   xbt_swag_t process_list;
   xbt_dynar_t auto_restart_processes;
   void *data;              /**< @brief user data */
-} s_smx_host_t;
+} s_smx_host_priv_t;
+
+static inline smx_host_priv_t SIMIX_host_priv(smx_host_t host){
+  return xbt_lib_get_level(host, SIMIX_HOST_LEVEL);
+}
+
 
 smx_host_t SIMIX_host_create(const char *name, void *workstation, void *data);
 void SIMIX_host_destroy(void *host);
@@ -82,5 +85,50 @@ void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
 void SIMIX_set_category(smx_action_t action, const char *category);
 #endif
 
+
+
+/* vm related stuff */
+smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host);
+smx_host_t SIMIX_pre_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host);
+
+void SIMIX_vm_destroy(smx_host_t ind_vm);
+void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm);
+// --
+void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer);
+void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm);
+
+void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer);
+void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm);
+// --
+void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer);
+void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm);
+
+void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer);
+void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm);
+// --
+void SIMIX_vm_start(smx_host_t ind_vm);
+void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm);
+
+void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer);
+void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm);
+// --
+void SIMIX_vm_set_state(smx_host_t ind_vm, int state);
+void SIMIX_pre_vm_set_state(smx_simcall_t simcall, smx_host_t ind_vm, int state);
+
+int SIMIX_vm_get_state(smx_host_t ind_vm);
+int SIMIX_pre_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm);
+// --
+void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm);
+void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm);
+
+void *SIMIX_vm_get_pm(smx_host_t ind_vm);
+void *SIMIX_pre_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm);
+
+void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params);
+void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
+
+void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params);
+void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
+
 #endif