Commit f6cdb3c8 authored by Wesley Bland's avatar Wesley Bland Committed by Huiwei Lu
Browse files

Allow MPIR_Request_complete to take a NULL request



If the first argument is NULL, don't try to set it to MPI_REQUEST_NULL.
For blocking functions that want to complete the MPID_Request object,
this allows them to reuse the code.
Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent 0418d495
......@@ -77,7 +77,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
mpi_errno = request_ptr->status.MPI_ERROR;
MPIR_SENDQ_FORGET(request_ptr);
MPID_Request_release(request_ptr);
*request = MPI_REQUEST_NULL;
if (NULL != request) *request = MPI_REQUEST_NULL;
break;
}
case MPID_REQUEST_RECV:
......@@ -85,7 +85,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
MPIR_Request_extract_status(request_ptr, status);
mpi_errno = request_ptr->status.MPI_ERROR;
MPID_Request_release(request_ptr);
*request = MPI_REQUEST_NULL;
if (NULL != request) *request = MPI_REQUEST_NULL;
break;
}
......@@ -210,7 +210,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
}
MPID_Request_release(request_ptr);
*request = MPI_REQUEST_NULL;
if (NULL != request) *request = MPI_REQUEST_NULL;
break;
}
......@@ -220,7 +220,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
{
MPIR_Request_extract_status(request_ptr, status);
MPID_Request_release(request_ptr);
*request = MPI_REQUEST_NULL;
if (NULL != request) *request = MPI_REQUEST_NULL;
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment