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
MSG_comm_test and MSG_comm_testany did not update isused
[simgrid.git]
/
src
/
msg
/
msg_gos.c
diff --git
a/src/msg/msg_gos.c
b/src/msg/msg_gos.c
index
608d9d5
..
c41dc38
100644
(file)
--- a/
src/msg/msg_gos.c
+++ b/
src/msg/msg_gos.c
@@
-522,6
+522,11
@@
int MSG_comm_test(msg_comm_t comm)
int finished = 0;
TRY {
finished = SIMIX_req_comm_test(comm->s_comm);
int finished = 0;
TRY {
finished = SIMIX_req_comm_test(comm->s_comm);
+
+ if (finished && comm->task_received != NULL) {
+ /* I am the receiver */
+ (*comm->task_received)->simdata->isused = 0;
+ }
}
CATCH(e) {
switch (e.category) {
}
CATCH(e) {
switch (e.category) {
@@
-603,6
+608,11
@@
int MSG_comm_testany(xbt_dynar_t comms)
comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t);
/* the communication is finished */
comm->status = status;
comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t);
/* the communication is finished */
comm->status = status;
+
+ if (status == MSG_OK && comm->task_received != NULL) {
+ /* I am the receiver */
+ (*comm->task_received)->simdata->isused = 0;
+ }
}
return finished_index;
}
return finished_index;