Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
First complete implementation of a new MSG call (starting from MSG down
[simgrid.git] / include / msg / datatypes.h
index 0536dbb..9394bf1 100644 (file)
@@ -46,7 +46,10 @@ typedef xbt_dictelm_t msg_host_t;
 typedef s_xbt_dictelm_t s_msg_host_t;
 
 typedef struct msg_host_priv {
-  xbt_swag_t vms;
+
+       // TODO Warning keeping such vms attribut may lead to some complexity at the SURF Level.
+       // Please check with Arnaud
+       xbt_dynar_t vms;
 #ifdef MSG_USE_DEPRECATED
   msg_mailbox_t *mailboxes;     /**< the channels  */
 #endif
@@ -81,22 +84,40 @@ typedef struct msg_task {
  */
 typedef struct msg_task *msg_task_t;
 
+/* ******************************** Hypervisor ************************************* */
+typedef struct msg_hypervisor *msg_hypervisor_t;
+
+typedef struct msg_hypervisor {
+       const char *name;
+       s_xbt_swag_hookup_t all_hypervisor_hookup;
+       xbt_dynar_t vms;   // vms on this hypervisor
+       msg_host_t host;  // physical host of this hypervisor
+
+  /* The hypervisor object does not have parameters like the number of CPU
+ Ê * cores and the size of memory. These parameters come from those of the
+ Ê * physical host.
+ Ê **/
+       int overcommit;
+
+} s_msg_hypervisor_t;
+
 /* ********************************  VM ************************************* */
-typedef struct msg_vm *msg_vm_t;
+typedef msg_host_t msg_vm_t;
 
+/* todo: make it clear */
 typedef enum {
-  msg_vm_state_suspended, msg_vm_state_running, msg_vm_state_migrating
+msg_vm_state_created,
+msg_vm_state_booting,
+msg_vm_state_running,
+msg_vm_state_sleeping,
+msg_vm_state_migrating,
+msg_vm_state_resuming,
+msg_vm_state_suspending,
+msg_vm_state_saving,
+msg_vm_state_restoring,
 } e_msg_vm_state_t;
 
-typedef struct msg_vm {
-  const char *name;
-  s_xbt_swag_hookup_t all_vms_hookup;
-  s_xbt_swag_hookup_t host_vms_hookup;
-  xbt_dynar_t processes;
-  e_msg_vm_state_t state;
-  msg_host_t location;
-  int coreAmount;
-} s_msg_vm_t;
+
 
 /* ******************************** File ************************************ */
 typedef struct simdata_file *simdata_file_t;