Remove the vms entry from the structures. It is not used anymore.
The surf layer keeps these information.
typedef s_xbt_dictelm_t s_msg_host_t;
typedef struct msg_host_priv {
-
- // 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
*/
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 ************************************* */
+/* ******************************** VM ************************************* */
typedef msg_host_t msg_vm_t;
typedef msg_host_priv_t msg_vm_priv_t;
XBT_PUBLIC(void) MSG_vm_destroy(msg_vm_t vm);
-XBT_PUBLIC(xbt_dynar_t) MSG_vms_as_dynar(void);
+/* TODO: do we need this? */
+// XBT_PUBLIC(xbt_dynar_t) MSG_vms_as_dynar(void);
/*
void* MSG_process_get_property(msg_process_t, char* key)
xbt_getpid = MSG_process_self_PID;
if (!msg_global) {
- // s_msg_vm_t vm; // to compute the offset
SIMIX_global_init(argc, argv);
msg_global->sent_msg = 0;
msg_global->task_copy_callback = NULL;
msg_global->process_data_cleanup = NULL;
-// msg_global->vms = xbt_swag_new(xbt_swag_offset(vm,all_vms_hookup));
/* initialization of the action module */
_MSG_action_init();
TRACE_end();
#endif
- xbt_swag_free(msg_global->vms);
free(msg_global);
msg_global = NULL;
}
const char *name = SIMIX_host_get_name(workstation);
msg_host_priv_t host = xbt_new0(s_msg_host_priv_t, 1);
- host->vms = xbt_dynar_new(sizeof(msg_vm_t),NULL);
-
#ifdef MSG_USE_DEPRECATED
int i;
char alias[MAX_ALIAS_NAME + 1] = { 0 }; /* buffer used to build the key of the mailbox */
if (msg_global->max_channel > 0)
free(host->mailboxes);
#endif
- if (xbt_dynar_length(host->vms) > 0 ) {
- XBT_VERB("Host shut down, but it still hosts %d VMs. They will be leaked.", xbt_dynar_length(host->vms));
- }
- xbt_dynar_free(&host->vms);
+
+ /* TODO:
+ * What happens if VMs still remain on this host?
+ * Revisit here after the surf layer gets stable.
+ **/
+
free(host);
}
msg_task_t *task_received; /* where the task will be received (NULL for the sender) */
msg_error_t status; /* status of the communication once finished */
} s_msg_comm_t;
-/*
-typedef enum {
- msg_vm_state_suspended, msg_vm_state_running, msg_vm_state_migrating
-} 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;
-*/
+
/************************** Global variables ********************************/
typedef struct MSG_Global {
xbt_fifo_t host;
unsigned long int sent_msg; /* Total amount of messages sent during the simulation */
void (*task_copy_callback) (msg_task_t task, msg_process_t src, msg_process_t dst);
void_f_pvoid_t process_data_cleanup;
- xbt_swag_t vms;
} s_MSG_Global_t, *MSG_Global_t;
/*extern MSG_Global_t msg_global;*/