root/opal/mca/dl/base/base.h

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

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #ifndef OPAL_DL_BASE_H
  14 #define OPAL_DL_BASE_H
  15 
  16 #include "opal_config.h"
  17 #include "opal/mca/dl/dl.h"
  18 #include "opal/util/opal_environ.h"
  19 #include "opal/runtime/opal_cr.h"
  20 
  21 #include "opal/mca/base/base.h"
  22 
  23 
  24 BEGIN_C_DECLS
  25 
  26 /**
  27  * Globals
  28  */
  29 OPAL_DECLSPEC extern mca_base_framework_t opal_dl_base_framework;
  30 OPAL_DECLSPEC extern opal_dl_base_component_t
  31 *opal_dl_base_selected_component;
  32 OPAL_DECLSPEC extern opal_dl_base_module_t *opal_dl;
  33 
  34 
  35 /**
  36  * Initialize the DL MCA framework
  37  *
  38  * @retval OPAL_SUCCESS Upon success
  39  * @retval OPAL_ERROR   Upon failures
  40  *
  41  * This function is invoked during opal_init();
  42  */
  43 OPAL_DECLSPEC int opal_dl_base_open(mca_base_open_flag_t flags);
  44 
  45 /**
  46  * Select an available component.
  47  *
  48  * @retval OPAL_SUCCESS Upon Success
  49  * @retval OPAL_NOT_FOUND If no component can be selected
  50  * @retval OPAL_ERROR Upon other failure
  51  *
  52  */
  53 OPAL_DECLSPEC int opal_dl_base_select(void);
  54 
  55 /**
  56  * Finalize the DL MCA framework
  57  *
  58  * @retval OPAL_SUCCESS Upon success
  59  * @retval OPAL_ERROR   Upon failures
  60  *
  61  * This function is invoked during opal_finalize();
  62  */
  63 OPAL_DECLSPEC int opal_dl_base_close(void);
  64 
  65 /**
  66  * Open a DSO
  67  *
  68  * (see opal_dl_base_module_open_ft_t in opal/mca/dl/dl.h for
  69  * documentation of this function)
  70  */
  71 OPAL_DECLSPEC int opal_dl_open(const char *fname,
  72                                bool use_ext, bool private_namespace,
  73                                opal_dl_handle_t **handle, char **err_msg);
  74 
  75 /**
  76  * Lookup a symbol in a DSO
  77  *
  78  * (see opal_dl_base_module_lookup_ft_t in opal/mca/dl/dl.h for
  79  * documentation of this function)
  80  */
  81 OPAL_DECLSPEC int opal_dl_lookup(opal_dl_handle_t *handle,
  82                                  const char *symbol,
  83                                  void **ptr, char **err_msg);
  84 
  85 /**
  86  * Close a DSO
  87  *
  88  * (see opal_dl_base_module_close_ft_t in opal/mca/dl/dl.h for
  89  * documentation of this function)
  90  */
  91 OPAL_DECLSPEC int opal_dl_close(opal_dl_handle_t *handle);
  92 
  93 /**
  94  * Iterate over files in a path
  95  *
  96  * (see opal_dl_base_module_foreachfile_ft_t in opal/mca/dl/dl.h for
  97  * documentation of this function)
  98  */
  99 OPAL_DECLSPEC int opal_dl_foreachfile(const char *search_path,
 100                                       int (*cb_func)(const char *filename,
 101                                                      void *context),
 102                                       void *context);
 103 
 104 END_C_DECLS
 105 
 106 #endif /* OPAL_DL_BASE_H */

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