root/opal/mca/pmix/pmix4x/pmix/src/mca/pdl/base/pdl_base_fns.c

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

DEFINITIONS

This source file includes following definitions.
  1. pmix_pdl_open
  2. pmix_pdl_lookup
  3. pmix_pdl_close
  4. pmix_pdl_foreachfile

   1 /*
   2  * Copyright (c) 2004-2010 The Trustees of Indiana University.
   3  *                         All rights reserved.
   4  * Copyright (c) 2015      Cisco Systems, Inc.  All rights reserved.
   5  * Copyright (c) 2016      Intel, Inc. All rights reserved
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 /**
  14  * This file is a simple set of wrappers around the selected PMIX PDL
  15  * component (it's a compile-time framework with, at most, a single
  16  * component; see pdl.h for details).
  17  */
  18 
  19 #include <src/include/pmix_config.h>
  20 
  21 #include "pmix_common.h"
  22 
  23 #include "src/util/output.h"
  24 #include "src/mca/pdl/base/base.h"
  25 
  26 
  27 int pmix_pdl_open(const char *fname,
  28                  bool use_ext, bool private_namespace,
  29                  pmix_pdl_handle_t **handle, char **err_msg)
  30 {
  31     *handle = NULL;
  32 
  33     if (NULL != pmix_pdl && NULL != pmix_pdl->open) {
  34         return pmix_pdl->open(fname, use_ext, private_namespace,
  35                              handle, err_msg);
  36     }
  37 
  38     return PMIX_ERR_NOT_SUPPORTED;
  39 }
  40 
  41 int pmix_pdl_lookup(pmix_pdl_handle_t *handle,
  42                    const char *symbol,
  43                    void **ptr, char **err_msg)
  44 {
  45     if (NULL != pmix_pdl && NULL != pmix_pdl->lookup) {
  46         return pmix_pdl->lookup(handle, symbol, ptr, err_msg);
  47     }
  48 
  49     return PMIX_ERR_NOT_SUPPORTED;
  50 }
  51 
  52 int pmix_pdl_close(pmix_pdl_handle_t *handle)
  53 {
  54     if (NULL != pmix_pdl && NULL != pmix_pdl->close) {
  55         return pmix_pdl->close(handle);
  56     }
  57 
  58     return PMIX_ERR_NOT_SUPPORTED;
  59 }
  60 
  61 int pmix_pdl_foreachfile(const char *search_path,
  62                         int (*cb_func)(const char *filename, void *context),
  63                         void *context)
  64 {
  65     if (NULL != pmix_pdl && NULL != pmix_pdl->foreachfile) {
  66        return pmix_pdl->foreachfile(search_path, cb_func, context);
  67     }
  68 
  69     return PMIX_ERR_NOT_SUPPORTED;
  70 }

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