Blame src/include/mpir_misc_post.h

Packit Service c5cf8c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
Packit Service c5cf8c
/*
Packit Service c5cf8c
 *  (C) 2001 by Argonne National Laboratory.
Packit Service c5cf8c
 *      See COPYRIGHT in top-level directory.
Packit Service c5cf8c
 *
Packit Service c5cf8c
 */
Packit Service c5cf8c
Packit Service c5cf8c
#ifndef MPIR_MISC_POST_H_INCLUDED
Packit Service c5cf8c
#define MPIR_MISC_POST_H_INCLUDED
Packit Service c5cf8c
Packit Service c5cf8c
/* Pull the error status out of the tag space and put it into an errflag. */
Packit Service c5cf8c
#undef FUNCNAME
Packit Service c5cf8c
#define FUNCNAME MPIR_process_status
Packit Service c5cf8c
#undef FCNAME
Packit Service c5cf8c
#define FCNAME MPL_QUOTE(FUNCNAME)
Packit Service c5cf8c
static inline void MPIR_Process_status(MPI_Status * status, MPIR_Errflag_t * errflag)
Packit Service c5cf8c
{
Packit Service c5cf8c
    if (MPI_PROC_NULL != status->MPI_SOURCE &&
Packit Service c5cf8c
        (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
Packit Service c5cf8c
         MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
Packit Service c5cf8c
         MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) && !*errflag) {
Packit Service c5cf8c
        /* If the receive was completed within the MPID_Recv, handle the
Packit Service c5cf8c
         * errflag here. */
Packit Service c5cf8c
        if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(status->MPI_TAG) ||
Packit Service c5cf8c
            MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
Packit Service c5cf8c
            *errflag = MPIR_ERR_PROC_FAILED;
Packit Service c5cf8c
            MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
Packit Service c5cf8c
        } else {
Packit Service c5cf8c
            *errflag = MPIR_ERR_OTHER;
Packit Service c5cf8c
            MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
Packit Service c5cf8c
        }
Packit Service c5cf8c
    }
Packit Service c5cf8c
}
Packit Service c5cf8c
Packit Service c5cf8c
#endif /* MPIR_MISC_POST_H_INCLUDED */