Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Link: Non-linear constraints
[simgrid.git] / src / s4u / s4u_Link.cpp
index 2e2a3ba..c4c179c 100644 (file)
@@ -102,13 +102,13 @@ Link* Link::set_bandwidth(double value)
   return this;
 }
 
-Link* Link::set_sharing_policy(Link::SharingPolicy policy)
+Link* Link::set_sharing_policy(Link::SharingPolicy policy, const NonLinearResourceCb& cb)
 {
   if (policy == SharingPolicy::SPLITDUPLEX)
     throw std::invalid_argument(std::string("Impossible to set split-duplex for the link: ") + get_name() +
                                 std::string(". Use NetZone::create_split_duplex_link."));
 
-  kernel::actor::simcall([this, policy] { pimpl_->set_sharing_policy(policy); });
+  kernel::actor::simcall([this, policy, &cb] { pimpl_->set_sharing_policy(policy, cb); });
   return this;
 }
 Link::SharingPolicy Link::get_sharing_policy() const