root/opal/mca/pmix/pmix4x/pmix/src/mca/pshmem/base/pshmem_base_frame.c

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

DEFINITIONS

This source file includes following definitions.
  1. pmix_pshmem_close
  2. pmix_pshmem_open

   1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
   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-2009 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-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2012-2013 Los Alamos National Security, Inc.  All rights reserved.
  14  * Copyright (c) 2014-2018 Intel, Inc.  All rights reserved.
  15  * Copyright (c) 2015-2016 Research Organization for Information Science
  16  *                         and Technology (RIST). All rights reserved.
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 /** @file:
  24  *
  25  */
  26 #include <src/include/pmix_config.h>
  27 
  28 #include <pmix_common.h>
  29 
  30 #ifdef HAVE_STRING_H
  31 #include <string.h>
  32 #endif
  33 
  34 #include "src/class/pmix_list.h"
  35 #include "src/mca/base/base.h"
  36 #include "src/mca/pshmem/base/base.h"
  37 
  38 /*
  39  * The following file was created by configure.  It contains extern
  40  * statements and the definition of an array of pointers to each
  41  * component's public mca_base_component_t struct.
  42  */
  43 
  44 #include "src/mca/pshmem/base/static-components.h"
  45 
  46 static bool initialized = false;
  47 
  48 /* Instantiate the global vars */
  49 pmix_pshmem_base_module_t pmix_pshmem = {0};
  50 
  51 static pmix_status_t pmix_pshmem_close(void)
  52 {
  53     if (!initialized) {
  54         return PMIX_SUCCESS;
  55     }
  56     initialized = false;
  57 
  58     return pmix_mca_base_framework_components_close(&pmix_pshmem_base_framework, NULL);
  59 }
  60 
  61 static pmix_status_t pmix_pshmem_open(pmix_mca_base_open_flag_t flags)
  62 {
  63     if (initialized) {
  64         return PMIX_SUCCESS;
  65     }
  66     /* initialize globals */
  67     initialized = true;
  68 
  69     /* Open up all available components */
  70     return pmix_mca_base_framework_components_open(&pmix_pshmem_base_framework, flags);
  71 }
  72 
  73 PMIX_MCA_BASE_FRAMEWORK_DECLARE(pmix, pshmem, "PMIx Shared memory",
  74                                 NULL, pmix_pshmem_open, pmix_pshmem_close,
  75                                 mca_pshmem_base_static_components, 0);

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