X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3cb42252ecc199a0a11dd38e1b8fd60ff625a168..10675785aab38470f386150c08e4c3ab8fcc8a71:/src/simix/simcalls.py diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index bd2789e634..fb346f8d8f 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -314,7 +314,7 @@ if __name__ == '__main__': fd.write('#include "src/mc/mc_forward.hpp"\n') fd.write('#endif\n') fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\n') - fd.write('#include "src/mc/checker/SimcallInspector.hpp"\n') + fd.write('#include "src/kernel/actor/SimcallObserver.hpp"\n') fd.write('\n') fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n') @@ -334,12 +334,12 @@ if __name__ == '__main__': fd.write(' *\n') fd.write(' * This function is generated from src/simix/simcalls.in\n') fd.write(' */\n') - fd.write('void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered_)\n') + fd.write('void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered)\n') fd.write('{\n') - fd.write(' XBT_DEBUG("Handling simcall %p: %s", &simcall_, SIMIX_simcall_name(simcall_.call_));\n') - fd.write(' SIMCALL_SET_MC_VALUE(simcall_, times_considered_);\n') - fd.write(' if (simcall_.inspector_ != nullptr)\n') - fd.write(' simcall_.inspector_->prepare(times_considered_);\n') + fd.write(' XBT_DEBUG("Handling simcall %p: %s", &simcall_, SIMIX_simcall_name(simcall_));\n') + fd.write(' simcall_.mc_value_ = times_considered;\n') + fd.write(' if (simcall_.observer_ != nullptr)\n') + fd.write(' simcall_.observer_->prepare(times_considered);\n') fd.write(' if (context_->wannadie())\n') fd.write(' return;\n') @@ -380,9 +380,8 @@ inline static R simcall(Simcall call, T const&... t) { smx_actor_t self = SIMIX_process_self(); simgrid::simix::marshal(&self->simcall_, call, t...); - if (self != simix_global->maestro_) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->get_cname(), SIMIX_simcall_name(self->simcall_.call_), - (int)self->simcall_.call_); + if (not simix_global->is_maestro(self)) { + XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), SIMIX_simcall_name(self->simcall_)); self->yield(); } else { self->simcall_handle(0);