#include "src/mc/mc_replay.h"
#include "src/mc/mc_client.h"
#include "src/simix/smx_private.hpp"
+#include "src/msg/msg_private.h"
#ifdef HAVE_SMPI
#include "src/smpi/private.h"
/* Unregister from the kill timer if any */
if (process->kill_timer != NULL)
- SIMIX_timer_remove(process->kill_timer);
+ SIMIX_timer_remove(process->kill_timer);
xbt_os_mutex_acquire(simix_global->mutex);
/* execute the on_exit functions */
SIMIX_process_on_exit_runall(arg);
/* Add the process to the list of process to restart, only if the host is down */
- if (arg->auto_restart && arg->host->isOff()) {
+ if (arg->auto_restart && arg->host->is_off()) {
SIMIX_host_add_auto_restart_process(arg->host,arg->name,arg->code, arg->data,
sg_host_get_name(arg->host),
SIMIX_timer_get_date(arg->kill_timer),
XBT_DEBUG("Start process %s on host '%s'", name, hostname);
- if (host->isOff()) {
+ if (host->is_off()) {
int i;
XBT_WARN("Cannot launch process '%s' on failed host '%s'", name,
hostname);
sg_host_get_name(process->host), kill_time);
process->kill_timer = SIMIX_timer_set(kill_time, kill_process, process);
}
+
+ /* Tracing the process creation */
+ TRACE_msg_process_create(process->name, process->pid, process->host);
}
return process;
}
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_process_execution_destroy(process->waiting_synchro);
+ SIMIX_execution_destroy(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_process_execution_cancel(process->waiting_synchro);
+ SIMIX_execution_cancel(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
} else {
xbt_fifo_push(sync_suspend->simcalls, simcall);
process->waiting_synchro = sync_suspend;
- SIMIX_host_execution_suspend(process->waiting_synchro);
+ SIMIX_execution_suspend(process->waiting_synchro);
}
/* If we are suspending ourselves, then just do not finish the simcall now */
}
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_host_execution_suspend(process->waiting_synchro);
+ SIMIX_execution_suspend(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
}
} else {
/* FIXME: computation size is zero. Is it okay that bound is zero ? */
- return SIMIX_process_execute(process, "suspend", 0.0, 1.0, 0.0, 0);
+ return SIMIX_execution_start(process, "suspend", 0.0, 1.0, 0.0, 0);
}
}
case SIMIX_SYNC_EXECUTE:
case SIMIX_SYNC_PARALLEL_EXECUTE:
- SIMIX_host_execution_resume(process->waiting_synchro);
+ SIMIX_execution_resume(process->waiting_synchro);
break;
case SIMIX_SYNC_COMMUNICATE:
smx_process_t process = SIMIX_process_self();
if (process == NULL || process == simix_global->maestro_process)
- return "";
+ return "maestro";
return SIMIX_process_get_name(process);
}
sg_host_t host = process->host;
/* check if the host is active */
- if (host->isOff()) {
+ if (host->is_off()) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
THROW_IMPOSSIBLE;
break;
}
- if (simcall->issuer->host->isOff()) {
+ if (simcall->issuer->host->is_off()) {
simcall->issuer->context->iwannadie = 1;
}
simcall_process_sleep__set__result(simcall, state);