X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7fc148e54129356298bb2708d9681b66d1d36330..212f410b75a1c5886c7b831adef56cde7e338d3e:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 4d74e354f3..c36d9ec715 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -9,9 +9,9 @@ #include -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" -#include "simgrid/s4u/storage.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" +#include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/msg/msg_private.h" @@ -69,7 +69,7 @@ Host::~Host() */ void Host::destroy() { - if (!currentlyDestroying_) { + if (not currentlyDestroying_) { currentlyDestroying_ = true; onDestruction(*this); host_list.erase(name_); @@ -127,6 +127,20 @@ int Host::pstatesCount() const { return this->pimpl_cpu->getNbPStates(); } +/** + * \brief Return the list of actors attached to an host. + * + * \param whereto a vector in which we should push actors living on that host + */ +void Host::actorList(std::vector* whereto) +{ + smx_actor_t actor = NULL; + xbt_swag_foreach(actor, this->extension()->process_list) + { + whereto->push_back(actor->ciface()); + } +} + /** * \brief Find a route toward another host *