X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0921a44d5521b3337b8752aa2a9f06ee1405fb24..afd3a47e007a0f91d206cc2e47b69b4b86970fc2:/src/s4u/s4u_mailbox.cpp diff --git a/src/s4u/s4u_mailbox.cpp b/src/s4u/s4u_mailbox.cpp index 9e5f3f4c9c..2fa5db2809 100644 --- a/src/s4u/s4u_mailbox.cpp +++ b/src/s4u/s4u_mailbox.cpp @@ -22,10 +22,10 @@ const char *Mailbox::name() { MailboxPtr Mailbox::byName(const char*name) { - simix::MailboxImpl* mbox = simix::MailboxImpl::byNameOrNull(name); + kernel::activity::MailboxImpl* mbox = kernel::activity::MailboxImpl::byNameOrNull(name); if (mbox == nullptr) { mbox = simix::kernelImmediate([name] { - return simix::MailboxImpl::byNameOrCreate(name); + return kernel::activity::MailboxImpl::byNameOrCreate(name); }); } return MailboxPtr(&mbox->piface_, true); @@ -47,7 +47,9 @@ smx_activity_t Mailbox::front() } void Mailbox::setReceiver(ActorPtr actor) { - simcall_mbox_set_receiver(pimpl_, actor == nullptr ? nullptr : actor->pimpl_); + simix::kernelImmediate([this, actor]() { + this->pimpl_->setReceiver(actor); + }); } /** @brief get the receiver (process associated to the mailbox) */