- if(_sg_mc_comms_determinism || _sg_mc_send_determinism){
- MC_SET_RAW_MEM;
- if(comm_pattern != 0){
- get_comm_pattern(communications_pattern, req, comm_pattern);
+ if(_sg_mc_comms_determinism || _sg_mc_send_determinism){
+ MC_SET_RAW_MEM;
+ if(comm_pattern == 1 || comm_pattern == 2){
+ get_comm_pattern(communications_pattern, req, comm_pattern);
+ }else if (comm_pattern == 3/* || comm_pattern == 4*/){
+ current_comm = simcall_comm_wait__get__comm(req);
+ if(current_comm->comm.refcount == 1){ /* First wait only must be considered */
+ complete_comm_pattern(communications_pattern, current_comm);
+ }
+ }else if (comm_pattern == 4/* || comm_pattern == 4*/){
+ 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(communications_pattern, current_comm);
+ }
+ }
+ MC_UNSET_RAW_MEM;
+ comm_pattern = 0;