X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/543a9d7e86cfdffac751091543019b9bdaffff6b..d236809e6149a03ef3e53599458f51c98f79f94d:/src/s4u/s4u_Comm.cpp diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 1c90aad198..cd8ea25a73 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -219,13 +219,30 @@ Comm* Comm::start() } else if (src_buff_ != nullptr) { // Sender side on_send(*this); - pimpl_ = simcall_comm_isend(sender_, mailbox_->get_impl(), remains_, rate_, src_buff_, src_buff_size_, match_fun_, - clean_fun_, copy_data_function_, get_data(), detached_); + kernel::actor::CommIsendSimcall observer{sender_, + mailbox_->get_impl(), + remains_, + rate_, + static_cast(src_buff_), + src_buff_size_, + match_fun_, + clean_fun_, + copy_data_function_, + get_data(), + detached_}; + pimpl_ = kernel::actor::simcall([&observer] { return kernel::activity::CommImpl::isend(&observer); }, &observer); } else if (dst_buff_ != nullptr) { // Receiver side xbt_assert(not detached_, "Receive cannot be detached"); on_recv(*this); - pimpl_ = simcall_comm_irecv(receiver_, mailbox_->get_impl(), dst_buff_, &dst_buff_size_, match_fun_, - copy_data_function_, get_data(), rate_); + kernel::actor::CommIrecvSimcall observer{receiver_, + mailbox_->get_impl(), + static_cast(dst_buff_), + &dst_buff_size_, + match_fun_, + copy_data_function_, + get_data(), + rate_}; + pimpl_ = kernel::actor::simcall([&observer] { return kernel::activity::CommImpl::irecv(&observer); }, &observer); } else { xbt_die("Cannot start a communication before specifying whether we are the sender or the receiver"); }