X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/90c67c5606b33791cc39883c5061e385a2a3ff33:/examples/msg/icomms/peer2.c..2a5be1efbd30fcf80a06645c196fcec50b19e665:/examples/msg/async-waitall/async-waitall.c diff --git a/examples/msg/icomms/peer2.c b/examples/msg/async-waitall/async-waitall.c similarity index 96% rename from examples/msg/icomms/peer2.c rename to examples/msg/async-waitall/async-waitall.c index 73823ea377..8a0759eae9 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/async-waitall/async-waitall.c @@ -28,9 +28,7 @@ static int sender(int argc, char *argv[]) char sprintf_buffer[256]; sprintf(mailbox, "receiver-%ld", i % receivers_count); sprintf(sprintf_buffer, "Task_%d", i); - task = - MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, - NULL); + task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL); comm[i] = MSG_task_isend(task, mailbox); XBT_INFO("Send to receiver-%ld Task_%d", i % receivers_count, i); } @@ -40,8 +38,8 @@ static int sender(int argc, char *argv[]) task = MSG_task_create("finalize", 0, 0, 0); comm[i + number_of_tasks] = MSG_task_isend(task, mailbox); XBT_INFO("Send to receiver-%ld finalize", i % receivers_count); - } + /* Here we are waiting for the completion of all communications */ MSG_comm_waitall(comm, (number_of_tasks + receivers_count), -1); for (i = 0; i < number_of_tasks + receivers_count; i++)