X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1847d1441271d076b3de449c8853031ea208ce8f..fb87a25b953371e3523b597ee68427d4d590c05a:/src/msg/msg_host.cpp diff --git a/src/msg/msg_host.cpp b/src/msg/msg_host.cpp index e40c790240..3857879173 100644 --- a/src/msg/msg_host.cpp +++ b/src/msg/msg_host.cpp @@ -5,18 +5,13 @@ #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" -#include "src/msg/msg_private.h" +#include "src/msg/msg_private.hpp" #include "src/simix/ActorImpl.hpp" -#include "src/simix/smx_host_private.h" - +#include "src/simix/smx_host_private.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg); -simgrid::xbt::Extension simgrid::MsgHostExt::EXTENSION_ID; - -SG_BEGIN_DECL() - -int sg_storage_max_file_descriptors = 1024; +extern "C" { /** @addtogroup m_host_management * (#msg_host_t) and the functions for managing it. @@ -137,9 +132,8 @@ int MSG_host_get_core_number(msg_host_t host) { void MSG_host_get_process_list(msg_host_t host, xbt_dynar_t whereto) { xbt_assert((host != nullptr), "Invalid parameters"); - smx_actor_t actor = NULL; - xbt_swag_foreach(actor, host->extension()->process_list) { - msg_process_t p = actor->ciface(); + for (auto& actor : host->extension()->process_list) { + msg_process_t p = actor.ciface(); xbt_dynar_push(whereto, &p); } } @@ -253,19 +247,4 @@ xbt_dynar_t MSG_host_get_attached_storage_list(msg_host_t host) return sg_host_get_attached_storage_list(host); } -/** \ingroup m_host_management - * \brief Return the content of mounted storages on an host. - * \param host a host - * \return a dict containing content (as a dict) of all storages mounted on the host - */ -xbt_dict_t MSG_host_get_storage_content(msg_host_t host) -{ - xbt_assert((host != nullptr), "Invalid parameters"); - xbt_dict_t contents = xbt_dict_new_homogeneous(nullptr); - for (auto const& elm : host->getMountedStorages()) - xbt_dict_set(contents, elm.first.c_str(), MSG_storage_get_content(elm.second), nullptr); - - return contents; } - -SG_END_DECL()