Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
just a cosmetic
authorTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 11 Mar 2013 11:30:04 +0000 (12:30 +0100)
committerTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 11 Mar 2013 11:43:19 +0000 (12:43 +0100)
src/msg/msg_vm.c
src/surf/vm_workstation.c

index 9cce6b7..29d7972 100644 (file)
@@ -61,9 +61,9 @@ xbt_dict_t MSG_vm_get_properties(msg_vm_t vm)
  * \param value what to change the property to
  * \param free_ctn the freeing function to use to kill the value on need
  */
-void MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value,void_f_pvoid_t free_ctn) {
-
-  xbt_dict_set(MSG_host_get_properties(vm), name, value,free_ctn);
+void MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value, void_f_pvoid_t free_ctn)
+{
+  xbt_dict_set(MSG_host_get_properties(vm), name, value, free_ctn);
 }
 
 /** \ingroup msg_vm_management
@@ -77,7 +77,8 @@ void MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value,void_f
  * for each VM/PM.
  */
 
-msg_vm_t MSG_vm_get_by_name(const char *name){
+msg_vm_t MSG_vm_get_by_name(const char *name)
+{
        return MSG_get_host_by_name(name);
 }
 
@@ -88,13 +89,15 @@ msg_vm_t MSG_vm_get_by_name(const char *name){
  * This functions checks whether \a host is a valid pointer or not and return
    its name.
  */
-const char *MSG_vm_get_name(msg_vm_t vm) {
+const char *MSG_vm_get_name(msg_vm_t vm)
+{
   return MSG_host_get_name(vm);
 }
 
 
 /* **** Check state of a VM **** */
-static inline int __MSG_vm_is_state(msg_vm_t vm, e_surf_vm_state_t state) {
+static inline int __MSG_vm_is_state(msg_vm_t vm, e_surf_vm_state_t state)
+{
   return simcall_vm_get_state(vm) == state;
 }
 
@@ -204,7 +207,7 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name)
   msg_vm_t ind_vm = NULL;
   void *ind_vm_workstation =  NULL;
 
-  // Ask simix to create the surf vm resource
+  /* Ask the SIMIX layer to create the surf vm resource */
   ind_vm_workstation = simcall_vm_create(name, ind_pm);
   ind_vm = (msg_vm_t) __MSG_host_create(ind_vm_workstation);
 
@@ -218,7 +221,7 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name)
 }
 
 
-/** @brief Start a vm (ie. boot)
+/** @brief Start a vm (i.e., boot the guest operating system)
  *  @ingroup msg_VMs
  *
  *  If the VM cannot be started, an exception is generated.
@@ -226,7 +229,6 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name)
  */
 void MSG_vm_start(msg_vm_t vm)
 {
-  //Please note that vm start can raise an exception if the VM cannot be started.
   simcall_vm_start(vm);
 
   #ifdef HAVE_TRACING
index be8d08c..9d9c32f 100644 (file)
@@ -11,8 +11,8 @@
 #include "surf/surf_resource.h"
 #include "simgrid/sg_config.h"
 #include "vm_workstation_private.h"
-#include "surf/cpu_cas01_private.h"
-#include "surf/maxmin_private.h"
+#include "cpu_cas01_private.h"
+#include "maxmin_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm_workstation, surf,
                                 "Logging specific to the SURF VM workstation module");
@@ -171,7 +171,6 @@ static void vm_ws_destroy(void *ind_vm_workstation)
        workstation_VM2013_t vm_ws = surf_workstation_resource_priv(ind_vm_workstation);
   cpu_Cas01_t cpu = surf_cpu_resource_priv(ind_vm_workstation);
        const char *name = vm_ws->ws.generic_resource.name;
-  XBT_INFO("%s", name);
 
        xbt_assert(vm_ws);
        xbt_assert(vm_ws->ws.generic_resource.model == surf_vm_workstation_model);
@@ -225,7 +224,6 @@ static void vm_ws_suspend(void *ind_vm_ws)
 {
   workstation_VM2013_t vm_ws = surf_workstation_resource_priv(ind_vm_ws);
 
-  XBT_INFO("vm %p suspend", ind_vm_ws);
   surf_action_suspend(vm_ws->cpu_action);
 
   vm_ws->current_state = SURF_VM_STATE_SUSPENDED;
@@ -424,7 +422,6 @@ static void *vm_ws_get_pm(void *ind_vm_ws)
 }
 
 
-
 /* Adding a task to a VM updates the VCPU task on its physical machine. */
 surf_action_t vm_ws_execute(void *workstation, double size)
 {