- if (call == 1) { /* Send */
- get_comm_pattern(current_pattern, req, call);
- } else if (call == 2) { /* Recv */
- get_comm_pattern(current_pattern, req, call);
- } else if (call == 3) { /* Wait */
- current_comm = simcall_comm_wait__get__comm(req);
- if (current_comm->comm.refcount == 1) /* First wait only must be considered */
- complete_comm_pattern(current_pattern, current_comm);
- } else if (call == 4) { /* WaitAny */
- current_comm = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t);
- if (current_comm->comm.refcount == 1) /* First wait only must be considered */
- complete_comm_pattern(current_pattern, current_comm);
- }
+ mc_update_comm_pattern(call, req, value, current_pattern);