X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f4a258218681d1002c99d4556ba4b21bc6a6adff..4e7daeaec907ca6e74dcc5faaf2f23deae766aa4:/src/msg/gos.c diff --git a/src/msg/gos.c b/src/msg/gos.c index a2fb71917d..2d12f6512e 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -452,6 +452,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) { + xbt_fifo_remove(((simdata_host_t) remote_host->simdata)->mbox[channel], + task); PAJE_PROCESS_POP_STATE(process); PAJE_COMM_STOP(process,task,channel); MSG_RETURN(MSG_TRANSFER_FAILURE); @@ -594,7 +596,7 @@ void __MSG_task_execute(m_process_t process, m_task_t task) simdata = task->simdata; xbt_assert0((!simdata->compute)&&(task->simdata->using==1), "This taks is executed somewhere else. Go fix your code!"); - task->simdata->using++; + simdata->using++; simdata->compute = surf_workstation_resource->extension_public-> execute(MSG_process_get_host(process)->simdata->host, simdata->computation_amount); @@ -602,7 +604,7 @@ void __MSG_task_execute(m_process_t process, m_task_t task) set_priority(simdata->compute, simdata->priority); surf_workstation_resource->common_public->action_set_data(simdata->compute,task); - task->simdata->using--; + simdata->using--; } MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task) @@ -745,6 +747,8 @@ MSG_error_t MSG_process_sleep(double nb_sec) m_process_t process = MSG_process_self(); m_task_t dummy = NULL; simdata_task_t simdata = NULL; + + xbt_assert1(nb_sec>=0,"Invalid duration %g",nb_sec); CHECK_HOST(); dummy = MSG_task_create("MSG_sleep", nb_sec, 0.0, NULL);