- #
- # popping_bodies.cpp
- #
- fd = header('popping_bodies.cpp')
- fd.write('#include "smx_private.hpp"\n')
- fd.write('#include "src/mc/mc_forward.hpp"\n')
- fd.write('#include "src/simix/smx_synchro_private.hpp"\n')
- fd.write('#include "xbt/ex.h"\n')
- fd.write('#include <functional>\n')
- fd.write('#include <simgrid/simix.hpp>\n')
-
- fd.write("/** @cond */ // Please Doxygen, don't look at this\n")
- fd.write('''
-template<class R, class... T>
-inline static R simcall(e_smx_simcall_t call, T const&... t)
-{
- smx_actor_t self = SIMIX_process_self();
- simgrid::simix::marshal(&self->simcall, call, t...);
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->get_cname(), SIMIX_simcall_name(self->simcall.call),
- (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return simgrid::simix::unmarshal<R>(self->simcall.result);
-}
-''')
- handle(fd, Simcall.body, simcalls, simcalls_dict)
- fd.write(" /** @endcond */\n");
- fd.close()