Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
chainsend: change tesh to test with 8192 pieces
[simgrid.git] / examples / msg / chainsend / common.c
1 #include "common.h"
2
3 int process_pending_connections(xbt_dynar_t q)
4 {
5   unsigned int iter;
6   int status;
7   int empty = 0;
8   msg_comm_t comm;
9
10   xbt_dynar_foreach(q, iter, comm) {
11     empty = 1;
12     if (MSG_comm_test(comm)) {
13       MSG_comm_destroy(comm);
14       status = MSG_comm_get_status(comm);
15       xbt_assert(status == MSG_OK, "process_pending_connections() failed");
16       xbt_dynar_cursor_rm(q, &iter);
17       empty = 0;
18     }
19   }
20   return empty;
21 }