This source file includes following definitions.
- pmix_gds_close
- pmix_gds_open
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 #include <src/include/pmix_config.h>
27
28 #include <pmix_common.h>
29
30 #ifdef HAVE_STRING_H
31 #include <string.h>
32 #endif
33
34 #include "src/class/pmix_list.h"
35 #include "src/util/argv.h"
36
37 #include "src/mca/base/base.h"
38 #include "src/mca/gds/base/base.h"
39
40
41
42
43
44
45
46 #include "src/mca/gds/base/static-components.h"
47
48
49 pmix_gds_globals_t pmix_gds_globals = {{{0}}};
50 int pmix_gds_base_output = -1;
51
52 static pmix_status_t pmix_gds_close(void)
53 {
54 pmix_gds_base_active_module_t *active, *prev;
55
56 if (!pmix_gds_globals.initialized) {
57 return PMIX_SUCCESS;
58 }
59 pmix_gds_globals.initialized = false;
60
61 PMIX_LIST_FOREACH_SAFE(active, prev, &pmix_gds_globals.actives, pmix_gds_base_active_module_t) {
62 pmix_list_remove_item(&pmix_gds_globals.actives, &active->super);
63 if (NULL != active->module->finalize) {
64 active->module->finalize();
65 }
66 PMIX_RELEASE(active);
67 }
68 PMIX_DESTRUCT(&pmix_gds_globals.actives);
69
70 if (NULL != pmix_gds_globals.all_mods) {
71 free(pmix_gds_globals.all_mods);
72 }
73 return pmix_mca_base_framework_components_close(&pmix_gds_base_framework, NULL);
74 }
75
76 static pmix_status_t pmix_gds_open(pmix_mca_base_open_flag_t flags)
77 {
78 pmix_status_t rc;
79
80
81 pmix_gds_globals.initialized = true;
82 pmix_gds_globals.all_mods = NULL;
83 PMIX_CONSTRUCT(&pmix_gds_globals.actives, pmix_list_t);
84
85
86 rc = pmix_mca_base_framework_components_open(&pmix_gds_base_framework, flags);
87 pmix_gds_base_output = pmix_gds_base_framework.framework_output;
88 return rc;
89 }
90
91 PMIX_MCA_BASE_FRAMEWORK_DECLARE(pmix, gds, "PMIx Generalized Data Store",
92 NULL, pmix_gds_open, pmix_gds_close,
93 mca_gds_base_static_components, 0);
94
95 PMIX_CLASS_INSTANCE(pmix_gds_base_active_module_t,
96 pmix_list_item_t,
97 NULL, NULL);