X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bc5903068a99bfc50a9f7a479cc3305326f774e9..20bb321a5cf8f244e33b5562b9dd1d8fb5d4864a:/src/surf/vm_workstation_interface.hpp diff --git a/src/surf/vm_workstation_interface.hpp b/src/surf/vm_workstation_interface.hpp index 20b1700ac4..66a3e9da10 100644 --- a/src/surf/vm_workstation_interface.hpp +++ b/src/surf/vm_workstation_interface.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2013. The SimGrid Team. +/* Copyright (c) 2004-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -33,19 +33,19 @@ typedef WorkstationVMLmm *WorkstationVMLmmPtr; /** @ingroup SURF_callbacks * @brief Callbacks handler which emit the callbacks after WorkstationVM creation * - * @detail Callback functions have the following signature: `void(WorkstationVMPtr)` + * @details Callback functions have the following signature: `void(WorkstationVMPtr)` */ extern surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks; /** @ingroup SURF_callbacks * @brief Callbacks handler which emit the callbacks after WorkstationVM destruction * - * @detail Callback functions have the following signature: `void(WorkstationVMPtr)` + * @details Callback functions have the following signature: `void(WorkstationVMPtr)` */ extern surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks; /** @ingroup SURF_callbacks * @brief Callbacks handler which emit the callbacks after WorkstationVM State changed * - * @detail Callback functions have the following signature: `void(WorkstationVMActionPtr)` + * @details Callback functions have the following signature: `void(WorkstationVMActionPtr)` */ extern surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks; @@ -78,6 +78,11 @@ public: virtual void createResource(const char *name, void *ind_phys_workstation)=0; void adjustWeightOfDummyCpuActions() {}; + + typedef boost::intrusive::list > + vm_list_t; + static vm_list_t ws_vms; }; /************ @@ -88,7 +93,8 @@ public: * @brief SURF workstation VM interface class * @details A workstation VM represent an virtual machine */ -class WorkstationVM : public Workstation { +class WorkstationVM : public Workstation, + public boost::intrusive::list_base_hook<> { public: /** * @brief WorkstationVM consrtructor