root/opal/mca/pmix/pmix4x/pmix/src/mca/psec/base/psec_base_frame.c

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

DEFINITIONS

This source file includes following definitions.
  1. pmix_psec_close
  2. pmix_psec_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-2017 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/psec/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/psec/base/static-components.h"
  45 
  46 /* Instantiate the global vars */
  47 pmix_psec_globals_t pmix_psec_globals = {{{0}}};
  48 
  49 static pmix_status_t pmix_psec_close(void)
  50 {
  51   pmix_psec_base_active_module_t *active, *prev;
  52 
  53     if (!pmix_psec_globals.initialized) {
  54         return PMIX_SUCCESS;
  55     }
  56     pmix_psec_globals.initialized = false;
  57 
  58     PMIX_LIST_FOREACH_SAFE(active, prev, &pmix_psec_globals.actives, pmix_psec_base_active_module_t) {
  59       pmix_list_remove_item(&pmix_psec_globals.actives, &active->super);
  60       if (NULL != active->component->finalize) {
  61         active->component->finalize();
  62       }
  63       PMIX_RELEASE(active);
  64     }
  65     PMIX_DESTRUCT(&pmix_psec_globals.actives);
  66 
  67     return pmix_mca_base_framework_components_close(&pmix_psec_base_framework, NULL);
  68 }
  69 
  70 static pmix_status_t pmix_psec_open(pmix_mca_base_open_flag_t flags)
  71 {
  72     /* initialize globals */
  73     pmix_psec_globals.initialized = true;
  74     PMIX_CONSTRUCT(&pmix_psec_globals.actives, pmix_list_t);
  75 
  76     /* Open up all available components */
  77     return pmix_mca_base_framework_components_open(&pmix_psec_base_framework, flags);
  78 }
  79 
  80 PMIX_MCA_BASE_FRAMEWORK_DECLARE(pmix, psec, "PMIx Security Operations",
  81                                 NULL, pmix_psec_open, pmix_psec_close,
  82                                 mca_psec_base_static_components, 0);
  83 
  84 PMIX_CLASS_INSTANCE(pmix_psec_base_active_module_t,
  85                     pmix_list_item_t,
  86                     NULL, NULL);

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