This source file includes following definitions.
- MPI_Keyval_create
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 #include "ompi_config.h"
  23 
  24 #include "ompi/mpi/c/bindings.h"
  25 #include "ompi/runtime/params.h"
  26 #include "ompi/errhandler/errhandler.h"
  27 #include "ompi/attribute/attribute.h"
  28 #include "ompi/communicator/communicator.h"
  29 
  30 #if OMPI_BUILD_MPI_PROFILING
  31 #if OPAL_HAVE_WEAK_SYMBOLS
  32 #pragma weak MPI_Keyval_create = PMPI_Keyval_create
  33 #endif
  34 #define MPI_Keyval_create PMPI_Keyval_create
  35 #endif
  36 
  37 static const char FUNC_NAME[] = "MPI_Keyval_create";
  38 
  39 
  40 int MPI_Keyval_create(MPI_Copy_function *copy_attr_fn,
  41                       MPI_Delete_function *delete_attr_fn,
  42                       int *keyval, void *extra_state)
  43 {
  44     int ret;
  45     ompi_attribute_fn_ptr_union_t copy_fn;
  46     ompi_attribute_fn_ptr_union_t del_fn;
  47 
  48     if (MPI_PARAM_CHECK) {
  49         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  50         if (NULL == keyval) {
  51             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_KEYVAL,
  52                                           FUNC_NAME);
  53         } else if ((NULL == copy_attr_fn) || (NULL == delete_attr_fn)) {
  54             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
  55                                           FUNC_NAME);
  56         }
  57     }
  58 
  59     OPAL_CR_ENTER_LIBRARY();
  60 
  61     copy_fn.attr_communicator_copy_fn = (MPI_Comm_internal_copy_attr_function*)copy_attr_fn;
  62     del_fn.attr_communicator_delete_fn = delete_attr_fn;
  63 
  64     ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn,
  65                                   del_fn, keyval, extra_state, 0, NULL);
  66     OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
  67 }