X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/98a7e16b0620dead1ef3f21792ce9f917b4ece58..5e7d79b763a5f55d1afb579d2b5a8d30ccfe869c:/src/plugins/vm/VirtualMachineImpl.cpp?ds=sidebyside diff --git a/src/plugins/vm/VirtualMachineImpl.cpp b/src/plugins/vm/VirtualMachineImpl.cpp index 9ba6c33151..da17d4a188 100644 --- a/src/plugins/vm/VirtualMachineImpl.cpp +++ b/src/plugins/vm/VirtualMachineImpl.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2018. 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. */ @@ -54,7 +53,7 @@ static void hostStateChange(s4u::Host& host) if (vm->getPm() == &host) trash.push_back(vm); for (s4u::VirtualMachine* vm : trash) - vm->pimpl_vm_->shutdown(SIMIX_process_self()); + vm->shutdown(); } } VMModel::VMModel() @@ -93,12 +92,12 @@ double VMModel::nextOccuringEvent(double now) surf::Cpu* cpu = ws_vm->pimpl_cpu; xbt_assert(cpu, "cpu-less host"); - double solved_value = ws_vm->pimpl_vm_->action_->getVariable()->get_value(); // this is X1 in comment above, what + double solved_value = ws_vm->getImpl()->action_->getVariable()->get_value(); // this is X1 in comment above, what // this VM got in the sharing on the PM - XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->getCname(), ws_vm->pimpl_vm_->getPm()->getCname()); + XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->getCname(), ws_vm->getPm()->getCname()); xbt_assert(cpu->model() == surf_cpu_model_vm); - lmm_system_t vcpu_system = cpu->model()->getMaxminSystem(); + kernel::lmm::System* vcpu_system = cpu->model()->getMaxminSystem(); vcpu_system->update_constraint_bound(cpu->constraint(), virt_overhead * solved_value); } @@ -260,14 +259,14 @@ void VirtualMachineImpl::setPm(s4u::Host* destination) surf::CpuAction* new_cpu_action = static_cast(destination->pimpl_cpu->execution_start(0, this->coreAmount_)); - if (action_->getRemainsNoUpdate() > 0) - XBT_CRITICAL("FIXME: need copy the state(?), %f", action_->getRemainsNoUpdate()); + if (action_->get_remains_no_update() > 0) + XBT_CRITICAL("FIXME: need copy the state(?), %f", action_->get_remains_no_update()); /* keep the bound value of the cpu action of the VM. */ - double old_bound = action_->getBound(); + double old_bound = action_->get_bound(); if (old_bound > 0) { XBT_DEBUG("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst); - new_cpu_action->setBound(old_bound); + new_cpu_action->set_bound(old_bound); } XBT_ATTRIB_UNUSED int ret = action_->unref(); @@ -280,18 +279,8 @@ void VirtualMachineImpl::setPm(s4u::Host* destination) void VirtualMachineImpl::setBound(double bound) { - action_->setBound(bound); + action_->set_bound(bound); } -void VirtualMachineImpl::getParams(vm_params_t params) -{ - *params = params_; -} - -void VirtualMachineImpl::setParams(vm_params_t params) -{ - /* may check something here. */ - params_ = *params; -} } }