Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use member hooks for CpuTi
[simgrid.git] / src / surf / cpu_ti.cpp
index 160fa74..21f92c5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -404,7 +404,7 @@ void surf_cpu_model_init_ti()
   xbt_dynar_push(model_list, &model_vm);
 }
 
-CpuTiModel::CpuTiModel() : CpuModel("cpu_ti")
+CpuTiModel::CpuTiModel() : CpuModel()
 {
   p_runningActionSetThatDoesNotNeedBeingChecked = new ActionList();
 
@@ -836,11 +836,11 @@ CpuAction *CpuTi::sleep(double duration)
 void CpuTi::modified(bool modified){
   CpuTiList *modifiedCpu = static_cast<CpuTiModel*>(getModel())->p_modifiedCpu;
   if (modified) {
-    if (!is_linked()) {
+    if (!cpu_ti_hook.is_linked()) {
       modifiedCpu->push_back(*this);
     }
   } else {
-    if (is_linked()) {
+    if (cpu_ti_hook.is_linked()) {
       modifiedCpu->erase(modifiedCpu->iterator_to(*this));
     }
   }
@@ -884,7 +884,7 @@ int CpuTiAction::unref()
        if (actionHook::is_linked())
          getStateSet()->erase(getStateSet()->iterator_to(*this));
     /* remove from action_set */
-    if (actionTiHook::is_linked())
+    if (action_ti_hook.is_linked())
       p_cpu->p_actionSet->erase(p_cpu->p_actionSet->iterator_to(*this));
     /* remove from heap */
     xbt_heap_remove(static_cast<CpuTiModel*>(getModel())->p_tiActionHeap, this->m_indexHeap);
@@ -903,11 +903,6 @@ void CpuTiAction::cancel()
   return;
 }
 
-void CpuTiAction::recycle()
-{
-  DIE_IMPOSSIBLE;
-}
-
 void CpuTiAction::suspend()
 {
   XBT_IN("(%p)", this);