Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MSG_task_get is now fair...
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 25 Mar 2005 21:46:39 +0000 (21:46 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 25 Mar 2005 21:46:39 +0000 (21:46 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1176 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/gos.c

index 9ae49b2..9dcfb54 100644 (file)
@@ -64,7 +64,7 @@ MSG_error_t MSG_task_get(m_task_t * task,
 
   DEBUG2("Waiting for a task on channel %d (%s)", channel,h->name);
 
-  while ((t = xbt_fifo_pop(h_simdata->mbox[channel])) == NULL) {
+  while ((t = xbt_fifo_shift(h_simdata->mbox[channel])) == NULL) {
     xbt_assert2(!(h_simdata->sleeping[channel]),
                "A process (%s(%d)) is already blocked on this channel",
                h_simdata->sleeping[channel]->name,