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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* 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 (c) 2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016-2020 Intel, Inc. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file pmix_mca_base_component_repository.h
*
* This file provide the external interface to our base component
* module. Most of the components that depend on it, will use the
* retain_component() function to increase the reference count on a
* particular component (as opposed to the retain() function, which is
* internal to the pmix/mca/base). But it's convenient to have all
* the functions exported from one header file rather than to separate
* retain_component() and retain() into two separate header files
* (i.e., have a separate header file just for retain()).
*/
;
typedef struct pmix_mca_base_component_repository_item_t pmix_mca_base_component_repository_item_t;
PMIX_EXPORT ;
/*
* Structure to track information about why a component failed to load.
*/
;
typedef struct pmix_mca_base_failed_component_t pmix_mca_base_failed_component_t;
PMIX_EXPORT ;
/**
* @brief initialize the component repository
*
* This function must be called before any frameworks are registered or
* opened. It is responsible for setting up the repository of dynamically
* loaded components. The initial search path is taken from the
* pmix_mca_base_component_path MCA parameter. pmix_mca_base_open () is a
* prerequisite call as it registers the pmix_mca_base_component_path parameter.
*/
PMIX_EXPORT int ;
/**
* @brief add search path for dynamically loaded components
*
* @param[in] path delimited list of search paths to add
*/
PMIX_EXPORT int ;
/**
* @brief return the list of components that match a given framework
*
* @param[in] framework framework to match
* @param[out] framework_components components that match this framework
*
* The list returned in {framework_components} is owned by the component
* repository and CAN NOT be modified by the caller.
*/
PMIX_EXPORT int
;
/**
* @brief finalize the mca component repository
*/
PMIX_EXPORT void ;
/**
* @brief open the repository item and add it to the framework's component
* list
*
* @param[in] framework framework that matches the component
* @param[in] ri dynamic component to open
*/
PMIX_EXPORT int
;
/**
* @brief Reduce the reference count of a component and dlclose it if necessary
*/
PMIX_EXPORT void
;
/**
* @brief Increase the reference count of a component
*
* Each component repository item starts with a reference count of 0. This ensures that
* when a framework closes it's components the repository items are all correctly
* dlclosed. This function can be used to prevent the dlclose if a component is needed
* after its framework has closed the associated component. Users of this function
* should call pmix_mca_base_component_repository_release() once they are finished with the
* component.
*
* @note all components are automatically unloaded by the
* pmix_mca_base_component_repository_finalize() call.
*/
PMIX_EXPORT int ;
/* MCA_BASE_COMPONENT_REPOSITORY_H */