Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case some resource::Action fields and cleanups
[simgrid.git] / src / surf / storage_n11.cpp
index 10fac18..1dcce83 100644 (file)
@@ -4,10 +4,11 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "storage_n11.hpp"
+#include "simgrid/kernel/routing/NetPoint.hpp"
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
+#include "src/surf/xml/platf.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
-#include "src/kernel/routing/NetPoint.hpp"
 #include "xbt/utility.hpp"
 #include <cmath> /*ceil*/
 
@@ -60,7 +61,7 @@ StorageImpl* StorageN11Model::createStorage(std::string id, std::string type_id,
                                            "property Bwrite, storage", type_id.c_str());
 
   StorageImpl* storage =
-      new StorageN11(this, id, maxminSystem_, Bread, Bwrite, type_id, content_name, storage_type->size, attach);
+      new StorageN11(this, id, maxmin_system_, Bread, Bwrite, type_id, content_name, storage_type->size, attach);
   storageCreatedCallbacks(storage);
 
   XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tBread '%f'\n", id.c_str(), type_id.c_str(),
@@ -95,8 +96,8 @@ void StorageN11Model::updateActionsState(double /*now*/, double delta)
  * Resource *
  ************/
 
-StorageN11::StorageN11(StorageModel* model, std::string name, lmm_system_t maxminSystem, double bread, double bwrite,
-                       std::string type_id, std::string content_name, sg_size_t size, std::string attach)
+StorageN11::StorageN11(StorageModel* model, std::string name, kernel::lmm::System* maxminSystem, double bread,
+                       double bwrite, std::string type_id, std::string content_name, sg_size_t size, std::string attach)
     : StorageImpl(model, name, maxminSystem, bread, bwrite, type_id, content_name, size, attach)
 {
   XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
@@ -142,8 +143,8 @@ int StorageN11Action::unref()
 {
   refcount_--;
   if (not refcount_) {
-    if (stateSetHook_.is_linked())
-      simgrid::xbt::intrusive_erase(*stateSet_, *this);
+    if (state_set_hook_.is_linked())
+      simgrid::xbt::intrusive_erase(*state_set_, *this);
     if (getVariable())
       getModel()->getMaxminSystem()->variable_free(getVariable());
     xbt_free(getCategory());
@@ -155,7 +156,7 @@ int StorageN11Action::unref()
 
 void StorageN11Action::cancel()
 {
-  setState(Action::State::failed);
+  set_state(Action::State::failed);
 }
 
 void StorageN11Action::suspend()
@@ -187,6 +188,9 @@ void StorageN11Action::setSharingWeight(double /*priority*/)
 {
   THROW_UNIMPLEMENTED;
 }
-
+void StorageN11Action::updateRemainingLazy(double /*now*/)
+{
+  THROW_IMPOSSIBLE;
+}
 }
 }