From: alegrand Date: Wed, 21 May 2008 09:32:47 +0000 (+0000) Subject: This is the right condition that prevents deadlocks! :) X-Git-Tag: v3.3~459 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6c70be774ea7f214c9945645ddcb11bbdb5ef33a?ds=sidebyside This is the right condition that prevents deadlocks! :) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5477 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Msg/gras_msg_exchange.c b/src/gras/Msg/gras_msg_exchange.c index 0cafee709c..ba36513fef 100644 --- a/src/gras/Msg/gras_msg_exchange.c +++ b/src/gras/Msg/gras_msg_exchange.c @@ -270,7 +270,6 @@ gras_msg_handleall(double period) { do { now=gras_os_time(); - TRY{ if (period - now + begin > 0) gras_msg_handle(period - now + begin); @@ -280,7 +279,7 @@ gras_msg_handleall(double period) { xbt_ex_free(e); } /* Epsilon to avoid numerical stability issues were the waited interval is so small that the global clock cannot notice the increment */ - } while (now - begin < period - 0.000001); + } while (period - now + begin > 0); } /** @brief Handle an incomming message or timer (or wait up to \a timeOut seconds)