-
- if (MC_is_active() || MC_record_replay_is_active()) {
- /* the model-checker wants two separate simcalls */
- simgrid::kernel::activity::ActivityImplPtr comm =
- nullptr; /* MC needs the comm to be set to nullptr during the simcall */
- comm = simcall_comm_isend(sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, nullptr, copy_data_fun,
- data, false);
- simcall_comm_wait(comm.get(), timeout);
- comm = nullptr;
- }
- else {
- simcall_BODY_comm_send(sender, mbox, task_size, rate, static_cast<unsigned char*>(src_buff), src_buff_size,
- match_fun, copy_data_fun, data, timeout);
- }
+ simgrid::s4u::Comm::send(sender, mbox->get_iface(), task_size, rate, src_buff, src_buff_size, match_fun,
+ copy_data_fun, data, timeout);