Exemplo n.º 1
0
void simcall_call(smx_process_t process)
{
  if (process != simix_global->maestro_process) {
    XBT_DEBUG("Yield process '%s' on simcall %s (%d)", process->name,
              SIMIX_simcall_name(process->simcall.call), (int)process->simcall.call);
    SIMIX_process_yield(process);
  } else {
    SIMIX_simcall_handle(&process->simcall, 0);
  }
}
Exemplo n.º 2
0
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->name.c_str(),
              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);
}