simgrid::simix::simcall([this, autorestart]() { pimpl_->auto_restart = autorestart; });
}
-void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data)
+void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
{
simgrid::simix::simcall([this, fun, data] { SIMIX_process_on_exit(pimpl_, fun, data); });
}
simgrid::simix::simcall([&self] { SIMIX_process_killall(self); });
}
-std::map<std::string, std::string>* Actor::get_properties()
+std::unordered_map<std::string, std::string>* Actor::get_properties()
{
return simgrid::simix::simcall([this] { return this->pimpl_->get_properties(); });
}
simgrid::simix::simcall([process] { SIMIX_process_kill(process, process); });
}
-void on_exit(int_f_pvoid_pvoid_t fun, void* data)
-{
- SIMIX_process_self()->iface()->on_exit(fun, data);
-}
-
void on_exit(std::function<void(int, void*)> fun, void* data)
{
SIMIX_process_self()->iface()->on_exit(fun, data);
{
return is_suspended();
}
-void onExit /* deprecated */ (int_f_pvoid_pvoid_t fun, void* data)
+void on_exit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
+{
+ SIMIX_process_self()->iface()->on_exit([fun](int a, void* b) { fun((void*)(intptr_t)a, b); }, data);
+}
+void onExit(int_f_pvoid_pvoid_t fun, void* data) /* deprecated */
{
- on_exit(fun, data);
+ on_exit([fun](int a, void* b) { fun((void*)(intptr_t)a, b); }, data);
}
} // namespace this_actor
{
xbt_assert(actor != nullptr, "Invalid parameter: First argument must not be nullptr");
xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
- std::map<std::string, std::string>* props = actor->get_properties();
+ std::unordered_map<std::string, std::string>* props = actor->get_properties();
if (props == nullptr)
return nullptr;
- for (auto const& elm : *props) {
- xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()), nullptr);
+ for (auto const& kv : *props) {
+ xbt_dict_set(as_dict, kv.first.c_str(), xbt_strdup(kv.second.c_str()), nullptr);
}
return as_dict;
}