X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a2f695076e4f11e4033d66ad57e2274505f60d1c..416eebc1f127894d201c28c05c4900eb660d657c:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 1a08d36e34..7dc2d1a599 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -30,20 +30,9 @@ surf_callback(void, CpuPtr) cpuDestructedCallbacks; surf_callback(void, CpuPtr, e_surf_resource_state_t, e_surf_resource_state_t) cpuStateChangedCallbacks; surf_callback(void, CpuActionPtr, e_surf_action_state_t, e_surf_action_state_t) cpuActionStateChangedCallbacks; -void parse_cpu_init(sg_platf_host_cbarg_t host){ - surf_cpu_model_pm->parseInit(host); -} - -void add_traces_cpu(){ - surf_cpu_model_pm->addTraces(); -} - -/********* - * Model * - *********/ -void CpuModel::parseInit(sg_platf_host_cbarg_t host) -{ - createResource(host->id, +void cpu_parse_init(sg_platf_host_cbarg_t host){ + surf_cpu_model_pm->createCpu( + host->id, host->power_peak, host->pstate, host->power_scale, @@ -54,12 +43,19 @@ void CpuModel::parseInit(sg_platf_host_cbarg_t host) host->properties); } +void cpu_add_traces(){ + surf_cpu_model_pm->addTraces(); +} + +/********* + * Model * + *********/ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) { CpuActionPtr action; while ((xbt_heap_size(getActionHeap()) > 0) && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) { - action = static_cast(static_cast(xbt_heap_pop(getActionHeap()))); + action = static_cast(xbt_heap_pop(getActionHeap())); XBT_CDEBUG(surf_kernel, "Something happened to action %p", action); #ifdef HAVE_TRACING if (TRACE_is_enabled()) {