Commit b9d3345d authored by Darius Buntinas's avatar Darius Buntinas
Browse files

[svn-r699] added prototype for grequest_waitall, made request_ptrs parameter...

[svn-r699] added prototype for grequest_waitall, made request_ptrs parameter const, and made waitall set status to success when the request is null
parent 8b2f984e
......@@ -2249,7 +2249,7 @@ int MPIR_Grequest_free(MPID_Request * request_ptr);
* for generalized requests */
int MPIR_Grequest_progress_poke(int count, MPID_Request **request_ptrs,
MPI_Status array_of_statuses[] );
int MPIR_Grequest_waitall(int count, MPID_Request **request_ptrs, MPI_Status array_of_statuses[] );
int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs);
/* ------------------------------------------------------------------------- */
/* Prototypes for language-specific routines, such as routines to set
......
......@@ -560,9 +560,7 @@ fn_exit:
#define FUNCNAME MPIR_Grequest_waitall
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIR_Grequest_waitall(int count,
MPID_Request **request_ptrs,
MPI_Status array_of_statuses[] )
int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
{
MPIX_Grequest_wait_function *wait_fn = NULL;
void ** state_ptrs;
......
......@@ -169,14 +169,19 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[],
/* first, complete any generalized requests */
if (n_greqs)
{
mpi_errno = MPIR_Grequest_waitall(count, request_ptrs, array_of_statuses);
mpi_errno = MPIR_Grequest_waitall(count, request_ptrs);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
for (i = 0; i < count; i++)
{
if (request_ptrs[i] == NULL) continue;
if (request_ptrs[i] == NULL)
{
if (!ignoring_statuses)
array_of_statuses[i].MPI_ERROR = MPI_SUCCESS;
continue;
}
/* wait for ith request to complete */
while (*request_ptrs[i]->cc_ptr != 0)
{
......
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