From: Martin Quinson Date: Thu, 17 Nov 2016 09:19:26 +0000 (+0100) Subject: move an enum to the right location X-Git-Tag: v3_14~185 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/56626375ca41dbdd49fd486226f3da3104233dcb move an enum to the right location --- diff --git a/include/simgrid/s4u/VirtualMachine.hpp b/include/simgrid/s4u/VirtualMachine.hpp index b6863b327b..7c83f8c8d3 100644 --- a/include/simgrid/s4u/VirtualMachine.hpp +++ b/include/simgrid/s4u/VirtualMachine.hpp @@ -10,8 +10,17 @@ #include #include -namespace simgrid { +typedef enum { + SURF_VM_STATE_CREATED, /**< created, but not yet started */ + SURF_VM_STATE_RUNNING, + SURF_VM_STATE_SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */ + + SURF_VM_STATE_SAVING, /**< Save/restore involves disk I/O, so there should be transition states. */ + SURF_VM_STATE_SAVED, + SURF_VM_STATE_RESTORING, +} e_surf_vm_state_t; +namespace simgrid { namespace s4u { /** @ingroup s4u_api diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 7a7a091d7a..c4cf703959 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -139,18 +139,6 @@ typedef struct surf_model_description* surf_model_description_t; XBT_PUBLIC(int) find_model_description(s_surf_model_description_t * table, const char *name); XBT_PUBLIC(void) model_help(const char *category, s_surf_model_description_t * table); -/** @ingroup SURF_vm_interface */ -/* FIXME: Where should the VM state be defined? */ -typedef enum { - SURF_VM_STATE_CREATED, /**< created, but not yet started */ - SURF_VM_STATE_RUNNING, - SURF_VM_STATE_SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */ - - SURF_VM_STATE_SAVING, /**< Save/restore involves disk I/O, so there should be transition states. */ - SURF_VM_STATE_SAVED, - SURF_VM_STATE_RESTORING, -} e_surf_vm_state_t; - /***************************/ /* Generic model object */ /***************************/ diff --git a/src/plugins/vm/VirtualMachineImpl.hpp b/src/plugins/vm/VirtualMachineImpl.hpp index 53f948d22a..0a25e54fed 100644 --- a/src/plugins/vm/VirtualMachineImpl.hpp +++ b/src/plugins/vm/VirtualMachineImpl.hpp @@ -9,6 +9,7 @@ #include +#include "simgrid/s4u/VirtualMachine.hpp" #include "src/surf/HostImpl.hpp" #ifndef VM_INTERFACE_HPP_ diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index d8f3e1930c..5c5b852186 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -16,6 +16,7 @@ #include "simgrid/simix.h" #include "popping_private.h" +#include "simgrid/s4u/VirtualMachine.hpp" #include "src/kernel/activity/SynchroExec.hpp" /** @brief Host datatype from SIMIX POV */