Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:26

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
0004  *                         University of Stuttgart.  All rights reserved.
0005  * Copyright (c) 2004-2008 The Trustees of Indiana University.
0006  *                         All rights reserved.
0007  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
0008  *                         reserved.
0009  *
0010  * Copyright (c) 2019      Intel, Inc.  All rights reserved.
0011  * Copyright (c) 2020      Cisco Systems, Inc.  All rights reserved
0012  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0013  * $COPYRIGHT$
0014  *
0015  * Additional copyrights may follow
0016  *
0017  * $HEADER$
0018  */
0019 
0020 /**
0021  * @file
0022  *
0023  * pstat (process statistics) framework component interface.
0024  *
0025  * Intent
0026  *
0027  * To support the ompi-top utility.
0028  *
0029  */
0030 
0031 #ifndef PMIX_MCA_PSTAT_H
0032 #define PMIX_MCA_PSTAT_H
0033 
0034 #include "pmix_config.h"
0035 #include "pmix_common.h"
0036 
0037 #include "src/mca/base/pmix_base.h"
0038 #include "src/mca/mca.h"
0039 
0040 BEGIN_C_DECLS
0041 
0042 /**
0043  * Module initialization function.  Should return PMIX_SUCCESS.
0044  */
0045 typedef int (*pmix_pstat_base_module_init_fn_t)(void);
0046 
0047 typedef int (*pmix_pstat_base_module_query_fn_t)(pid_t pid, pmix_proc_stats_t *stats,
0048                                                  pmix_node_stats_t *nstats);
0049 
0050 typedef int (*pmix_pstat_base_module_fini_fn_t)(void);
0051 
0052 /**
0053  * Structure for pstat components.
0054  */
0055 typedef pmix_mca_base_component_t pmix_pstat_base_component_t;
0056 
0057 /**
0058  * Structure for pstat modules
0059  */
0060 struct pmix_pstat_base_module_1_0_0_t {
0061     pmix_pstat_base_module_init_fn_t init;
0062     pmix_pstat_base_module_query_fn_t query;
0063     pmix_pstat_base_module_fini_fn_t finalize;
0064 };
0065 
0066 /**
0067  * Convenience typedef
0068  */
0069 typedef struct pmix_pstat_base_module_1_0_0_t pmix_pstat_base_module_1_0_0_t;
0070 typedef struct pmix_pstat_base_module_1_0_0_t pmix_pstat_base_module_t;
0071 
0072 /**
0073  * Macro for use in components that are of type pstat
0074  */
0075 #define PMIX_PSTAT_BASE_VERSION_1_0_0 PMIX_MCA_BASE_VERSION_1_0_0("pstat", 1, 0, 0)
0076 
0077 /* Global structure for accessing pstat functions */
0078 PMIX_EXPORT extern pmix_pstat_base_module_t pmix_pstat;
0079 
0080 END_C_DECLS
0081 
0082 #endif /* PMIX_MCA_PSTAT_H */