Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this is C++
[simgrid.git] / src / surf / cpu_ti.cpp
index 6ea0152..d6a976b 100644 (file)
@@ -502,7 +502,7 @@ void CpuTiModel::addTraces()
 /* connect all traces relative to hosts */
   xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) {
     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
-    CpuTi *cpu = static_cast<CpuTi*>(sg_host_surfcpu(sg_host_by_name(elm)));
+    CpuTi *cpu = static_cast<CpuTi*>(sg_host_by_name(elm)->p_cpu);
 
     xbt_assert(cpu, "Host %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -518,7 +518,7 @@ void CpuTiModel::addTraces()
 
   xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) {
     tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name);
-    CpuTi *cpu = static_cast<CpuTi*>(sg_host_surfcpu(sg_host_by_name(elm)));
+    CpuTi *cpu = static_cast<CpuTi*>(sg_host_by_name(elm)->p_cpu);
 
     xbt_assert(cpu, "Host %s undefined", elm);
     xbt_assert(trace, "Trace %s undefined", trace_name);
@@ -858,8 +858,6 @@ CpuTiAction::CpuTiAction(CpuTiModel *model_, double cost, bool failed,
                                 CpuTi *cpu)
  : CpuAction(model_, cost, failed)
 {
-  m_suspended = 0;        /* Should be useless because of the
-                                calloc but it seems to help valgrind... */
   p_cpu = cpu;
   m_indexHeap = -1;
   p_cpu->modified(true);