From d64ec0c011f971dd91c5052600ccca4dc6b2496f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 16 Nov 2016 23:32:35 +0100 Subject: [PATCH] remove unused functions in the VMs --- ChangeLog | 2 ++ src/msg/msg_private.h | 3 --- src/msg/msg_vm.cpp | 35 ----------------------------------- 3 files changed, 2 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d508846e2..2abf16e75f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,8 @@ SimGrid (3.14) UNRELEASED; urgency=low - MSG_mailbox_get_task_ext() -> MSG_task_receive_ext() - MSG_mailbox_get_task_ext_bounded -> MSG_task_receive_ext_bounded - MSG_host_(get/set)_params -> MSG_vm_(get/set)_params + * VM properties. Since msg_vm_t are msg_host_t, just use + MSG_host_get_property_value() and friends * Task affinity. Its intended behavior (that was very badly tested and probably not really working) was deceiving what most users diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index 4cb4b3e11e..014d32f858 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -115,9 +115,6 @@ typedef struct dirty_page { msg_task_t task; } s_dirty_page, *dirty_page_t; -XBT_PUBLIC_DATA(const char*) MSG_vm_get_property_value(msg_vm_t vm, const char *name); -XBT_PUBLIC_DATA(xbt_dict_t) MSG_vm_get_properties(msg_vm_t vm); -XBT_PUBLIC_DATA(void) MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value, void_f_pvoid_t free_ctn); 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); diff --git a/src/msg/msg_vm.cpp b/src/msg/msg_vm.cpp index 177b776444..8f34a3cfca 100644 --- a/src/msg/msg_vm.cpp +++ b/src/msg/msg_vm.cpp @@ -24,42 +24,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_vm, msg, "Cloud-oriented parts of the MSG AP /* **** ******** GENERAL ********* **** */ -/** \ingroup m_vm_management - * \brief Returns the value of a given vm property - * - * \param vm a vm - * \param name a property name - * \return value of a property (or nullptr if property not set) - */ -const char *MSG_vm_get_property_value(msg_vm_t vm, const char *name) -{ - return MSG_host_get_property_value(vm, name); -} - -/** \ingroup m_vm_management - * \brief Returns a xbt_dict_t consisting of the list of properties assigned to this host - * - * \param vm a vm - * \return a dict containing the properties - */ -xbt_dict_t MSG_vm_get_properties(msg_vm_t vm) -{ - xbt_assert((vm != nullptr), "Invalid parameters (vm is nullptr)"); - return vm->properties(); -} -/** \ingroup m_host_management - * \brief Change the value of a given host property - * - * \param vm a vm - * \param name a property name - * \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); -} /** \ingroup m_vm_management * \brief Set the parameters of a given host * -- 2.20.1