From: SUTER Frederic Date: Thu, 29 Apr 2021 14:01:36 +0000 (+0200) Subject: do not throw signal from sg_platf X-Git-Tag: v3.28~394 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fee678043c1ace05bae8ef3489bbbef2235dc596 do not throw signal from sg_platf --- diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index 036051f9f8..ca5ae92149 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -90,6 +90,9 @@ NetZoneImpl::NetZoneImpl(const std::string& name) : piface_(this), name_(name) "Refusing to create a second NetZone called '%s'.", get_cname()); netpoint_ = new NetPoint(name_, NetPoint::Type::NetZone); XBT_DEBUG("NetZone '%s' created with the id '%u'", get_cname(), netpoint_->id()); + _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::NetZone::on_creation(piface_); // notify the signal } NetZoneImpl::~NetZoneImpl() diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 992fb55cd7..24e7ab7b7d 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -517,20 +517,9 @@ sg_platf_create_zone(const simgrid::kernel::routing::ZoneCreationArgs* zone) */ simgrid::kernel::routing::NetZoneImpl* sg_platf_new_Zone_begin(const simgrid::kernel::routing::ZoneCreationArgs* zone) { - /* First create the zone. - * This order is important to assure that root netzone is set when models are setting - * the default mode for each resource (CPU, network, etc) - */ - auto* new_zone = sg_platf_create_zone(zone); + current_routing = sg_platf_create_zone(zone); - _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 */ - - /* set the new current component of the tree */ - current_routing = new_zone; - simgrid::s4u::NetZone::on_creation(*new_zone->get_iface()); // notify the signal - - return new_zone; + return current_routing; } void sg_platf_new_Zone_set_properties(const std::unordered_map& props)