root/opal/mca/dl/base/dl_base_fns.c

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

DEFINITIONS

This source file includes following definitions.
  1. opal_dl_open
  2. opal_dl_lookup
  3. opal_dl_close
  4. opal_dl_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$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 /**
  13  * This file is a simple set of wrappers around the selected OPAL DL
  14  * component (it's a compile-time framework with, at most, a single
  15  * component; see dl.h for details).
  16  */
  17 
  18 #include "opal_config.h"
  19 
  20 #include "opal/include/opal/constants.h"
  21 
  22 #include "opal/mca/dl/base/base.h"
  23 
  24 
  25 int opal_dl_open(const char *fname,
  26                  bool use_ext, bool private_namespace,
  27                  opal_dl_handle_t **handle, char **err_msg)
  28 {
  29     *handle = NULL;
  30 
  31     if (NULL != opal_dl && NULL != opal_dl->open) {
  32         return opal_dl->open(fname, use_ext, private_namespace,
  33                              handle, err_msg);
  34     }
  35 
  36     return OPAL_ERR_NOT_SUPPORTED;
  37 }
  38 
  39 int opal_dl_lookup(opal_dl_handle_t *handle,
  40                    const char *symbol,
  41                    void **ptr, char **err_msg)
  42 {
  43     if (NULL != opal_dl && NULL != opal_dl->lookup) {
  44         return opal_dl->lookup(handle, symbol, ptr, err_msg);
  45     }
  46 
  47     return OPAL_ERR_NOT_SUPPORTED;
  48 }
  49 
  50 int opal_dl_close(opal_dl_handle_t *handle)
  51 {
  52     if (NULL != opal_dl && NULL != opal_dl->close) {
  53         return opal_dl->close(handle);
  54     }
  55 
  56     return OPAL_ERR_NOT_SUPPORTED;
  57 }
  58 
  59 int opal_dl_foreachfile(const char *search_path,
  60                         int (*cb_func)(const char *filename, void *context),
  61                         void *context)
  62 {
  63     if (NULL != opal_dl && NULL != opal_dl->foreachfile) {
  64         return opal_dl->foreachfile(search_path, cb_func, context);
  65     }
  66 
  67     return OPAL_ERR_NOT_SUPPORTED;
  68 }

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