root/opal/mca/pmix/pmix4x/pmix/src/mca/psensor/file/psensor_file_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. psensor_file_open
  2. psensor_file_query
  3. psensor_file_close

   1 /*
   2  * Copyright (c) 2010      Cisco Systems, Inc.  All rights reserved.
   3  * Copyright (c) 2017      Intel, Inc.  All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 #include <src/include/pmix_config.h>
  12 #include <pmix_common.h>
  13 
  14 #include "src/class/pmix_list.h"
  15 
  16 #include "src/mca/psensor/base/base.h"
  17 #include "src/mca/psensor/file/psensor_file.h"
  18 
  19 /*
  20  * Local functions
  21  */
  22 static int psensor_file_open(void);
  23 static int psensor_file_close(void);
  24 static int psensor_file_query(pmix_mca_base_module_t **module, int *priority);
  25 
  26 pmix_psensor_file_component_t mca_psensor_file_component = {
  27     .super = {
  28         .base = {
  29             PMIX_PSENSOR_BASE_VERSION_1_0_0,
  30 
  31             /* Component name and version */
  32             .pmix_mca_component_name = "file",
  33             PMIX_MCA_BASE_MAKE_VERSION(component,
  34                                        PMIX_MAJOR_VERSION,
  35                                        PMIX_MINOR_VERSION,
  36                                        PMIX_RELEASE_VERSION),
  37 
  38             /* Component open and close functions */
  39             psensor_file_open,  /* component open  */
  40             psensor_file_close, /* component close */
  41             psensor_file_query  /* component query */
  42         },
  43     }
  44 };
  45 
  46 
  47 static int psensor_file_open(void)
  48 {
  49     PMIX_CONSTRUCT(&mca_psensor_file_component.trackers, pmix_list_t);
  50     return PMIX_SUCCESS;
  51 }
  52 
  53 
  54 static int psensor_file_query(pmix_mca_base_module_t **module, int *priority)
  55 {
  56     *priority = 20;  /* irrelevant */
  57     *module = (pmix_mca_base_module_t *)&pmix_psensor_file_module;
  58     return PMIX_SUCCESS;
  59 }
  60 
  61 /**
  62  *  Close all subsystems.
  63  */
  64 
  65 static int psensor_file_close(void)
  66 {
  67     PMIX_LIST_DESTRUCT(&mca_psensor_file_component.trackers);
  68     return PMIX_SUCCESS;
  69 }

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