Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplify the API between Engine and EngineImpl when registering functions
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 4 Feb 2020 16:36:28 +0000 (17:36 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 4 Feb 2020 16:50:59 +0000 (17:50 +0100)
commitc97656604936a7d3000ee3c98e0926b80f6f2150
treee186d708c32f6671e8a9a8a8f0d7dfb749ab93c5
parentd58a00ab3206780f2a75e495e76613aa706f0ba4
Simplify the API between Engine and EngineImpl when registering functions

Engine is providing several prototypes to serve S4U, SMPI, MSG and all
friends. It was providing all these prototypes to EngineImpl which was
in charge of building the ActorCodeFactory, ie the lambda in charge of
building a lambda code that the actor can execute.

Now, Engine is building the ActorCodeFactory and EngineImpl is only
providing one prototype.

While I was at it, I moved the registered functions and default
function from simix_global (which should die at some point) to the
EngineImpl, and killed a SIMIX function defined in Context.hpp (yuk).

I also made ActorCodeFactory a public type in forward.h, which
requires to include <vector> in forward.h. I guess we can live with it.

I also introduced an EngineImpl::get_instance() even if that require a
circular dependency between Engine and EngineImpl. I did not find a
better solution.

Now, MSG can directly build its ActorCodeFactory and pass it to the
Engine. It fixes the casting issues we had on user code, and remove
the need for an extra flag to calm the compiler about this ugly cast.
19 files changed:
include/simgrid/forward.h
include/simgrid/s4u/Engine.hpp
include/simgrid/simix.hpp
src/bindings/java/jmsg_process.cpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/actor/ActorImpl.cpp
src/kernel/actor/ActorImpl.hpp
src/kernel/context/Context.hpp
src/msg/msg_legacy.cpp
src/msg/msg_process.cpp
src/s4u/s4u_Actor.cpp
src/s4u/s4u_Engine.cpp
src/simix/smx_deployment.cpp
src/simix/smx_global.cpp
src/simix/smx_private.hpp
src/smpi/internals/smpi_global.cpp
src/surf/sg_platf.cpp
tools/cmake/MakeLib.cmake