Skip to content

Commit 8e788b5

Browse files
committed
pml/ob1: refactor append_recv_req_to_queue() to improve readability
and fix a typo in a comment Thanks George for the patch
1 parent 4a886ac commit 8e788b5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ompi/mca/pml/ob1/pml_ob1_recvreq.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,6 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq,
10481048
static inline void append_recv_req_to_queue(opal_list_t *queue,
10491049
mca_pml_ob1_recv_request_t *req)
10501050
{
1051-
if(OPAL_UNLIKELY(req->req_recv.req_base.req_type == MCA_PML_REQUEST_IPROBE ||
1052-
req->req_recv.req_base.req_type == MCA_PML_REQUEST_IMPROBE))
1053-
return;
1054-
10551051
opal_list_append(queue, (opal_list_item_t*)req);
10561052

10571053
#if OMPI_WANT_PERUSE
@@ -1202,7 +1198,7 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12021198
req->req_recv.req_base.req_proc = proc->ompi_proc;
12031199
frag = recv_req_match_specific_proc(req, proc);
12041200
queue = &proc->specific_receives;
1205-
/* wild cardrecv will be prepared on match */
1201+
/* wildcard recv will be prepared on match */
12061202
prepare_recv_req_converter(req);
12071203
}
12081204

@@ -1211,7 +1207,9 @@ void mca_pml_ob1_recv_req_start(mca_pml_ob1_recv_request_t *req)
12111207
&(req->req_recv.req_base), PERUSE_RECV);
12121208
/* We didn't find any matches. Record this irecv so we can match
12131209
it when the message comes in. */
1214-
append_recv_req_to_queue(queue, req);
1210+
if(OPAL_LIKELY(req->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE &&
1211+
req->req_recv.req_base.req_type != MCA_PML_REQUEST_IMPROBE))
1212+
append_recv_req_to_queue(queue, req);
12151213
req->req_match_received = false;
12161214
OB1_MATCHING_UNLOCK(&ob1_comm->matching_lock);
12171215
} else {

0 commit comments

Comments
 (0)