Back to home page

EIC code displayed by LXR

 
 

    


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_PSENSOR_H_
0018 #define PMIX_PSENSOR_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 /*
0029  * Component functions - all MUST be provided!
0030  */
0031 
0032 /* start a sensor operation:
0033  *
0034  * requestor - the process requesting this operation
0035  *
0036  * monitor - a PMIx attribute specifying what is to be monitored
0037  *
0038  * directives - an array of pmix_info_t specifying relevant limits on values, and action
0039  *              to be taken when limits exceeded. Can include
0040  *              user-provided "id" string */
0041 typedef pmix_status_t (*pmix_psensor_base_module_start_fn_t)(pmix_peer_t *requestor,
0042                                                              pmix_status_t error,
0043                                                              const pmix_info_t *monitor,
0044                                                              const pmix_info_t directives[],
0045                                                              size_t ndirs);
0046 
0047 /* stop a sensor operation:
0048  *
0049  * requestor - the process requesting this operation
0050  *
0051  * id - the "id" string provided by the user at the time the
0052  *      affected monitoring operation was started. A NULL indicates
0053  *      that all operations started by this requestor are to
0054  *      be terminated */
0055 typedef pmix_status_t (*pmix_psensor_base_module_stop_fn_t)(pmix_peer_t *requestor, char *id);
0056 
0057 /* API module */
0058 /*
0059  * Ver 1.0
0060  */
0061 typedef struct pmix_psensor_base_module_1_0_0_t {
0062     pmix_psensor_base_module_start_fn_t start;
0063     pmix_psensor_base_module_stop_fn_t stop;
0064 } pmix_psensor_base_module_t;
0065 
0066 /*
0067  * the standard component data structure
0068  */
0069 typedef pmix_mca_base_component_t pmix_psensor_base_component_t;
0070 
0071 /*
0072  * Macro for use in components that are of type sensor v1.0.0
0073  */
0074 #define PMIX_PSENSOR_BASE_VERSION_1_0_0 PMIX_MCA_BASE_VERSION_1_0_0("psensor", 1, 0, 0)
0075 
0076 /* Global structure for accessing sensor functions
0077  */
0078 PMIX_EXPORT extern pmix_psensor_base_module_t pmix_psensor; /* holds API function pointers */
0079 
0080 END_C_DECLS
0081 
0082 #endif /* MCA_SENSOR_H */