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
8d40258
..
ba36513
100644
(file)
--- a/
src/gras/Msg/gras_msg_exchange.c
+++ b/
src/gras/Msg/gras_msg_exchange.c
@@
-278,7
+278,8
@@
gras_msg_handleall(double period) {
RETHROW0("Error while waiting for messages: %s");
xbt_ex_free(e);
}
RETHROW0("Error while waiting for messages: %s");
xbt_ex_free(e);
}
- } while (now - begin < period);
+ /* Epsilon to avoid numerical stability issues were the waited interval is so small that the global clock cannot notice the increment */
+ } 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)
@@
-441,7
+442,7
@@
gras_msg_handle(double timeOut) {
"AND IN SIMGRID (process wasn't killed by an assert)",msg.type->name);
if (!ran_ok)
THROW1(mismatch_error,0,
"AND IN SIMGRID (process wasn't killed by an assert)",msg.type->name);
if (!ran_ok)
THROW1(mismatch_error,0,
- "Message '%s' refused by all registered callbacks", msg.type->name);
+ "Message '%s' refused by all registered callbacks
(maybe your callback misses a 'return 0' at the end)
", msg.type->name);
/* FIXME: gras_datadesc_free not implemented => leaking the payload */
break;
/* FIXME: gras_datadesc_free not implemented => leaking the payload */
break;