X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b2018541e799348bb66131a39284ea8d4cfc49f9..ea74f5d95928a521a588737e81f1de94eef25d19:/src/simix/simcalls.py diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index a98b947812..06b5b401a7 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. +# Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the terms of the license (GNU LGPL) which comes with this package. @@ -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))) @@ -235,7 +235,7 @@ def header(name): fd.write('/* DO NOT EVER CHANGE THIS FILE */\n') fd.write('/* */\n') fd.write('/* change simcalls specification in src/simix/simcalls.in */\n') - fd.write('/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */\n') + fd.write('/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */\n') fd.write('/**********************************************************************/\n\n') fd.write('/*\n') fd.write(' * Note that the name comes from http://en.wikipedia.org/wiki/Popping\n') @@ -307,6 +307,7 @@ if __name__ == '__main__': fd = header("popping_generated.cpp") + fd.write('#include \n') fd.write('#include \n') fd.write('#include \n') fd.write('#if SIMGRID_HAVE_MC\n') @@ -362,8 +363,9 @@ if __name__ == '__main__': # popping_bodies.cpp # fd = header('popping_bodies.cpp') - fd.write('#include "src/mc/mc_forward.hpp"\n') fd.write('#include "src/kernel/EngineImpl.hpp"\n') + fd.write('#include "src/kernel/actor/ActorImpl.hpp"\n') + fd.write('#include "src/mc/mc_forward.hpp"\n') fd.write('#include "xbt/ex.h"\n') fd.write('#include \n') fd.write('#include \n') @@ -378,7 +380,7 @@ 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 simgrid::kernel::EngineImpl::get_instance()->is_maestro(self)) { XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), SIMIX_simcall_name(self->simcall_));