Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add MSG_vm_get_pm
authorTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 11 Mar 2013 10:35:45 +0000 (11:35 +0100)
committerTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 11 Mar 2013 11:43:19 +0000 (12:43 +0100)
include/msg/msg.h
src/include/surf/surf.h
src/msg/msg_vm.c

index b416e59..ea022ce 100644 (file)
@@ -394,6 +394,8 @@ XBT_PUBLIC(void) MSG_vm_shutdown(msg_vm_t vm);
 
 XBT_PUBLIC(void) MSG_vm_destroy(msg_vm_t vm);
 
+msg_host_t MSG_vm_get_pm(msg_vm_t vm);
+
 /* TODO: do we need this? */
 // XBT_PUBLIC(xbt_dynar_t) MSG_vms_as_dynar(void);
 
index a0f87b6..d3e2ecc 100644 (file)
@@ -315,11 +315,12 @@ typedef struct surf_vm_workstation_model_extension_public {
   void   (*restore) (void *ind_vm_ws);
 
   void   (*migrate) (void *ind_vm_ws, void *ind_vm_ws_dest); // will be vm_ws_migrate()
-  void * (*get_pm)  (void *ind_vm_ws); // will be vm_ws_get_pmt()
 
   int    (*get_state) (void *ind_vm_ws);
   void   (*set_state) (void *ind_vm_ws, int state);
 
+  void * (*get_pm) (void *ind_vm_ws); // will be vm_ws_get_pm()
+
 } s_surf_model_extension_vm_workstation_t;
 
 /** \ingroup SURF_models
index 103535a..7363b67 100644 (file)
@@ -388,3 +388,12 @@ void MSG_vm_destroy(msg_vm_t vm)
   TRACE_msg_vm_end(vm);
   #endif
 }
+
+
+/** @brief Get the physical host of a givne VM.
+ *  @ingroup msg_VMs
+ */
+msg_host_t MSG_vm_get_pm(msg_vm_t vm)
+{
+  return simcall_vm_get_pm(vm);
+}