-#include "msg/msg_private.h" // MSG_host_priv_free. FIXME: killme
-#include "simdag/private.h" // __SD_workstation_destroy. FIXME: killme
-#include "simix/smx_host_private.h" // SIMIX_host_destroy. FIXME: killme
-#include "surf/cpu_interface.hpp"
-#include "surf/surf_routing.hpp"
-
-static XBT_INLINE void surf_cpu_free(void *r) {
- delete static_cast<CpuPtr>(r);
-}
-static XBT_INLINE void routing_asr_host_free(void *p) {
- delete static_cast<RoutingEdgePtr>(p);
-}
+void sg_host_init()
+{
+ MSG_HOST_LEVEL = simgrid::Host::extension_create([](void *p) {
+ __MSG_host_priv_free((msg_host_priv_t) p);
+ });