CommImpl::Type smx_type;
if (type == 1) {
this_comm = CommImplPtr(new CommImpl(CommImpl::Type::SEND));
- smx_type = CommImpl::Type::SEND;
+ smx_type = CommImpl::Type::RECEIVE;
} else {
this_comm = CommImplPtr(new CommImpl(CommImpl::Type::RECEIVE));
- smx_type = CommImpl::Type::RECEIVE;
+ smx_type = CommImpl::Type::SEND;
}
smx_activity_t other_synchro = nullptr;
if (permanent_receiver_ != nullptr && not done_comm_queue_.empty()) {
simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type == SIMIX_COMM_SEND) &&
+ if ((r1->call == SIMCALL_COMM_ISEND) && (synchro2->type == kernel::activity::CommImpl::Type::SEND) &&
(synchro2->src_buff_ != simcall_comm_isend__get__src_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
- if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type == SIMIX_COMM_RECEIVE) &&
+ if ((r1->call == SIMCALL_COMM_IRECV) && (synchro2->type == kernel::activity::CommImpl::Type::RECEIVE) &&
(synchro2->dst_buff_ != simcall_comm_irecv__get__dst_buff(r1)) && simcall_comm_wait__get__timeout(r2) <= 0)
return false;
}
simgrid::kernel::activity::CommImpl* act = temp_act.getBuffer();
if (act->src_actor_.get() && act->dst_actor_.get())
state->transition.argument = 0;
- else if (act->src_actor_.get() == nullptr && act->type == SIMIX_COMM_READY && act->detached == 1)
+ else if (act->src_actor_.get() == nullptr && act->type == simgrid::kernel::activity::CommImpl::Type::READY &&
+ act->detached == 1)
state->transition.argument = 0;
else
state->transition.argument = -1;
XBT_DEBUG("SSEND : Is there a corresponding recv already posted in the small mailbox %s?",
mailbox->get_cname());
action = mailbox->iprobe(1, &match_send, static_cast<void*>(this));
- if (action != nullptr) {
+ if (action == nullptr) {
XBT_DEBUG("No, we are first, send to large mailbox");
mailbox = process->mailbox();
}