Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding test for SURF concurrency feature
[simgrid.git] / src / surf / cpu_ti.cpp
index d422089..d309542 100644 (file)
@@ -614,8 +614,7 @@ void CpuTi::updateState(tmgr_trace_iterator_t event_type,
 
     p_availTrace = trace;
 
-    if (tmgr_trace_event_free(event_type))
-      p_speedEvent = NULL;
+    tmgr_trace_event_unref(&p_speedEvent);
 
   } else if (event_type == p_stateEvent) {
     if (value > 0) {
@@ -643,14 +642,10 @@ void CpuTi::updateState(tmgr_trace_iterator_t event_type,
         }
       }
     }
-    if (tmgr_trace_event_free(event_type))
-      p_stateEvent = NULL;
+    tmgr_trace_event_unref(&p_stateEvent);
   } else {
-    XBT_CRITICAL("Unknown event ! \n");
-    xbt_abort();
+    xbt_die("Unknown event!\n");
   }
-
-  return;
 }
 
 void CpuTi::updateActionsFinishTime(double now)
@@ -791,7 +786,7 @@ void CpuTi::updateRemainingAmount(double now)
   m_lastUpdate = now;
 }
 
-CpuAction *CpuTi::execute(double size)
+CpuAction *CpuTi::execution_start(double size)
 {
   XBT_IN("(%s,%g)", getName(), size);
   CpuTiAction *action = new CpuTiAction(static_cast<CpuTiModel*>(getModel()), size, isOff(), this);