root/opal/mca/pmix/pmix4x/pmix/src/mca/psensor/heartbeat/psensor_heartbeat_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. heartbeat_open
  2. heartbeat_query
  3. heartbeat_close

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

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