![]() |
|
|||
File indexing completed on 2025-02-22 10:47:26
0001 /* 0002 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. 0003 * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. 0004 * Copyright (c) 2014-2020 Intel, Inc. All rights reserved. 0005 * 0006 * Copyright (c) 2021-2022 Nanook Consulting. All rights reserved. 0007 * $COPYRIGHT$ 0008 * 0009 * Additional copyrights may follow 0010 * 0011 * $HEADER$ 0012 * 0013 * @file: 0014 * 0015 */ 0016 0017 #ifndef PMIX_PSTRG_H_ 0018 #define PMIX_PSTRG_H_ 0019 0020 #include "src/include/pmix_config.h" 0021 0022 #include "src/class/pmix_list.h" 0023 #include "src/include/pmix_globals.h" 0024 #include "src/mca/mca.h" 0025 0026 BEGIN_C_DECLS 0027 0028 /* initialization */ 0029 typedef pmix_status_t (*pmix_pstrg_base_module_init_fn_t)(void); 0030 0031 /* finalization */ 0032 typedef void (*pmix_pstrg_base_module_fini_fn_t)(void); 0033 0034 /* query support 0035 * 0036 * If the operation can be performed immediately, then the module should just 0037 * add the results (as pmix_kval_t's) to the provided list and 0038 * return PMIX_SUCCESS. 0039 * 0040 * If the module needs to perform some non-atomic operation 0041 * (e.g., query a storage manager), then it should shift to its own internal 0042 * thread, return PMIX_OPERATION_IN_PROGRESS, and execute the provided 0043 * callback function when the operation is completed. 0044 * 0045 * If there is no support for the given keys, then just return PMIX_SUCCESS. 0046 * 0047 * If the module should be providing a response but encounters an error, 0048 * then immediately return an error code if the error is immediately detected, 0049 * or execute the callback function with an error code if it is detected later. 0050 */ 0051 typedef pmix_status_t (*pmix_pstrg_base_module_query_fn_t)(pmix_query_t queries[], size_t nqueries, 0052 pmix_list_t *results, 0053 pmix_pstrg_query_cbfunc_t cbfunc, 0054 void *cbdata); 0055 0056 /* 0057 * Ver 1.0 0058 */ 0059 typedef struct pmix_pstrg_base_module_1_0_0_t { 0060 char *name; 0061 pmix_pstrg_base_module_init_fn_t init; 0062 pmix_pstrg_base_module_fini_fn_t finalize; 0063 pmix_pstrg_base_module_query_fn_t query; 0064 } pmix_pstrg_base_module_t; 0065 0066 /* 0067 * the standard component data structure 0068 */ 0069 typedef pmix_mca_base_component_t pmix_pstrg_base_component_t; 0070 0071 typedef struct pmix_pstrg_API_module_1_0_0_t { 0072 pmix_pstrg_base_module_query_fn_t query; 0073 } pmix_pstrg_API_module_t; 0074 0075 /* 0076 * Macro for use in components that are of type storage v1.0.0 0077 */ 0078 #define PMIX_PSTRG_BASE_VERSION_1_0_0 PMIX_MCA_BASE_VERSION_1_0_0("pstrg", 1, 0, 0) 0079 0080 /* Global structure for accessing storage functions 0081 */ 0082 PMIX_EXPORT extern pmix_pstrg_API_module_t pmix_pstrg; /* holds API function pointers */ 0083 0084 END_C_DECLS 0085 0086 #endif /* MCA_PSTRG_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |