diff options
author | Gerd Heber <gheber@hdfgroup.org> | 2020-11-18 15:06:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 15:06:01 (GMT) |
commit | 0a06b9a8690f6c968c036142fd1b1a83cbcd7617 (patch) | |
tree | 73e4b095ef9b1ea5f3ec9ad1a450bc193f8c75f8 /src/H5.c | |
parent | a50d211755cb272b2e468144e7d892a4c90813c4 (diff) | |
download | hdf5-0a06b9a8690f6c968c036142fd1b1a83cbcd7617.zip hdf5-0a06b9a8690f6c968c036142fd1b1a83cbcd7617.tar.gz hdf5-0a06b9a8690f6c968c036142fd1b1a83cbcd7617.tar.bz2 |
First cut of the H5 public API documentation. (#80)
* First cut of the H5 public API documentation.
* Added H5Z "bonus track."
* Applied Quincey's patch.
* Added the missing patches from Quincey's original patch.
* H5PL (complete) and basic H5VL API documentation.
* Added H5I API docs.
* Added H5L API docs.
* First installment from Elena's H5T batch.
* Second installment of Elena's H5T batch.
* Final installment of Elena's H5T batch.
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -14,6 +14,7 @@ /****************/ /* Module Setup */ /****************/ +#include "H5module.h" /* This source code file is part of the H5 module */ /***********/ /* Headers */ @@ -55,6 +56,9 @@ static int H5__mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *fla /* Package Variables */ /*********************/ +/* Package initialization variable */ +hbool_t H5_PKG_INIT_VAR = FALSE; + /*****************************/ /* Library Private Variables */ /*****************************/ @@ -85,6 +89,33 @@ H5_debug_t H5_debug_g; /* debugging info */ /*******************/ /*-------------------------------------------------------------------------- +NAME + H5__init_package -- Initialize interface-specific information +USAGE + herr_t H5__init_package() +RETURNS + Non-negative on success/Negative on failure +DESCRIPTION + Initializes any interface-specific data or routines. +--------------------------------------------------------------------------*/ +herr_t +H5__init_package(void) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* Run the library initialization routine, if it hasn't already ran */ + if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) { \ + if (H5_init_library() < 0) + HGOTO_ERROR(H5E_LIB, H5E_CANTINIT, FAIL, "unable to initialize library") + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5__init_package() */ + +/*-------------------------------------------------------------------------- * NAME * H5_init_library -- Initialize library-global information * USAGE @@ -103,6 +134,11 @@ H5_init_library(void) { herr_t ret_value = SUCCEED; + /* Set the 'library initialized' flag as early as possible, to avoid + * possible re-entrancy. + */ + H5_INIT_GLOBAL = TRUE; \ + FUNC_ENTER_NOAPI(FAIL) #ifdef H5_HAVE_PARALLEL |