@@ -49,11 +49,9 @@ static int mca_pml_yalla_send_request_free(ompi_request_t **request)
4949
5050 PML_YALLA_VERBOSE (9 , "free send request *%p=%p" , (void * )request , (void * )* request );
5151
52- OPAL_THREAD_LOCK (& ompi_request_lock );
5352 if (mca_pml_yalla_check_request_state (req )) {
5453 mca_pml_yalla_request_release (req , & ompi_pml_yalla .send_reqs );
5554 }
56- OPAL_THREAD_UNLOCK (& ompi_request_lock );
5755
5856 * request = MPI_REQUEST_NULL ;
5957 return OMPI_SUCCESS ;
@@ -64,7 +62,7 @@ static int mca_pml_yalla_send_request_cancel(ompi_request_t *request, int flag)
6462 mca_pml_yalla_send_request_t * sreq = (mca_pml_yalla_send_request_t * )request ;
6563 mxm_error_t error ;
6664
67- if (request -> req_complete ) {
65+ if (REQUEST_COMPLETE ( request ) ) {
6866 /*
6967 * This might be a buffered send request which has completed anyway, so
7068 * we cannot cancel it anymore. Just hope for the best.
@@ -90,11 +88,9 @@ static int mca_pml_yalla_recv_request_free(ompi_request_t **request)
9088
9189 PML_YALLA_VERBOSE (9 , "free receive request *%p=%p" , (void * )request , (void * )* request );
9290
93- OPAL_THREAD_LOCK (& ompi_request_lock );
9491 if (mca_pml_yalla_check_request_state (req )) {
9592 mca_pml_yalla_request_release (req , & ompi_pml_yalla .recv_reqs );
9693 }
97- OPAL_THREAD_UNLOCK (& ompi_request_lock );
9894
9995 * request = MPI_REQUEST_NULL ;
10096 return OMPI_SUCCESS ;
@@ -178,13 +174,11 @@ static void mca_pml_yalla_send_completion_cb(void *context)
178174 PML_YALLA_VERBOSE (8 , "send request %p completed with status %s" , (void * )sreq ,
179175 mxm_error_string (sreq -> mxm .base .error ));
180176
181- OPAL_THREAD_LOCK (& ompi_request_lock );
182177 ompi_request_complete (& sreq -> super .ompi , true);
183178 if (sreq -> super .flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED ) {
184179 PML_YALLA_VERBOSE (7 , "release request %p because free was already called" , (void * )sreq );
185180 mca_pml_yalla_request_release (& sreq -> super , & ompi_pml_yalla .send_reqs );
186181 }
187- OPAL_THREAD_UNLOCK (& ompi_request_lock );
188182}
189183
190184static void mca_pml_yalla_bsend_completion_cb (void * context )
@@ -211,13 +205,11 @@ static void mca_pml_yalla_recv_completion_cb(void *context)
211205 rreq -> mxm .tag , rreq -> mxm .tag_mask ,
212206 rreq -> mxm .completion .actual_len );
213207
214- OPAL_THREAD_LOCK (& ompi_request_lock );
215208 ompi_request_complete (& rreq -> super .ompi , true);
216209 if (rreq -> super .flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED ) {
217210 PML_YALLA_VERBOSE (7 , "release request %p because free was already called" , (void * )rreq );
218211 mca_pml_yalla_request_release (& rreq -> super , & ompi_pml_yalla .recv_reqs );
219212 }
220- OPAL_THREAD_UNLOCK (& ompi_request_lock );
221213}
222214
223215static void mca_pml_yalla_send_request_construct (mca_pml_yalla_send_request_t * sreq )
0 commit comments