state->executed_req_ = *req;
// Fetch the data of the request and translate it:
state->internal_req_ = *req;
+ simgrid::kernel::activity::CommImpl* chosen_comm;
simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> remote_comm;
/* The waitany and testany request are transformed into a wait or test request over the corresponding communication
* action so it can be treated later by the dependence function. */
switch (req->call_) {
- case Simcall::COMM_WAITANY: {
+ case Simcall::COMM_WAITANY:
state->internal_req_.call_ = Simcall::COMM_WAIT;
- simgrid::kernel::activity::CommImpl* chosen_comm = mc_model_checker->get_remote_simulation().read(
+ chosen_comm = mc_model_checker->get_remote_simulation().read(
remote(simcall_comm_waitany__get__comms(req) + state->transition_.times_considered_));
mc_model_checker->get_remote_simulation().read(remote_comm, remote(chosen_comm));
simcall_comm_wait__set__comm(&state->internal_req_, remote_comm.get_buffer());
simcall_comm_wait__set__timeout(&state->internal_req_, 0);
break;
- }
- case Simcall::COMM_TESTANY: {
+ case Simcall::COMM_TESTANY:
state->internal_req_.call_ = Simcall::COMM_TEST;
- simgrid::kernel::activity::CommImpl* chosen_comm = mc_model_checker->get_remote_simulation().read(
+ chosen_comm = mc_model_checker->get_remote_simulation().read(
remote(simcall_comm_testany__get__comms(req) + state->transition_.times_considered_));
- mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(chosen_comm));
- simcall_comm_test__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
+ mc_model_checker->get_remote_simulation().read(remote_comm, remote(chosen_comm));
+ simcall_comm_test__set__comm(&state->internal_req_, remote_comm.get_buffer());
simcall_comm_test__set__result(&state->internal_req_, state->transition_.times_considered_);
break;
- }
case Simcall::COMM_WAIT:
- mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(simcall_comm_wait__getraw__comm(req)));
+ chosen_comm = simcall_comm_wait__getraw__comm(req);
+ mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(chosen_comm));
simcall_comm_wait__set__comm(&state->executed_req_, state->internal_comm_.get_buffer());
simcall_comm_wait__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
break;
case Simcall::COMM_TEST:
- mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(simcall_comm_test__getraw__comm(req)));
- simcall_comm_test__set__comm(&state->executed_req_, state->internal_comm_.get_buffer());
- simcall_comm_test__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
+ chosen_comm = simcall_comm_test__getraw__comm(req);
+ mc_model_checker->get_remote_simulation().read(remote_comm, remote(chosen_comm));
+ simcall_comm_test__set__comm(&state->executed_req_, remote_comm.get_buffer());
+ simcall_comm_test__set__comm(&state->internal_req_, remote_comm.get_buffer());
break;
default: