X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/347f9a2ca55bffc88bf965952b9be3a15535e908..8dadf249202bc6834a1d680b8ec8446937b3c4a6:/src/simgrid/host.cpp diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index f332bb75e6..fdcc13233e 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -79,7 +79,6 @@ void sg_host_init() SD_HOST_LEVEL = simgrid::Host::extension_create(__SD_workstation_destroy); SIMIX_HOST_LEVEL = simgrid::Host::extension_create(SIMIX_host_destroy); USER_HOST_LEVEL = simgrid::Host::extension_create(NULL); - simgrid::surf::Cpu::classInit(); } // ========== User data Layer ========== @@ -127,13 +126,13 @@ void sg_host_simix_destroy(sg_host_t host) { // ========== SURF CPU ============ surf_cpu_t sg_host_surfcpu(sg_host_t host) { - return host->extension(); + return host->p_cpu; } void sg_host_surfcpu_set(sg_host_t host, surf_cpu_t cpu) { - host->extension_set(simgrid::surf::Cpu::EXTENSION_ID, cpu); // FIXME: use the typesafe version + host->p_cpu = cpu; } void sg_host_surfcpu_destroy(sg_host_t host) { - host->extension_set(nullptr); + host->p_cpu = nullptr; } // ========== RoutingEdge ============ surf_RoutingEdge *sg_host_edge(sg_host_t host) {