Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case some parts of kernel::resource::Cpu
[simgrid.git] / src / surf / sg_platf.cpp
index fd639aa..4ecc5c4 100644 (file)
@@ -84,7 +84,7 @@ void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* args)
   if (args->speed_trace)
     host->pimpl_cpu->set_speed_trace(args->speed_trace);
   if (args->pstate != 0)
-    host->pimpl_cpu->setPState(args->pstate);
+    host->pimpl_cpu->set_pstate(args->pstate);
   if (args->coord && strcmp(args->coord, ""))
     new simgrid::kernel::routing::vivaldi::Coords(host->pimpl_netpoint, args->coord);
 }
@@ -96,7 +96,7 @@ simgrid::kernel::routing::NetPoint* sg_platf_new_router(std::string name, const
 
   if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
     current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::base;
-  xbt_assert(nullptr == simgrid::s4u::Engine::get_instance()->getNetpointByNameOrNull(name),
+  xbt_assert(nullptr == simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(name),
              "Refusing to create a router named '%s': this name already describes a node.", name.c_str());
 
   simgrid::kernel::routing::NetPoint* netpoint =
@@ -559,7 +559,6 @@ simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCre
 
   _sg_cfg_init_status = 2; /* HACK: direct access to the global controlling the level of configuration to prevent
                             * any further config now that we created some real content */
-  simgrid::s4u::on_config_in_platform_done();
 
   /* search the routing model */
   simgrid::kernel::routing::NetZoneImpl* new_zone = nullptr;
@@ -600,10 +599,7 @@ simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCre
   }
 
   if (current_routing == nullptr) { /* it is the first one */
-    xbt_assert(simgrid::s4u::Engine::get_instance()->pimpl->netzone_root_ == nullptr,
-               "All defined components must belong to a networking zone.");
-    simgrid::s4u::Engine::get_instance()->pimpl->netzone_root_ = new_zone;
-
+    simgrid::s4u::Engine::get_instance()->set_netzone_root(new_zone);
   } else {
     /* set the father behavior */
     if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)