X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/56626375ca41dbdd49fd486226f3da3104233dcb..d7e3b1e938eb2764bba47f073ac67f1d2e649c93:/src/plugins/vm/VirtualMachineImpl.hpp diff --git a/src/plugins/vm/VirtualMachineImpl.hpp b/src/plugins/vm/VirtualMachineImpl.hpp index 0a25e54fed..3ec7abb107 100644 --- a/src/plugins/vm/VirtualMachineImpl.hpp +++ b/src/plugins/vm/VirtualMachineImpl.hpp @@ -1,15 +1,10 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2016. 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. */ -#include -#include - -#include - #include "simgrid/s4u/VirtualMachine.hpp" +#include "src/simix/ActorImpl.hpp" #include "src/surf/HostImpl.hpp" #ifndef VM_INTERFACE_HPP_ @@ -19,7 +14,7 @@ // It corresponds to the cost of a VM running no tasks. namespace simgrid { -namespace surf { +namespace vm { /*********** * Classes * @@ -35,17 +30,17 @@ class XBT_PRIVATE VirtualMachineImpl; /** @ingroup SURF_callbacks * @brief Callbacks fired after VM creation. Signature: `void(VirtualMachine*)` */ -extern XBT_PRIVATE simgrid::xbt::signal onVmCreation; +extern XBT_PRIVATE simgrid::xbt::signal onVmCreation; /** @ingroup SURF_callbacks * @brief Callbacks fired after VM destruction. Signature: `void(VirtualMachine*)` */ -extern XBT_PRIVATE simgrid::xbt::signal onVmDestruction; +extern XBT_PRIVATE simgrid::xbt::signal onVmDestruction; /** @ingroup SURF_callbacks * @brief Callbacks after VM State changes. Signature: `void(VirtualMachine*)` */ -extern XBT_PRIVATE simgrid::xbt::signal onVmStateChange; +extern XBT_PRIVATE simgrid::xbt::signal onVmStateChange; /************ * Resource * @@ -55,36 +50,37 @@ extern XBT_PRIVATE simgrid::xbt::signal allVms_; + static std::deque allVms_; bool isMigrating = false; @@ -115,7 +111,7 @@ protected: * @brief SURF VM model interface class * @details A model is an object which handle the interactions between its Resources and its Actions */ -class VMModel : public HostModel { +class VMModel : public surf::HostModel { public: void adjustWeightOfDummyCpuActions() override{}; @@ -125,4 +121,6 @@ public: } } +XBT_PUBLIC_DATA(simgrid::vm::VMModel*) surf_vm_model; + #endif /* VM_INTERFACE_HPP_ */