// ***** Actor creation *****
ActorPtr Actor::self()
{
- smx_context_t self_context = kernel::context::Context::self();
+ kernel::context::Context* self_context = kernel::context::Context::self();
if (self_context == nullptr)
return ActorPtr();
on_exit([fun, data](bool exit) { fun(exit, data); });
}
-void Actor::on_exit(const std::function<void(bool /*failed*/)>& fun)
+void Actor::on_exit(const std::function<void(bool /*failed*/)>& fun) const
{
simix::simcall(
[this, fun] { SIMIX_process_on_exit(pimpl_, [fun](int a, void* /*data*/) { fun(a != 0); }, nullptr); });
s4u::Actor::on_migration_end(this);
}
-s4u::Host* Actor::get_host()
+s4u::Host* Actor::get_host() const
{
return this->pimpl_->get_host();
}
});
}
-kernel::actor::ActorImpl* Actor::get_impl()
-{
- return pimpl_;
-}
-
// ***** Static functions *****
ActorPtr Actor::by_pid(aid_t pid)