A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
s4u
/
s4u_Engine.cpp
diff --git
a/src/s4u/s4u_Engine.cpp
b/src/s4u/s4u_Engine.cpp
index
352e4eb
..
ab520f2
100644
(file)
--- a/
src/s4u/s4u_Engine.cpp
+++ b/
src/s4u/s4u_Engine.cpp
@@
-193,6
+193,12
@@
s4u::NetZone* Engine::get_netzone_root()
{
return pimpl->netzone_root_;
}
+/** @brief Set the root netzone, containing all others. Once set, it cannot be changed. */
+void Engine::set_netzone_root(s4u::NetZone* netzone)
+{
+ xbt_assert(pimpl->netzone_root_ == nullptr, "The root NetZone cannot be changed once set");
+ pimpl->netzone_root_ = static_cast<kernel::routing::NetZoneImpl*>(netzone);
+}
static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char* name)
{
@@
-238,14
+244,14
@@
std::vector<simgrid::kernel::routing::NetPoint*> Engine::get_all_netpoints()
/** @brief Register a new netpoint to the system */
void Engine::netpoint_register(simgrid::kernel::routing::NetPoint* point)
{
- // simgrid::simix::
kernelImmediate
([&]{ FIXME: this segfaults in set_thread
+ // simgrid::simix::
simcall
([&]{ FIXME: this segfaults in set_thread
pimpl->netpoints_[point->get_name()] = point;
// });
}
/** @brief Unregister a given netpoint */
void Engine::netpoint_unregister(simgrid::kernel::routing::NetPoint* point)
{
- simgrid::simix::
kernelImmediate
([this, point] {
+ simgrid::simix::
simcall
([this, point] {
pimpl->netpoints_.erase(point->get_name());
delete point;
});