root/ompi/mca/vprotocol/base/vprotocol_base.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_vprotocol_base_open
  2. mca_vprotocol_base_set_include_list
  3. mca_vprotocol_base_close

   1 /*
   2  * Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
   3  *                         All rights reserved.
   4  * Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved.
   5  * Copyright (c) 2012-2013 Los Alamos National Security, Inc.  All rights reserved.
   6  * Copyright (c) 2015      Research Organization for Information Science
   7  *                         and Technology (RIST). All rights reserved.
   8  * $COPYRIGHT$
   9  *
  10  * Additional copyrights may follow
  11  *
  12  * $HEADER$
  13  */
  14 
  15 #include "ompi_config.h"
  16 #include "base.h"
  17 #include "ompi/mca/mca.h"
  18 #include "opal/mca/base/base.h"
  19 #include "ompi/mca/vprotocol/base/static-components.h"
  20 
  21 char *mca_vprotocol_base_include_list = NULL;
  22 mca_pml_v_t mca_pml_v = {-1, 0, 0};
  23 
  24 /* Load any vprotocol MCA component and call open function of all those
  25  * components.
  26  *
  27  * Also fill the mca_vprotocol_base_include_list with components that exists
  28  */
  29 
  30 static int mca_vprotocol_base_open(mca_base_open_flag_t flags)
  31 {
  32     if (NULL == mca_vprotocol_base_include_list) {
  33         return OMPI_SUCCESS;
  34     }
  35 
  36     return mca_base_framework_components_open(&ompi_vprotocol_base_framework, 0);
  37 }
  38 
  39 void mca_vprotocol_base_set_include_list(char *vprotocol_include_list)
  40 {
  41     mca_vprotocol_base_include_list = NULL;
  42 
  43     if (NULL != vprotocol_include_list && vprotocol_include_list[0] != '\0') {
  44         mca_vprotocol_base_include_list = strdup (vprotocol_include_list);
  45     }
  46 }
  47 
  48 /* Close and unload any vprotocol MCA component loaded.
  49  */
  50 static int mca_vprotocol_base_close(void)
  51 {
  52     if (NULL != mca_vprotocol_base_include_list) {
  53         free(mca_vprotocol_base_include_list);
  54     }
  55 
  56     return mca_base_framework_components_close(&ompi_vprotocol_base_framework, NULL);;
  57 }
  58 
  59 MCA_BASE_FRAMEWORK_DECLARE(ompi, vprotocol, "OMPI Vprotocol", NULL,
  60                            mca_vprotocol_base_open, mca_vprotocol_base_close,
  61                            mca_vprotocol_base_static_components, 0);
  62 

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