root/oshmem/mca/atomic/basic/atomic_basic_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. _basic_register
  2. _basic_open

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2013      Mellanox Technologies, Inc.
   4  *                         All rights reserved.
   5  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   6  *                         reserved.
   7  * $COPYRIGHT$
   8  *
   9  * Additional copyrights may follow
  10  *
  11  * $HEADER$
  12  */
  13 
  14 #include "oshmem_config.h"
  15 
  16 #include "oshmem/constants.h"
  17 #include "oshmem/mca/atomic/atomic.h"
  18 #include "oshmem/mca/atomic/base/base.h"
  19 #include "atomic_basic.h"
  20 
  21 /*
  22  * Public string showing the scoll basic component version number
  23  */
  24 const char *mca_atomic_basic_component_version_string =
  25 "Open SHMEM basic atomic MCA component version " OSHMEM_VERSION;
  26 
  27 /*
  28  * Global variable
  29  */
  30 
  31 /*
  32  * Local function
  33  */
  34 static int _basic_register(void);
  35 static int _basic_open(void);
  36 
  37 /*
  38  * Instantiate the public struct with all of our public information
  39  * and pointers to our public functions in it
  40  */
  41 
  42 mca_atomic_base_component_t mca_atomic_basic_component = {
  43 
  44     /* First, the mca_component_t struct containing meta information
  45        about the component itself */
  46 
  47     .atomic_version = {
  48         MCA_ATOMIC_BASE_VERSION_2_0_0,
  49 
  50         /* Component name and version */
  51         .mca_component_name = "basic",
  52         MCA_BASE_MAKE_VERSION(component, OSHMEM_MAJOR_VERSION, OSHMEM_MINOR_VERSION,
  53                               OSHMEM_RELEASE_VERSION),
  54 
  55         .mca_open_component = _basic_open,
  56         .mca_register_component_params = _basic_register,
  57     },
  58     .atomic_data = {
  59         /* The component is checkpoint ready */
  60         MCA_BASE_METADATA_PARAM_CHECKPOINT
  61     },
  62 
  63     /* Initialization / querying functions */
  64 
  65     .atomic_startup = mca_atomic_basic_startup,
  66     .atomic_finalize = mca_atomic_basic_finalize,
  67     .atomic_query = mca_atomic_basic_query,
  68 };
  69 
  70 static int _basic_register(void)
  71 {
  72     mca_atomic_basic_component.priority = 75;
  73     mca_base_component_var_register (&mca_atomic_basic_component.atomic_version,
  74                                      "priority", "Priority of the atomic:basic "
  75                                      "component (default: 75)", MCA_BASE_VAR_TYPE_INT,
  76                                      NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
  77                                      OPAL_INFO_LVL_3,
  78                                      MCA_BASE_VAR_SCOPE_ALL_EQ,
  79                                      &mca_atomic_basic_component.priority);
  80 
  81     return OSHMEM_SUCCESS;
  82 }
  83 
  84 static int _basic_open(void)
  85 {
  86     return OSHMEM_SUCCESS;
  87 }
  88 
  89 OBJ_CLASS_INSTANCE(mca_atomic_basic_module_t,
  90                    mca_atomic_base_module_t,
  91                    NULL,
  92                    NULL);

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