1
1
This commit was SVN r3515.
Этот коммит содержится в:
Tim Woodall 2004-11-04 21:29:22 +00:00
родитель d4b62e320a
Коммит 83281249e5

Просмотреть файл

@ -81,34 +81,34 @@ int mca_ptl_tcp_send_frag_init(
static inline void mca_ptl_tcp_send_frag_progress(mca_ptl_tcp_send_frag_t* frag) static inline void mca_ptl_tcp_send_frag_progress(mca_ptl_tcp_send_frag_t* frag)
{ {
mca_pml_base_send_request_t* request = frag->frag_send.frag_request; mca_pml_base_send_request_t* request = frag->frag_send.frag_request;
bool frag_ack;
/* if this is an ack - simply return to pool */ /* if this is an ack - simply return to pool */
if(request == NULL) { if(request == NULL) {
mca_ptl_tcp_send_frag_return(frag->frag_send.frag_base.frag_owner, frag); mca_ptl_tcp_send_frag_return(frag->frag_send.frag_base.frag_owner, frag);
return;
}
/* otherwise, if the message has been sent, and an ack has already been /* Done when:
* received, go ahead and update the request status * (1) ack is not required and send completes
* (2) ack is received and send has completed
*/ */
} else if (frag->frag_vec_cnt == 0 && frag_ack = (frag->frag_send.frag_base.frag_header.
((frag->frag_send.frag_base.frag_header.hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK) == 0 || hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK) ? true : false;
mca_pml_base_send_request_matched(request))) { if(frag_ack == false || ompi_atomic_add_32(&frag->frag_progressed,1) == 2) {
/* make sure this only happens once in threaded case */ /* update request status */
if(ompi_atomic_cmpset(&frag->frag_progressed, 0, 1) == 1) { frag->frag_send.frag_base.frag_owner->ptl_send_progress(
frag->frag_send.frag_base.frag_owner,
request,
frag->frag_send.frag_base.frag_size);
/* update request status */ /* the first fragment is allocated with the request,
frag->frag_send.frag_base.frag_owner->ptl_send_progress( * all others need to be returned to free list
frag->frag_send.frag_base.frag_owner, */
request, if (request->req_cached == false ||
frag->frag_send.frag_base.frag_size); frag->frag_send.frag_base.frag_header.hdr_frag.hdr_frag_offset != 0) {
mca_ptl_tcp_send_frag_return(frag->frag_send.frag_base.frag_owner, frag);
/* the first fragment is allocated with the request,
* all others need to be returned to free list
*/
if(request->req_cached == false ||
frag->frag_send.frag_base.frag_header.hdr_frag.hdr_frag_offset != 0) {
mca_ptl_tcp_send_frag_return(frag->frag_send.frag_base.frag_owner, frag);
}
} }
} }
} }