/********** Non Static functions ***********/
-void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_simcall_t request,
- e_mc_call_type_t call_type, int backtracking)
+void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, e_mc_call_type_t call_type,
+ int backtracking)
{
const smx_actor_t issuer = MC_smx_simcall_get_issuer(request);
simgrid::mc::PatternCommunicationList* initial_pattern =
}
void CommunicationDeterminismChecker::complete_comm_pattern(
- xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr, unsigned int issuer,
- int backtracking)
+ simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr, unsigned int issuer, int backtracking)
{
simgrid::mc::PatternCommunication* current_comm_pattern;
unsigned int cursor = 0;
/* TODO : handle test and testany simcalls */
e_mc_call_type_t call = MC_get_call_type(req);
mc_model_checker->handle_simcall(state->transition);
- MC_handle_comm_pattern(call, req, req_num, nullptr, 1);
+ MC_handle_comm_pattern(call, req, req_num, 1);
mc_model_checker->wait_for_requests();
/* Update statistics */
mc_model_checker->handle_simcall(state->transition);
/* After this call req is no longer useful */
- if (not this->initial_communications_pattern_done)
- MC_handle_comm_pattern(call, req, req_num, initial_communications_pattern, 0);
- else
- MC_handle_comm_pattern(call, req, req_num, nullptr, 0);
+ MC_handle_comm_pattern(call, req, req_num, 0);
/* Wait for requests (schedules processes) */
mc_model_checker->wait_for_requests();
void restoreState();
public:
// These are used by functions which should be moved in CommunicationDeterminismChecker:
- void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, e_mc_call_type_t call_type, int backtracking);
- void complete_comm_pattern(xbt_dynar_t list, simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr,
- unsigned int issuer, int backtracking);
+ void get_comm_pattern(smx_simcall_t request, e_mc_call_type_t call_type, int backtracking);
+ void complete_comm_pattern(simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr, unsigned int issuer,
+ int backtracking);
private:
/** Stack representing the position in the exploration graph */
state->communicationIndices.push_back(list_process_comm->index_comm);
}
-void MC_handle_comm_pattern(
- e_mc_call_type_t call_type, smx_simcall_t req,
- int value, xbt_dynar_t pattern, int backtracking)
+void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t req, int value, int backtracking)
{
// HACK, do not rely on the Checker implementation outside of it
simgrid::mc::CommunicationDeterminismChecker* checker =
break;
case MC_CALL_TYPE_SEND:
case MC_CALL_TYPE_RECV:
- checker->get_comm_pattern(pattern, req, call_type, backtracking);
+ checker->get_comm_pattern(req, call_type, backtracking);
break;
case MC_CALL_TYPE_WAIT:
case MC_CALL_TYPE_WAITANY:
addr = mc_model_checker->process().read(remote(simcall_comm_waitany__getraw__comms(req) + value));
comm_addr = remote(static_cast<simgrid::kernel::activity::CommImpl*>(addr));
}
- checker->complete_comm_pattern(pattern, comm_addr, MC_smx_simcall_get_issuer(req)->get_pid(), backtracking);
+ checker->complete_comm_pattern(comm_addr, MC_smx_simcall_get_issuer(req)->get_pid(), backtracking);
}
break;
default:
}
}
-XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value,
- xbt_dynar_t current_pattern, int backtracking);
+XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, int backtracking);
XBT_PRIVATE void MC_restore_communications_pattern(simgrid::mc::State* state);