Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ok, Paje is in a sorry state, but this leads to segfaults so kill it
[simgrid.git] / src / msg / gos.c
index 379ca36..aa21ba2 100644 (file)
@@ -62,6 +62,7 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task,
                                                       
     if(max_duration>0) {
       if(!first_time) {
+       PAJE_PROCESS_POP_STATE(process);
        MSG_RETURN(MSG_TRANSFER_FAILURE);
       }
     }
@@ -456,6 +457,8 @@ MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest,
   while(!(task_simdata->comm)) {
     if(max_duration>0) {
       if(!first_time) {
+       PAJE_PROCESS_POP_STATE(process);
+       PAJE_COMM_STOP(process,task,channel);
        MSG_RETURN(MSG_TRANSFER_FAILURE);
       }
     }
@@ -471,6 +474,8 @@ MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest,
        get_state(local_host->simdata->host) == SURF_CPU_OFF) {
       xbt_fifo_remove(((simdata_host_t) remote_host->simdata)->mbox[channel],
                      task);
+      PAJE_PROCESS_POP_STATE(process);
+      PAJE_COMM_STOP(process,task,channel);
       MSG_task_destroy(task);
       MSG_RETURN(MSG_HOST_FAILURE);
     }