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,
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,
else:
res.append(' SIMIX_%s(%s);' % (self.name,
', '.join(arg.name for arg in self.args)))
else:
res.append(' SIMIX_%s(%s);' % (self.name,
', '.join(arg.name for arg in self.args)))
fd.write('#include <simgrid/host.h>\n')
fd.write('#include <xbt/base.h>\n')
fd.write('#if SIMGRID_HAVE_MC\n')
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 <simgrid/host.h>\n')
fd.write('#include <xbt/base.h>\n')
fd.write('#if SIMGRID_HAVE_MC\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#endif\n')
fd.write('#include "src/kernel/activity/ConditionVariableImpl.hpp"\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(' simcall_.mc_value_ = times_considered;\n')
fd.write(' if (simcall_.observer_ != nullptr)\n')
fd.write(' simcall_.observer_->prepare(times_considered);\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#include "xbt/ex.h"\n')
fd.write('#include <functional>\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#include "xbt/ex.h"\n')
fd.write('#include <functional>\n')
template<class R, class... T>
inline static R simcall(Simcall call, T const&... t)
{
template<class R, class... T>
inline static R simcall(Simcall call, T const&... 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 simgrid::kernel::EngineImpl::get_instance()->is_maestro(self)) {
+ XBT_DEBUG("Yield process '%s' on simcall %s", self->get_cname(), SIMIX_simcall_name(self->simcall_));