X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dc3c3416c4cca30fef7c29422d45094687f59893..8ba65b25e98c8241e28fef5266584d47bdd4c0ed:/src/msg/msg_host.c diff --git a/src/msg/msg_host.c b/src/msg/msg_host.c index 5a0de0d55a..026eb74239 100644 --- a/src/msg/msg_host.c +++ b/src/msg/msg_host.c @@ -112,21 +112,30 @@ msg_host_t MSG_host_self(void) } /* - * \brief Destroys a host (internal call only) + * \brief Frees private data of a host (internal call only) */ -void __MSG_host_destroy(msg_host_priv_t host) { - +void __MSG_host_priv_free(msg_host_priv_t priv) +{ #ifdef MSG_USE_DEPRECATED if (msg_global->max_channel > 0) - free(host->mailboxes); + free(priv->mailboxes); #endif + free(priv); +} + +/* + * \brief Destroys a host (internal call only) + */ +void __MSG_host_destroy(msg_host_t host) +{ + const char *name = MSG_host_get_name(host); /* TODO: * What happens if VMs still remain on this host? * Revisit here after the surf layer gets stable. **/ - free(host); + xbt_lib_unset(host_lib, name, MSG_HOST_LEVEL, 1); } /** \ingroup m_host_management @@ -251,3 +260,25 @@ int MSG_host_is_avail(msg_host_t host) xbt_assert((host != NULL), "Invalid parameters (host is NULL)"); return (simcall_host_get_state(host)); } + +/** \ingroup m_host_management + * \brief Set the parameters of a given host + * + * \param host a host + * \param params a prameter object + */ +void MSG_host_set_params(msg_host_t ind_pm, ws_params_t params) +{ + simcall_host_set_params(ind_pm, params); +} + +/** \ingroup m_host_management + * \brief Get the parameters of a given host + * + * \param host a host + * \param params a prameter object + */ +void MSG_host_get_params(msg_host_t ind_pm, ws_params_t params) +{ + simcall_host_get_params(ind_pm, params); +}