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
Fix null pointer dereference.
[simgrid.git]
/
src
/
s4u
/
s4u_Actor.cpp
diff --git
a/src/s4u/s4u_Actor.cpp
b/src/s4u/s4u_Actor.cpp
index
f31600a
..
d4ecc67
100644
(file)
--- 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)
{
}
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<void()> code)
{
}
ActorPtr Actor::start(std::function<void()> 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<void()> code)
{
return this;
}
ActorPtr Actor::create(std::string name, s4u::Host* host, std::function<void()> code)
{
- smx_actor_t self = SIMIX_process_self();
-
simgrid::kernel::actor::ActorImpl* actor =
simgrid::kernel::actor::ActorImpl* actor =
- sim
grid::simix::simcall([self, name, host, code] { return self->init(std::move(name), host)->start(code); }
);
+ sim
call_process_create(std::move(name), std::move(code), nullptr, host, nullptr
);
- return actor->
c
iface();
+ return actor->iface();
}
ActorPtr Actor::create(std::string name, s4u::Host* host, const std::string& function, std::vector<std::string> args)
}
ActorPtr Actor::create(std::string name, s4u::Host* host, const std::string& function, std::vector<std::string> args)