- XBT_INFO("Host %s is already off",h->name().c_str());
- }
-}
-
-/**
- * \brief Internal function to destroy a SIMIX host.
- *
- * \param h the host to destroy (a sg_host_t)
- */
-void SIMIX_host_destroy(void *h)
-{
- smx_host_priv_t host = (smx_host_priv_t) h;
-
- xbt_assert((host != NULL), "Invalid parameters");
-
- /* Clean Simulator data */
- if (xbt_swag_size(host->process_list) != 0) {
- char *msg = xbt_strdup("Shutting down host, but it's not empty:");
- char *tmp;
- smx_process_t process = NULL;
-
- xbt_swag_foreach(process, host->process_list) {
- tmp = bprintf("%s\n\t%s", msg, process->name);
- free(msg);
- msg = tmp;
- }
- SIMIX_display_process_status();
- THROWF(arg_error, 0, "%s", msg);