Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "cast once for all at surf level and not in the APIs"
[simgrid.git] / src / s4u / s4u_host.cpp
index 4d74e35..6c8a7ec 100644 (file)
@@ -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<ActorPtr>* whereto)
+{
+  smx_actor_t actor = NULL;
+  xbt_swag_foreach(actor, this->extension<simgrid::simix::Host>()->process_list)
+  {
+    whereto->push_back(actor->ciface());
+  }
+}
+
 /**
  * \brief Find a route toward another host
  *