From: alegrand Date: Wed, 19 Jan 2005 18:16:43 +0000 (+0000) Subject: Now, you can send a task of length 0 in a no latency model... Otherwise the emitter... X-Git-Tag: v3.3~4587 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/78e6d82818b5b5fcfb29e84da291e69073b18b55?hp=e191510f1cefbd3858e94de3c820f3e538642844 Now, you can send a task of length 0 in a no latency model... Otherwise the emitter used to hang. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@763 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/msg/gos.c b/src/msg/gos.c index 77fa3243ff..feb7153b6d 100644 --- a/src/msg/gos.c +++ b/src/msg/gos.c @@ -192,18 +192,19 @@ MSG_error_t MSG_task_put(m_task_t task, if(remote_host->simdata->sleeping[channel]) __MSG_process_unblock(remote_host->simdata->sleeping[channel]); /* else { */ - process->simdata->put_host = dest; - process->simdata->put_channel = channel; - while(!(task_simdata->comm)) - __MSG_process_block(); - process->simdata->put_host = NULL; - process->simdata->put_channel = -1; + process->simdata->put_host = dest; + process->simdata->put_channel = channel; + while(!(task_simdata->comm)) + __MSG_process_block(); + process->simdata->put_host = NULL; + process->simdata->put_channel = -1; /* } */ - do { + state=surf_workstation_resource->common_public->action_get_state(task_simdata->comm); + while (state==SURF_ACTION_RUNNING) { __MSG_task_wait_event(process, task); state=surf_workstation_resource->common_public->action_get_state(task_simdata->comm); - } while (state==SURF_ACTION_RUNNING); + } MSG_task_destroy(task);