A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This is the right condition that prevents deadlocks! :)
[simgrid.git]
/
src
/
gras
/
Msg
/
gras_msg_exchange.c
diff --git
a/src/gras/Msg/gras_msg_exchange.c
b/src/gras/Msg/gras_msg_exchange.c
index
0cafee7
..
ba36513
100644
(file)
--- 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();
do {
now=gras_os_time();
-
TRY{
if (period - now + begin > 0)
gras_msg_handle(period - now + begin);
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 */
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)
}
/** @brief Handle an incomming message or timer (or wait up to \a timeOut seconds)