This source file includes following definitions.
- mca_pml_example_component_register
- mca_pml_example_component_open
- mca_pml_example_component_close
- mca_pml_example_component_init
- mca_pml_example_component_fini
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 #include "ompi_config.h"
  19 
  20 #include "opal/mca/event/event.h"
  21 #include "pml_example.h"
  22 
  23 static int mca_pml_example_component_register(void);
  24 static int mca_pml_example_component_open(void);
  25 static int mca_pml_example_component_close(void);
  26 static mca_pml_base_module_t* mca_pml_example_component_init( int* priority,
  27                             bool *allow_multi_user_threads, bool *have_hidden_threads );
  28 static int mca_pml_example_component_fini(void);
  29 
  30 static int mca_pml_example_priority = 0;
  31 
  32 mca_pml_base_component_2_0_0_t mca_pml_example_component = {
  33 
  34     
  35 
  36 
  37     .pmlm_version = {
  38         MCA_PML_BASE_VERSION_2_0_0,
  39 
  40         .mca_component_name = "example",
  41         MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
  42                               OMPI_RELEASE_VERSION),
  43         .mca_open_component = mca_pml_example_component_open,
  44         .mca_close_component = mca_pml_example_component_close,
  45         .mca_register_component_params = mca_pml_example_component_register,
  46     },
  47     .pmlm_data = {
  48         
  49         MCA_BASE_METADATA_PARAM_CHECKPOINT
  50     },
  51 
  52     .pmlm_init = mca_pml_example_component_init,
  53     .pmlm_finalize = mca_pml_example_component_fini,
  54 };
  55 
  56 static int mca_pml_example_component_register(void)
  57 {
  58     mca_pml_example_priority = 0;
  59     (void) mca_base_component_var_register(&mca_pml_example_component.pmlm_version,
  60                                            "priority", "Priority of the pml example component",
  61                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  62                                            OPAL_INFO_LVL_9,
  63                                            MCA_BASE_VAR_SCOPE_READONLY,
  64                                            &mca_pml_example_priority);
  65 
  66     return OMPI_SUCCESS;
  67 }
  68 
  69 static int mca_pml_example_component_open(void)
  70 {
  71     return OMPI_SUCCESS;
  72 }
  73 
  74 static int mca_pml_example_component_close(void)
  75 {
  76     return OMPI_SUCCESS;
  77 }
  78 
  79 static mca_pml_base_module_t*
  80 mca_pml_example_component_init( int* priority,
  81                             bool *allow_multi_user_threads,
  82                             bool *have_hidden_threads )
  83 {
  84     *priority = mca_pml_example_priority;
  85     *have_hidden_threads = false;
  86     *allow_multi_user_threads &= true;
  87     return &mca_pml_example.super;
  88 }
  89 
  90 static int mca_pml_example_component_fini(void)
  91 {
  92     return OMPI_SUCCESS;
  93 }
  94