diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-08-28 20:57:41 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-08-28 20:57:41 (GMT) |
commit | a31524e4aee50324ccbc6707584b1758279f984e (patch) | |
tree | bffd22d55739fd897b06ec9d3c9339fc1f1bd7c3 /src/H5.c | |
parent | 0286bb12de563c6aeb1b9d0c5be4afe717305477 (diff) | |
parent | 1847391fc51728811407f3e1586213758c1d0e89 (diff) | |
download | hdf5-a31524e4aee50324ccbc6707584b1758279f984e.zip hdf5-a31524e4aee50324ccbc6707584b1758279f984e.tar.gz hdf5-a31524e4aee50324ccbc6707584b1758279f984e.tar.bz2 |
[svn-r27607] merge from trunk.
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 47 |
1 files changed, 38 insertions, 9 deletions
@@ -21,17 +21,16 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5Lprivate.h" /* Links */ +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5Lprivate.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Tprivate.h" /* Datatypes */ +#include "H5Pprivate.h" /* Property lists */ #include "H5SLprivate.h" /* Skip lists */ - +#include "H5Tprivate.h" /* Datatypes */ /****************/ /* Local Macros */ @@ -973,6 +972,36 @@ H5free_memory(void *mem) } /* end H5free_memory() */ +/*------------------------------------------------------------------------- + * Function: H5is_library_threadsafe + * + * Purpose: Checks to see if the library was built with thread-safety + * enabled. + * + * Return: SUCCEED/FAIL + * + *------------------------------------------------------------------------- + */ +herr_t +H5is_library_threadsafe(hbool_t *is_ts) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_API_NOINIT + H5TRACE1("e", "*b", is_ts); + + HDassert(is_ts); + +#ifdef H5_HAVE_THREADSAFE + *is_ts = TRUE; +#else /* H5_HAVE_THREADSAFE */ + *is_ts = FALSE; +#endif /* H5_HAVE_THREADSAFE */ + + FUNC_LEAVE_API(ret_value) +} /* end H5is_library_threadsafe() */ + + #if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) \ && defined(H5_HAVE_WIN32_API) && defined(H5_HAVE_WIN_THREADS) /*------------------------------------------------------------------------- |