1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file */
#ifndef OMPI_SUPPORT_COMPONENTS_H
#define OMPI_SUPPORT_COMPONENTS_H
#include "opal/libltdl/ltdl.h"
#include "opal/mca/mca.h"
BEGIN_C_DECLS
/**
* Generic function pointer, suitable for casting
*/
typedef void (*test_component_fn_t)(void);
/**
* Type to hold both a variable and a function pointer, especially
* for platforms where they are different sizes.
*/
union test_component_sym_t {
void *tcs_variable;
test_component_fn_t tcs_function;
};
/** Convenience typedef */
typedef union test_component_sym_t test_component_sym_t;
/**
* Type for masking the real/underlying type of opened components
*/
struct test_component_handle_t {
lt_dlhandle tch_handle;
};
/**
* Convenience typedef
*/
typedef struct test_component_handle_t test_component_handle_t;
/**
* Open a specific MCA component in the build tree
*
* void *test_component_open()
*/
int test_component_open(const char *framework, const char *component,
test_component_handle_t *comp_handle,
mca_base_component_t **mca);
/**
* Find a symbol in an MCA component
*
* ompi_test_component_sym_t test_component_find_symbol()
*/
int test_component_find_symbol(const char *name,
test_component_handle_t *handle,
test_component_sym_t *sym);
/**
* Close a specific MCA component
*
* int test_component_close()
*/
int test_component_close(test_component_handle_t *handle);
END_C_DECLS
#endif /* OMPI_SUPPORT_COMPONENTS_H */
|