Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill two more useless functions in VM
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 16 Nov 2016 22:44:21 +0000 (23:44 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 16 Nov 2016 22:44:21 +0000 (23:44 +0100)
include/simgrid/msg.h
src/msg/instr_msg_vm.cpp
src/msg/msg_private.h
src/msg/msg_vm.cpp

index 421a883..eab901e 100644 (file)
@@ -480,8 +480,7 @@ XBT_PUBLIC(int) MSG_vm_is_saving(msg_vm_t vm);
 XBT_PUBLIC(int) MSG_vm_is_saved(msg_vm_t vm);
 XBT_PUBLIC(int) MSG_vm_is_restoring(msg_vm_t vm);
 
-
-XBT_PUBLIC(const char*) MSG_vm_get_name(msg_vm_t vm);
+#define MSG_vm_get_name(vm) MSG_host_get_name(vm)
 
 XBT_PUBLIC(void) MSG_vm_get_params(msg_vm_t vm, vm_params_t params);
 XBT_PUBLIC(void) MSG_vm_set_params(msg_vm_t vm, vm_params_t params);
index 995a22d..a102d45 100644 (file)
@@ -12,7 +12,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_vm, instr, "MSG VM");
 
 char *instr_vm_id (msg_vm_t vm, char *str, int len)
 {
-  return instr_vm_id_2 (MSG_vm_get_name(vm), str, len);
+  return instr_vm_id_2(MSG_host_get_name(vm), str, len);
 }
 
 char *instr_vm_id_2 (const char *vm_name, char *str, int len)
index d0c4970..b07c9b6 100644 (file)
@@ -115,9 +115,6 @@ typedef struct dirty_page {
   msg_task_t task;
 } s_dirty_page, *dirty_page_t;
 
-XBT_PUBLIC_DATA(msg_vm_t) MSG_vm_get_by_name(const char *name);
-XBT_PUBLIC_DATA(const char*) MSG_vm_get_name(msg_vm_t vm);
-
 /************************** Global variables ********************************/
 typedef struct MSG_Global {
   int debug_multiple_use;       /* whether we want an error message when reusing the same Task for 2 things */
index 8f34a3c..714b70f 100644 (file)
@@ -47,31 +47,6 @@ void MSG_vm_get_params(msg_vm_t vm, vm_params_t params)
   static_cast<simgrid::s4u::VirtualMachine*>(vm)->parameters(params);
 }
 
-/** \ingroup msg_vm_management
- * \brief Finds a msg_vm_t using its name.
- *
- * This is a name directory service
- * \param name the name of a vm.
- * \return the corresponding vm
- *
- * Please note that a VM is a specific host. Hence, you should give a different name for each VM/PM.
- */
-msg_vm_t MSG_vm_get_by_name(const char *name)
-{
-  return MSG_host_by_name(name);
-}
-
-/** \ingroup m_vm_management
- *
- * \brief Return the name of the #msg_host_t.
- *
- * 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)
-{
-  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)
 {