-:    0:Source:/home/MPI/testing/mpich2/mpich2/src/mpi/romio/mpi-io/mpiu_greq.c
        -:    0:Graph:mpiu_greq.gcno
        -:    0:Data:mpiu_greq.gcda
        -:    0:Runs:623
        -:    0:Programs:173
        -:    1:/* -*- Mode: C; c-basic-offset:4 ; -*- */
        -:    2:/*
        -:    3: *  (C) 2003 by Argonne National Laboratory.
        -:    4: *      See COPYRIGHT in top-level directory.
        -:    5: */
        -:    6:#include <string.h>
        -:    7:#include "mpioimpl.h"
        -:    8:#include "mpiu_greq.h"
        -:    9:
        -:   10:#ifdef HAVE_WEAK_SYMBOLS
        -:   11:/* Include mapping from MPI->PMPI */
        -:   12:#define MPIO_BUILD_PROFILING
        -:   13:#include "mpioprof.h"
        -:   14:#endif
        -:   15:
        -:   16:int MPIU_Greq_query_fn(void *extra_state, MPI_Status *status)
       52:   17:{
        -:   18:    int foo;
        -:   19:
        -:   20:    /* can't touch user's MPI_ERROR, so hold it for a moment */
       52:   21:    foo = status->MPI_ERROR;
        -:   22:
        -:   23:    /* get the status from the blocking operation */
       52:   24:    memcpy(status, extra_state, sizeof(MPI_Status));
        -:   25:
        -:   26:    /* restore MPI_ERROR to whatever it had when we got it */
       52:   27:    status->MPI_ERROR = foo;
        -:   28:
        -:   29:    /* and let Test|Wait know we weren't canceled */
       52:   30:    MPIR_Nest_incr();
       52:   31:    MPI_Status_set_cancelled(status, 0);
       52:   32:    MPIR_Nest_decr();
        -:   33:
       52:   34:    return MPI_SUCCESS;
        -:   35:}
        -:   36:
        -:   37:int MPIU_Greq_free_fn(void *extra_state)
       52:   38:{
        -:   39:    /* frees the memory allocated in MPIO_Completed_request_create */
       52:   40:    ADIOI_Free(extra_state);
        -:   41:	
       52:   42:    return MPI_SUCCESS;
        -:   43:}
        -:   44:int MPIU_Greq_cancel_fn(void *extra_state, int complete)
    #####:   45:{
        -:   46:    MPIU_UNREFERENCED_ARG(extra_state);
        -:   47:    MPIU_UNREFERENCED_ARG(complete);
        -:   48:
        -:   49:    /* can't cancel */
    #####:   50:    return MPI_SUCCESS;
        -:   51:}