summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS8
-rw-r--r--src/H5TS.c81
-rw-r--r--tools/src/h5ls/h5ls.c5
-rw-r--r--tools/test/h5dump/h5dumpgentest.c2
4 files changed, 62 insertions, 34 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 97b7428..c807e75 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -13,7 +13,7 @@ CMakeTests.* @byrnHDF @derobins
/bin/ @lrknox @derobins @qkoziol
-/c++/ @bmribler @byrnHDF
+/c++/ @bmribler @byrnHDF @derobins
/config/ @lrknox @derobins @qkoziol @byrnHDF
@@ -23,7 +23,7 @@ CMakeTests.* @byrnHDF @derobins
/fortran/ @brtnfld @epourmal
-/hl/ @bmribler @byrnHDF
+/hl/ @bmribler @byrnHDF @derobins
/java/ @jhendersonHDF @byrnHDF
@@ -37,6 +37,6 @@ CMakeTests.* @byrnHDF @derobins
/testpar/ @jhendersonHDF @rawarren @jrmainzer @qkoziol
-/tools/ @byrnHDF @bmribler
+/tools/ @byrnHDF @bmribler @derobins
-/utils/ @lrknox @byrnHDF
+/utils/ @lrknox @byrnHDF @derobins
diff --git a/src/H5TS.c b/src/H5TS.c
index 90b1244..258c9df 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -12,13 +12,13 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Purpose: This file contains the framework for ensuring that the global
- * library lock is held when an API routine is called. This
+ * Purpose: This file contains the framework for ensuring that the global
+ * library lock is held when an API routine is called. This
* framework works in concert with the FUNC_ENTER_API / FUNC_LEAVE_API
- * macros defined in H5private.h.
+ * macros defined in H5private.h.
*
- * Note: Because this threadsafety framework operates outside the library,
- * it does not use the error stack and only uses the "namecheck only"
+ * Note: Because this threadsafety framework operates outside the library,
+ * it does not use the error stack and only uses the "namecheck only"
* FUNC_ENTER_* / FUNC_LEAVE_* macros.
*/
@@ -70,23 +70,45 @@ static herr_t H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count);
/* Global variable definitions */
#ifdef H5_HAVE_WIN_THREADS
H5TS_once_t H5TS_first_init_g;
-#else /* H5_HAVE_WIN_THREADS */
-H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT;
-#endif /* H5_HAVE_WIN_THREADS */
+#else
+H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT;
+#endif
/* Thread-local keys, used by other interfaces */
-H5TS_key_t H5TS_errstk_key_g; /* Error stack */
+/* Error stack */
+#ifdef H5_HAVE_WIN_THREADS
+H5TS_key_t H5TS_errstk_key_g = TLS_OUT_OF_INDEXES;
+#else
+H5TS_key_t H5TS_errstk_key_g;
+#endif
+
#ifdef H5_HAVE_CODESTACK
-H5TS_key_t H5TS_funcstk_key_g; /* Function stack */
-#endif /* H5_HAVE_CODESTACK */
-H5TS_key_t H5TS_apictx_key_g; /* API context */
+/* Function stack */
+#ifdef H5_HAVE_WIN_THREADS
+H5TS_key_t H5TS_funcstk_key_g = TLS_OUT_OF_INDEXES;
+#else
+H5TS_key_t H5TS_funcstk_key_g;
+#endif
+#endif /* H5_HAVE_CODESTACK */
+
+/* API context */
+#ifdef H5_HAVE_WIN_THREADS
+H5TS_key_t H5TS_apictx_key_g = TLS_OUT_OF_INDEXES;
+#else
+H5TS_key_t H5TS_apictx_key_g;
+#endif
/*******************/
/* Local Variables */
/*******************/
/* Thread-local keys, used in this module */
-static H5TS_key_t H5TS_cancel_key_s; /* Thread cancellation state */
+/* Thread cancellation state */
+#ifdef H5_HAVE_WIN_THREADS
+static H5TS_key_t H5TS_cancel_key_s = TLS_OUT_OF_INDEXES;
+#else
+static H5TS_key_t H5TS_cancel_key_s;
+#endif
#ifndef H5_HAVE_WIN_THREADS
@@ -871,11 +893,14 @@ H5TS_win32_process_exit(void)
DeleteCriticalSection(&H5_g.init_lock.CriticalSection);
/* Clean up per-process thread local storage */
- TlsFree(H5TS_errstk_key_g);
+ if (H5TS_errstk_key_g != TLS_OUT_OF_INDEXES)
+ TlsFree(H5TS_errstk_key_g);
#ifdef H5_HAVE_CODESTACK
- TlsFree(H5TS_funcstk_key_g);
+ if (H5TS_funcstk_key_g != TLS_OUT_OF_INDEXES)
+ TlsFree(H5TS_funcstk_key_g);
#endif /* H5_HAVE_CODESTACK */
- TlsFree(H5TS_apictx_key_g);
+ if (H5TS_apictx_key_g != TLS_OUT_OF_INDEXES)
+ TlsFree(H5TS_apictx_key_g);
FUNC_LEAVE_NOAPI_VOID_NAMECHECK_ONLY
} /* H5TS_win32_process_exit() */
@@ -909,19 +934,25 @@ H5TS_win32_thread_exit(void)
*/
/* Clean up per-thread thread local storage */
- lpvData = TlsGetValue(H5TS_errstk_key_g);
- if (lpvData)
- LocalFree((HLOCAL)lpvData);
+ if (H5TS_errstk_key_g != TLS_OUT_OF_INDEXES) {
+ lpvData = TlsGetValue(H5TS_errstk_key_g);
+ if (lpvData)
+ LocalFree((HLOCAL)lpvData);
+ }
#ifdef H5_HAVE_CODESTACK
- lpvData = TlsGetValue(H5TS_funcstk_key_g);
- if (lpvData)
- LocalFree((HLOCAL)lpvData);
+ if (H5TS_funcstk_key_g != TLS_OUT_OF_INDEXES) {
+ lpvData = TlsGetValue(H5TS_funcstk_key_g);
+ if (lpvData)
+ LocalFree((HLOCAL)lpvData);
+ }
#endif /* H5_HAVE_CODESTACK */
- lpvData = TlsGetValue(H5TS_apictx_key_g);
- if (lpvData)
- LocalFree((HLOCAL)lpvData);
+ if (H5TS_apictx_key_g != TLS_OUT_OF_INDEXES) {
+ lpvData = TlsGetValue(H5TS_apictx_key_g);
+ if (lpvData)
+ LocalFree((HLOCAL)lpvData);
+ }
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* H5TS_win32_thread_exit() */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 64003e7..09bc323 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -530,10 +530,7 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "native hbool_t");
}
else {
- if (H5T_FLOAT == H5Tget_class(type))
- return print_float_type(buffer, type, ind);
- else
- return print_int_type(buffer, type, ind);
+ return print_int_type(buffer, type, ind);
}
}
else {
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 15d3eef..5507ede 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -6356,7 +6356,7 @@ gent_ldouble_scalar(void)
if ((sid = H5Screate(H5S_SCALAR)) < 0)
goto error;
- if ((tid = H5Tarray_create(H5T_NATIVE_LDOUBLE, 1, dims)) < 0)
+ if ((tid = H5Tarray_create2(H5T_NATIVE_LDOUBLE, 1, dims)) < 0)
goto error;
if (H5Tget_size(tid) == 0)