root/ompi/mca/bml/base/base.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. mca_bml_base_get_endpoint

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2006 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2006 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2015      Los Alamos National Security, LLC.  All rights
  15  *                         reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #ifndef MCA_BML_BASE_H
  24 #define MCA_BML_BASE_H
  25 
  26 #include "ompi_config.h"
  27 
  28 #include "ompi/mca/mca.h"
  29 #include "opal/mca/base/mca_base_framework.h"
  30 #include "ompi/mca/bml/bml.h"
  31 #include "ompi/proc/proc.h"
  32 
  33 
  34 /*
  35  * Global functions for the BML
  36  */
  37 
  38 BEGIN_C_DECLS
  39 
  40 struct mca_bml_base_selected_module_t {
  41     opal_list_item_t super;
  42     mca_bml_base_component_t *bml_component;
  43     mca_bml_base_module_t *bml_module;
  44 };
  45 typedef struct mca_bml_base_selected_module_t mca_bml_base_selected_module_t;
  46 
  47 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_selected_module_t);
  48 
  49 /*
  50  * Global functions for MCA: overall BTL open and close
  51  */
  52 
  53 OMPI_DECLSPEC  int mca_bml_base_init(bool enable_progress_threads,
  54                                      bool enable_mpi_threads);
  55 OMPI_DECLSPEC  bool mca_bml_base_inited(void);
  56 
  57 OMPI_DECLSPEC  int mca_bml_base_ft_event(int state);
  58 
  59 
  60 /*
  61  * Globals
  62  */
  63 OMPI_DECLSPEC extern mca_bml_base_component_t mca_bml_component;
  64 OMPI_DECLSPEC extern mca_bml_base_module_t mca_bml;
  65 OMPI_DECLSPEC extern mca_base_framework_t ompi_bml_base_framework;
  66 OMPI_DECLSPEC extern opal_mutex_t mca_bml_lock;
  67 
  68 static inline struct mca_bml_base_endpoint_t *mca_bml_base_get_endpoint (struct ompi_proc_t *proc) {
  69     if (OPAL_UNLIKELY(NULL == proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML])) {
  70         OPAL_THREAD_LOCK(&mca_bml_lock);
  71         if (NULL == proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]) {
  72             mca_bml.bml_add_proc (proc);
  73         }
  74         OPAL_THREAD_UNLOCK(&mca_bml_lock);
  75     }
  76 
  77     return (struct mca_bml_base_endpoint_t *) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML];
  78 }
  79 
  80 
  81 END_C_DECLS
  82 #endif /* MCA_BML_BASE_H */

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