X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cb305a8cc20cc267f909dca81b06a7036f3bc639..c5d588d76539d285fb67bef1ab477191622b94a9:/src/simix/simcalls.py diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index fb346f8d8f..e2e93e34b1 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -159,7 +159,7 @@ class Simcall(object): res.append(' if (false) /* Go to that function to follow the code flow through the simcall barrier */') if self.need_handler: res.append(' simcall_HANDLER_%s(%s);' % (self.name, - ', '.join(["&SIMIX_process_self()->simcall_"] + [arg.name for arg in self.args]))) + ', '.join(["&simgrid::kernel::actor::ActorImpl::self()->simcall_"] + [arg.name for arg in self.args]))) else: res.append(' SIMIX_%s(%s);' % (self.name, ', '.join(arg.name for arg in self.args))) @@ -307,7 +307,7 @@ if __name__ == '__main__': fd = header("popping_generated.cpp") - fd.write('#include "smx_private.hpp"\n') + fd.write('#include \n') fd.write('#include \n') fd.write('#include \n') fd.write('#if SIMGRID_HAVE_MC\n') @@ -315,6 +315,7 @@ if __name__ == '__main__': fd.write('#endif\n') fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\n') fd.write('#include "src/kernel/actor/SimcallObserver.hpp"\n') + fd.write('#include "src/kernel/context/Context.hpp"\n') fd.write('\n') fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n') @@ -362,7 +363,8 @@ if __name__ == '__main__': # popping_bodies.cpp # fd = header('popping_bodies.cpp') - fd.write('#include "smx_private.hpp"\n') + fd.write('#include "src/kernel/actor/ActorImpl.hpp"\n') + fd.write('#include "src/kernel/EngineImpl.hpp"\n') fd.write('#include "src/mc/mc_forward.hpp"\n') fd.write('#include "xbt/ex.h"\n') fd.write('#include \n') @@ -378,9 +380,9 @@ using simgrid::simix::Simcall; template inline static R simcall(Simcall call, T const&... t) { - smx_actor_t self = SIMIX_process_self(); + auto self = simgrid::kernel::actor::ActorImpl::self(); simgrid::simix::marshal(&self->simcall_, call, t...); - if (not simix_global->is_maestro(self)) { + if (not simgrid::kernel::EngineImpl::get_instance()->is_maestro(self)) { XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), SIMIX_simcall_name(self->simcall_)); self->yield(); } else {