root/opal/mca/pstat/base/pstat_base_open.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. opal_pstat_base_close
  2. opal_pstat_base_open
  3. opal_pstat_base_unsupported_init
  4. opal_pstat_base_unsupported_query
  5. opal_pstat_base_unsupported_finalize

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2008      Cisco Systems, Inc.  All rights reserved.
  13  * Copyright (c) 2014      Intel, Inc. All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 
  22 #include "opal_config.h"
  23 
  24 #include "opal/constants.h"
  25 #include "opal/util/output.h"
  26 #include "opal/mca/mca.h"
  27 #include "opal/mca/base/base.h"
  28 #include "opal/mca/pstat/pstat.h"
  29 #include "opal/mca/pstat/base/base.h"
  30 
  31 
  32 /*
  33  * The following file was created by configure.  It contains extern
  34  * statements and the definition of an array of pointers to each
  35  * component's public mca_base_component_t struct.
  36  */
  37 #include "opal/mca/pstat/base/static-components.h"
  38 
  39 /* unsupported functions */
  40 static int opal_pstat_base_unsupported_init(void);
  41 static int opal_pstat_base_unsupported_query(pid_t pid, opal_pstats_t *stats, opal_node_stats_t *nstats);
  42 static int opal_pstat_base_unsupported_finalize(void);
  43 
  44 /*
  45  * Globals
  46  */
  47 opal_pstat_base_component_t *opal_pstat_base_component = NULL;
  48 opal_pstat_base_module_t opal_pstat = {
  49     opal_pstat_base_unsupported_init,
  50     opal_pstat_base_unsupported_query,
  51     opal_pstat_base_unsupported_finalize
  52 };
  53 
  54 /* Use default register/open/close functions */
  55 static int opal_pstat_base_close(void)
  56 {
  57     /* let the selected module finalize */
  58     if (NULL != opal_pstat.finalize) {
  59             opal_pstat.finalize();
  60     }
  61 
  62     return mca_base_framework_components_close(&opal_pstat_base_framework, NULL);
  63 }
  64 
  65 static int opal_pstat_base_open(mca_base_open_flag_t flags)
  66 {
  67     /* Open up all available components */
  68     return mca_base_framework_components_open(&opal_pstat_base_framework, flags);
  69 }
  70 
  71 MCA_BASE_FRAMEWORK_DECLARE(opal, pstat, "process statistics", NULL,
  72                            opal_pstat_base_open, opal_pstat_base_close,
  73                            mca_pstat_base_static_components, 0);
  74 
  75 static int opal_pstat_base_unsupported_init(void)
  76 {
  77     return OPAL_ERR_NOT_SUPPORTED;
  78 }
  79 
  80 static int opal_pstat_base_unsupported_query(pid_t pid, opal_pstats_t *stats, opal_node_stats_t *nstats)
  81 {
  82     return OPAL_ERR_NOT_SUPPORTED;
  83 }
  84 
  85 static int opal_pstat_base_unsupported_finalize(void)
  86 {
  87     return OPAL_ERR_NOT_SUPPORTED;
  88 }

/* [<][>][^][v][top][bottom][index][help] */