OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

mca_base_component_repository.h
1 /*
2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * $COPYRIGHT$
13 *
14 * Additional copyrights may follow
15 *
16 * $HEADER$
17 */
18
19 #ifndef MCA_BASE_COMPONENT_REPOSITORY_H
20 #define MCA_BASE_COMPONENT_REPOSITORY_H
21
22 #include "opal_config.h"
23
24 BEGIN_C_DECLS
25
26 OPAL_DECLSPEC int mca_base_component_repository_init(void);
27
28 /* This file provide the external interface to our base component
29 * module. Most of the components that depend on it, will use the
30 * retain_component() function to increase the reference count on a
31 * particular component (as opposed to the retain() function, which is
32 * internal to the opal/mca/base). But it's convenient to have all
33 * the functions exported from one header file rather than to separate
34 * retain_component() and retain() into two separate header files
35 * (i.e., have a separate header file just for retain()).
36 *
37 * Note that internal to opal/mca/base, <ltdl.h> will *always* be
38 * included before this file, and <ltdl.h> is not included anywhere
39 * else in the OMPI tree. So checking for the LTDL_H preprocessor
40 * macro is a good indicator as to whether this file is being included
41 * from an opal/mca/base source file or not. If we are, then we need
42 * already have a real definition of lt_dlhandle. If we are being
43 * included from elsewhere, then <ltdl.h> will not previously have
44 * been included, LTDL_H will not be defined, and we need a fake
45 * definition of lt_dlhandle (or we'll get compile errors). So just
46 * typedef it to (void*).
47 *
48 * One more case that this handles is the --disable-dlopen case. In
49 * that case, even in opal/mca/base, we *won't* be including <ltdl.h>.
50 * Hence, LTDL_H won't be defined, so we'll end up typedefing
51 * lt_dlhandle to (void *). "But why does that matter?" you ask, "If
52 * we configure with --disable-dlopen, then lt_dlhandle shouldn't be
53 * used anywhere." Incorrect, Grasshopper. A small number of places
54 * (like the retain() function) are still prototyped, but have 99% of
55 * their innards #if'ed out -- i.e., they just return
56 * OPAL_ERR_NOT_SUPPORTED. Why was it coded up this way? I'm not
57 * entirely sure -- there may be a reason (and that reason may just be
58 * conservative coding), but I'm not really too inspired to look into
59 * it any further at this point. :-)
60 */
61 #if !defined(LTDL_H)
62 typedef void *lt_dlhandle;
63 #endif
64
65 OPAL_DECLSPEC int mca_base_component_repository_retain(char *type,
66 lt_dlhandle component_handle,
67 const mca_base_component_t *component_struct);
68
69 OPAL_DECLSPEC int mca_base_component_repository_retain_component(const char *type,
70 const char *name);
71 OPAL_DECLSPEC int mca_base_component_repository_link(const char *src_type,
72 const char *src_name,
73 const char *depend_type,
74 const char *depend_name);
75 OPAL_DECLSPEC void mca_base_component_repository_release(const mca_base_component_t *component);
76 OPAL_DECLSPEC void mca_base_component_repository_finalize(void);
77
78 END_C_DECLS
79
80 #endif /* MCA_BASE_COMPONENT_REPOSITORY_H */
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250