X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4c753f8d4cabd4104f3f7109823f16be2ebdcce3..a7cc502f224afb96f0203b94759cd0dabebf8de5:/src/s4u/s4u_VirtualMachine.cpp diff --git a/src/s4u/s4u_VirtualMachine.cpp b/src/s4u/s4u_VirtualMachine.cpp index 24f158fe47..9f6f7716ee 100644 --- a/src/s4u/s4u_VirtualMachine.cpp +++ b/src/s4u/s4u_VirtualMachine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,7 @@ #include #include "src/kernel/resource/VirtualMachineImpl.hpp" -#include "src/surf/cpu_cas01.hpp" +#include "src/kernel/resource/models/cpu_cas01.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_vm, s4u, "S4U virtual machines"); @@ -74,6 +74,7 @@ void VirtualMachine::destroy() XBT_DEBUG("destroy %s", get_cname()); on_vm_destruction(*this); + on_this_vm_destruction(*this); /* Then, destroy the VM object */ kernel::actor::simcall_answered( [this]() { get_vm_impl()->get_physical_host()->get_impl()->destroy_vm(get_name()); }); @@ -119,7 +120,7 @@ VirtualMachine* VirtualMachine::set_ramsize(size_t ramsize) /** @brief Set a CPU bound for a given VM. * @ingroup msg_VMs * - * 1. Note that in some cases MSG_task_set_bound() may not intuitively work for VMs. + * 1. Note that in some cases sg_exec_set_bound() may not intuitively work for VMs. * * For example, * On PM0, there are Task1 and VM0. @@ -137,7 +138,7 @@ VirtualMachine* VirtualMachine::set_ramsize(size_t ramsize) * It should be the sum of all tasks on the VM. But, this solution might be costly, because we have to scan all tasks * on the VM in share_resource() or we have to trap both the start and end of task execution. * - * The current solution is to use setBound(), which allows us to directly set the bound of the dummy CPU action. + * The current solution is to use set_bound(), which allows us to directly set the bound of the dummy CPU action. * * 2. Note that bound == 0 means no bound (i.e., unlimited). But, if a host has multiple CPU cores, the CPU share of a * computation task (or a VM) never exceeds the capacity of a CPU core.