root/ompi/mca/io/romio321/romio/mpi-io/mpiu_greq.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPIU_Greq_query_fn
  2. MPIU_Greq_free_fn
  3. MPIU_Greq_cancel_fn

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /*
   3  *  (C) 2003 by Argonne National Laboratory.
   4  *      See COPYRIGHT in top-level directory.
   5  */
   6 #include "mpioimpl.h"
   7 #include "mpiu_greq.h"
   8 
   9 #include <string.h>
  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)
  17 {
  18     int foo;
  19 
  20     /* can't touch user's MPI_ERROR, so hold it for a moment */
  21     foo = status->MPI_ERROR;
  22 
  23     /* get the status from the blocking operation */
  24     memcpy(status, extra_state, sizeof(MPI_Status));
  25 
  26     /* restore MPI_ERROR to whatever it had when we got it */
  27     status->MPI_ERROR = foo;
  28 
  29     /* and let Test|Wait know we weren't canceled */
  30     MPI_Status_set_cancelled(status, 0);
  31 
  32     return MPI_SUCCESS;
  33 }
  34 
  35 int MPIU_Greq_free_fn(void *extra_state)
  36 {
  37     /* frees the memory allocated in MPIO_Completed_request_create */
  38     ADIOI_Free(extra_state);
  39         
  40     return MPI_SUCCESS;
  41 }
  42 int MPIU_Greq_cancel_fn(void *extra_state, int complete)
  43 {
  44     MPIU_UNREFERENCED_ARG(extra_state);
  45     MPIU_UNREFERENCED_ARG(complete);
  46 
  47     /* can't cancel */
  48     return MPI_SUCCESS;
  49 }

/* [<][>][^][v][top][bottom][index][help] */