X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c630e592bf768a21557ad91fd626ea5943449152..1b94b2100679d5b4355fccb6d22927efc12ca5bc:/src/s4u/s4u_Actor.cpp diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index f31600a392..d4ecc67bea 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -41,23 +41,24 @@ ActorPtr Actor::self() } ActorPtr Actor::init(std::string name, s4u::Host* host) { - return SIMIX_process_self()->init(std::move(name), host)->iface(); + smx_actor_t self = SIMIX_process_self(); + simgrid::kernel::actor::ActorImpl* actor = + simgrid::simix::simcall([self, name, host] { return self->init(std::move(name), host).get(); }); + return actor->ciface(); } ActorPtr Actor::start(std::function code) { - simgrid::simix::simcall([this, code] { return this->get_impl()->start(code); }); + simgrid::simix::simcall([this, code] { pimpl_->start(code); }); return this; } ActorPtr Actor::create(std::string name, s4u::Host* host, std::function code) { - smx_actor_t self = SIMIX_process_self(); - simgrid::kernel::actor::ActorImpl* actor = - simgrid::simix::simcall([self, name, host, code] { return self->init(std::move(name), host)->start(code); }); + simcall_process_create(std::move(name), std::move(code), nullptr, host, nullptr); - return actor->ciface(); + return actor->iface(); } ActorPtr Actor::create(std::string name, s4u::Host* host, const std::string& function, std::vector args)