X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4871b54f42ce85370d6acdbcb7e42bf75a63b389..c39f643b5bfb0e99887c209a94e49f841a2daae4:/src/surf/vm_workstation_interface.cpp diff --git a/src/surf/vm_workstation_interface.cpp b/src/surf/vm_workstation_interface.cpp index 4dff946e5b..7572e71224 100644 --- a/src/surf/vm_workstation_interface.cpp +++ b/src/surf/vm_workstation_interface.cpp @@ -7,10 +7,8 @@ #include "vm_workstation_interface.hpp" #include "cpu_cas01.hpp" -extern "C" { XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm_workstation, surf, "Logging specific to the SURF VM workstation module"); -} WorkstationVMModelPtr surf_vm_workstation_model = NULL; @@ -26,12 +24,6 @@ WorkstationVMModel::WorkstationVMModel() : WorkstationModel("Virtual Workstation * Resource * ************/ - -WorkstationVMLmm::WorkstationVMLmm(RoutingEdgePtr netElm, CpuPtr cpu) - : WorkstationVM(netElm, cpu) - , WorkstationLmm() -{} - /* * A physical host does not disapper in the current SimGrid code, but a VM may * disapper during a simulation. @@ -39,10 +31,10 @@ WorkstationVMLmm::WorkstationVMLmm(RoutingEdgePtr netElm, CpuPtr cpu) WorkstationVM::~WorkstationVM() { /* ind_phys_workstation equals to smx_host_t */ - surf_resource_t ind_vm_workstation = xbt_lib_get_elm_or_null(host_lib, m_name); + surf_resource_t ind_vm_workstation = xbt_lib_get_elm_or_null(host_lib, getName()); /* Before clearing the entries in host_lib, we have to pick up resources. */ - CpuCas01LmmPtr cpu = dynamic_cast( + CpuCas01Ptr cpu = dynamic_cast( static_cast( surf_cpu_resource_priv(ind_vm_workstation))); @@ -52,9 +44,9 @@ WorkstationVM::~WorkstationVM() * Do not call xbt_lib_remove() here. It deletes all levels of the key, * including MSG_HOST_LEVEL and others. We should unregister only what we know. */ - xbt_lib_unset(host_lib, m_name, SURF_CPU_LEVEL, 0); - xbt_lib_unset(host_lib, m_name, ROUTING_HOST_LEVEL, 0); - xbt_lib_unset(host_lib, m_name, SURF_WKS_LEVEL, 0); + xbt_lib_unset(host_lib, getName(), SURF_CPU_LEVEL, 0); + xbt_lib_unset(host_lib, getName(), ROUTING_HOST_LEVEL, 0); + xbt_lib_unset(host_lib, getName(), SURF_WKS_LEVEL, 0); /* TODO: comment out when VM stroage is implemented. */ // xbt_lib_unset(host_lib, name, SURF_STORAGE_LEVEL, 0); @@ -74,7 +66,7 @@ WorkstationVM::~WorkstationVM() **/ surf_resource_t WorkstationVM::getPm() { - return xbt_lib_get_elm_or_null(host_lib, p_subWs->m_name); + return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName()); } /**********