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
Split the behavior of ActorImpl::create
[simgrid.git]
/
src
/
s4u
/
s4u_Actor.cpp
diff --git
a/src/s4u/s4u_Actor.cpp
b/src/s4u/s4u_Actor.cpp
index
ed619e0
..
1d719e0
100644
(file)
--- a/
src/s4u/s4u_Actor.cpp
+++ b/
src/s4u/s4u_Actor.cpp
@@
-42,9
+42,12
@@
ActorPtr Actor::self()
ActorPtr Actor::create(std::string name, s4u::Host* host, std::function<void()> code)
{
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 =
- simcall_process_create(std::move(name), std::move(code), nullptr, host, nullptr);
- return actor->iface();
+ simgrid::simix::simcall([self, name, host, code] { return self->init(std::move(name), host)->start(code); });
+
+ return actor->ciface();
}
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)