Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further ignorable cleanups
[simgrid.git] / src / surf / HostImpl.cpp
index 3176374..c425691 100644 (file)
@@ -29,10 +29,11 @@ simgrid::xbt::Extension<simgrid::s4u::Host, HostImpl> HostImpl::EXTENSION_ID;
 /*********
  * Model *
  *********/
-HostImpl *HostModel::createHost(const char *name, kernel::routing::NetCard *netElm, Cpu *cpu){
-  xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
-
+HostImpl* HostModel::createHost(const char* name, Cpu* cpu, kernel::routing::NetCard* netcard, xbt_dynar_t storageList)
+{
   HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
+  xbt_lib_set(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL, (void*)storageList);
+
   XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->storage_));
   return host;
 }
@@ -67,11 +68,8 @@ void HostModel::adjustWeightOfDummyCpuActions()
   }
 }
 
-Action *HostModel::executeParallelTask(int host_nb,
-    sg_host_t *host_list,
-    double *flops_amount,
-    double *bytes_amount,
-    double rate)
+Action* HostModel::executeParallelTask(int host_nb, simgrid::s4u::Host** host_list, double* flops_amount,
+                                       double* bytes_amount, double rate)
 {
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
   Action *action =nullptr;