summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-03-25 21:31:06 (GMT)
committerGitHub <noreply@github.com>2022-03-25 21:31:06 (GMT)
commit15971fbd160ab061725f238379cc638ed37f05ef (patch)
tree1be26bd1be27c67ba674ddc39611d68959c3c207 /src/H5private.h
parentf73b4c618cb680f8be9b2f2510c34442ec24d713 (diff)
downloadhdf5-15971fbd160ab061725f238379cc638ed37f05ef.zip
hdf5-15971fbd160ab061725f238379cc638ed37f05ef.tar.gz
hdf5-15971fbd160ab061725f238379cc638ed37f05ef.tar.bz2
Hdf5 1 12 merges (#1528)
* Use internal version of H5Eprint2 to avoid possible stack overflow (#661) * Add support for parallel filters to h5repack (#832) * Allow parallel filters feature for comm size of 1 (#840) * Avoid popping API context when one wasn't pushed (#848) * Fix several warnings (#720) * Don't allow H5Pset(get)_all_coll_metadata_ops for DXPLs (#1201) * Fix free list tracking and cleanup cast alignment warnings (#1288) * Fix free list tracking and cleanup cast alignment warnings * Add free list tracking code to H5FL 'arr' routines * Fix usage of several HDfprintf format specifiers after HDfprintf removal (#1324) * Use appropriate printf format specifiers for haddr_t and hsize_t types directly (#1340) * Fix H5ACmpio dirty bytes creation debugging (#1357) * Fix documentation for H5D_space_status_t enum values (#1372) * Parallel rank0 deadlock fixes (#1183) * Fix several places where rank 0 can skip past collective MPI operations on failure * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix a few issues noted by LGTM (#1421) * Fix cache sanity checking code by moving functions to wider scope (#1435) * Fix metadata cache bug when resizing a pinned/protected entry (v2) (#1463) * Disable memory alloc sanity checks by default for Autotools debug builds (#1468) * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 88b4e31..b0b5477 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2168,6 +2168,8 @@ H5_DLL herr_t H5CX_pop(void);
/* Push the API context */ \
if (H5CX_push() < 0) \
HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \
+ else \
+ api_ctx_pushed = TRUE; \
\
BEGIN_MPE_LOG
@@ -2175,6 +2177,8 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_API(err) \
{ \
{ \
+ hbool_t api_ctx_pushed = FALSE; \
+ \
FUNC_ENTER_API_COMMON \
FUNC_ENTER_API_INIT(err); \
FUNC_ENTER_API_PUSH(err); \
@@ -2189,6 +2193,8 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_API_NOCLEAR(err) \
{ \
{ \
+ hbool_t api_ctx_pushed = FALSE; \
+ \
FUNC_ENTER_API_COMMON \
FUNC_ENTER_API_INIT(err); \
FUNC_ENTER_API_PUSH(err); \
@@ -2416,14 +2422,17 @@ H5_DLL herr_t H5CX_pop(void);
H5_API_SET_CANCEL
#define FUNC_LEAVE_API_COMMON(ret_value) \
- ; \
- } /*end scope from end of FUNC_ENTER*/ \
FINISH_MPE_LOG \
H5TRACE_RETURN(ret_value);
#define FUNC_LEAVE_API(ret_value) \
+ ; \
+ } /*end scope from end of FUNC_ENTER*/ \
FUNC_LEAVE_API_COMMON(ret_value); \
- (void)H5CX_pop(); \
+ if (api_ctx_pushed) { \
+ (void)H5CX_pop(); \
+ api_ctx_pushed = FALSE; \
+ } \
H5_POP_FUNC \
if (err_occurred) \
(void)H5E_dump_api_stack(TRUE); \
@@ -2434,6 +2443,8 @@ H5_DLL herr_t H5CX_pop(void);
/* Use this macro to match the FUNC_ENTER_API_NOINIT macro */
#define FUNC_LEAVE_API_NOINIT(ret_value) \
+ ; \
+ } /*end scope from end of FUNC_ENTER*/ \
FUNC_LEAVE_API_COMMON(ret_value); \
H5_POP_FUNC \
if (err_occurred) \
@@ -2446,6 +2457,8 @@ H5_DLL herr_t H5CX_pop(void);
/* Use this macro to match the FUNC_ENTER_API_NOINIT_NOERR_NOFS macro */
#define FUNC_LEAVE_API_NOFS(ret_value) \
+ ; \
+ } /*end scope from end of FUNC_ENTER*/ \
FUNC_LEAVE_API_COMMON(ret_value); \
FUNC_LEAVE_API_THREADSAFE \
return (ret_value); \