git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6710
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
/* Simulator Data */
simdata->PID = msg_global->PID++;
simdata->waiting_action = NULL;
/* Simulator Data */
simdata->PID = msg_global->PID++;
simdata->waiting_action = NULL;
+ simdata->waiting_task = NULL;
simdata->m_host = host;
simdata->argc = argc;
simdata->argv = argv;
simdata->m_host = host;
simdata->argc = argc;
simdata->argv = argv;
DEBUG3("Killing %s(%d) on %s",
process->name, p_simdata->PID, p_simdata->m_host->name);
DEBUG3("Killing %s(%d) on %s",
process->name, p_simdata->PID, p_simdata->m_host->name);
- if (p_simdata->waiting_task) {
- DEBUG1("Canceling waiting task %s", p_simdata->waiting_task->name);
- if (p_simdata->waiting_task->simdata->compute) {
- SIMIX_action_cancel(p_simdata->waiting_task->simdata->compute);
- } else if (p_simdata->waiting_task->simdata->comm) {
+ if (p_simdata->waiting_task && p_simdata->waiting_task->simdata->comm) {
SIMIX_communication_cancel(p_simdata->waiting_task->simdata->comm);
SIMIX_communication_cancel(p_simdata->waiting_task->simdata->comm);
+
+ if (p_simdata->waiting_action) {
+ DEBUG1("Canceling waiting task %s",
+ SIMIX_action_get_name(p_simdata->waiting_action));
+ SIMIX_action_cancel(p_simdata->waiting_action);
+ }
+
xbt_fifo_remove(msg_global->process_list, process);
SIMIX_process_kill(process->simdata->s_process);
xbt_fifo_remove(msg_global->process_list, process);
SIMIX_process_kill(process->simdata->s_process);
}
*task = SIMIX_communication_get_data(comm);
}
*task = SIMIX_communication_get_data(comm);
/* If the sender didn't decremented the refcount so far then do it */
if (*task && (*task)->simdata->refcount > 1)
(*task)->simdata->refcount--;
/* If the sender didn't decremented the refcount so far then do it */
if (*task && (*task)->simdata->refcount > 1)
(*task)->simdata->refcount--;
msg_global->sent_msg++;
process->simdata->waiting_task = task;
msg_global->sent_msg++;
process->simdata->waiting_task = task;
/* Try to send it by calling SIMIX network layer */
TRY{
/* Kept for semantical compatibility with older implementation */
/* Try to send it by calling SIMIX network layer */
TRY{
/* Kept for semantical compatibility with older implementation */
}
process->simdata->waiting_task = NULL;
}
process->simdata->waiting_task = NULL;
/* If the receiver end didn't decremented the refcount so far then do it */
if (t_simdata->refcount > 1)
t_simdata->refcount--;
/* If the receiver end didn't decremented the refcount so far then do it */
if (t_simdata->refcount > 1)
t_simdata->refcount--;
m_host_t put_host; /* used for debugging purposes */
m_channel_t put_channel; /* used for debugging purposes */
smx_action_t waiting_action;
m_host_t put_host; /* used for debugging purposes */
m_channel_t put_channel; /* used for debugging purposes */
smx_action_t waiting_action;
int argc; /* arguments number if any */
char **argv; /* arguments table if any */
MSG_error_t last_errno; /* the last value returned by a MSG_function */
int argc; /* arguments number if any */
char **argv; /* arguments table if any */
MSG_error_t last_errno; /* the last value returned by a MSG_function */