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
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
/**
* Flags for @ref UCS_MODULE_FRAMEWORK_LOAD
*/
typedef enum ucs_module_load_flags_t;
/**
* Declare a "framework", which is a context for a specific collection of
* loadable modules. Usually the modules in a particular framework provide
* alternative implementations of the same internal interface.
*
* @param [in] _name Framework name (as a token)
*/
/**
* Load all modules in a particular framework.
*
* @param [in] _name Framework name, same as passed to
* @ref UCS_MODULE_FRAMEWORK_DECLARE
* @param [in] _flags Modules load flags, see @ref ucs_module_load_flags_t
*
* The modules in the framework are loaded by dlopen(). The shared library name
* of a module is: "lib<framework>_<module>.so.<version>", where:
* - <framework> is the framework name
* - <module> is the module name. The list of all modules in a framework is
* defined by the preprocessor macro <framework>_MODULES in the auto-generated
* config.h file, for example: #define foo_MODULES ":bar1:bar2".
* - <version> is the shared library version of the module, as generated by
* libtool. It's extracted from the full path of the current library (libucs).
*
* Module shared libraries are searched in the following locations (in order of
* priority):
* 1. 'ucx' sub-directory inside the directory of the current shared library (libucs)
* 2. ${libdir}/ucx, where ${libdir} is the directory where libraries are installed
* Note that if libucs is loaded from its installation path, (1) and (2) are the
* same location. Only if libucs is moved or ran from build directory, the paths
* will be different, in which case we prefer the 'local' library rather than the
* 'installed' one.
*
* @param [in] _name Framework name (as a token)
*/
/**
* Define a function to be called when a module is loaded.
* Some things can't be done in shared library constructor, and need to be done
* only after dlopen() completes. For example, loading another shared library
* which uses symbols from the current module.
*
* Usage:
* UCS_MODULE_INIT() { ... code ... }
*/
/**
* Define the name of a loadable module global constructor
*/
/**
* Internal function. Please use @ref UCS_MODULE_FRAMEWORK_LOAD macro instead.
*/
void ;