From 4151db510f9002613da53c0c0d191be5905d458f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 28 Aug 2016 18:30:13 +0200 Subject: [PATCH] how many useless functions can this code possibly contain? --- src/include/surf/surf.h | 3 --- src/simix/smx_vm.cpp | 11 +++-------- src/surf/surf_c_bindings.cpp | 4 ---- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index eb14203fb7..9a7ae1a1c5 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -192,9 +192,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t mode */ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model); -/** @brief Create a new VM on the specified host */ -XBT_PUBLIC(void) surf_vm_model_create(const char *name, sg_host_t host_PM); - /** @brief Create a communication between two hosts * * @param model The model which handle the communication diff --git a/src/simix/smx_vm.cpp b/src/simix/smx_vm.cpp index ba05d17e6a..768531c0c1 100644 --- a/src/simix/smx_vm.cpp +++ b/src/simix/smx_vm.cpp @@ -8,25 +8,20 @@ #include "src/surf/virtual_machine.hpp" #include "src/surf/HostImpl.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX (vms)"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX Virtual Machines"); /* **** create a VM **** */ /** * @brief Internal function to create a SIMIX host. * @param name name of the host to create - * @param data some user data (may be nullptr) */ -sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host) +sg_host_t SIMIX_vm_create(const char *name, sg_host_t phys_host) { - /* Create surf associated resource */ - surf_vm_model_create(name, ind_phys_host); + surf_vm_model->createVM(name, phys_host); sg_host_t host = sg_host_by_name(name); SIMIX_host_create(host); - /* We will be able to register the VM to its physical host, so that we can promptly - * retrieve the list VMs on the physical host. */ - return host; } diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index aba848023d..cbbd1a0271 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -176,10 +176,6 @@ int surf_model_running_action_set_size(surf_model_t model){ return model->getRunningActionSet()->size(); } -void surf_vm_model_create(const char *name, sg_host_t ind_phys_host){ - surf_vm_model->createVM(name, ind_phys_host); -} - surf_action_t surf_network_model_communicate(surf_network_model_t model, sg_host_t src, sg_host_t dst, double size, double rate){ return model->communicate(src->pimpl_netcard, dst->pimpl_netcard, size, rate); } -- 2.20.1