summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-05 22:47:55 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:54 (GMT)
commit25f69a687afe6d426cb8bccfffaca6eb1bfeea61 (patch)
tree283738a9c2f08e39aead2c2a2c2aafa10897d202
parentcc57aa73c862ad82f3f4d96f70fa5de96bcedd86 (diff)
downloadhdf5-25f69a687afe6d426cb8bccfffaca6eb1bfeea61.zip
hdf5-25f69a687afe6d426cb8bccfffaca6eb1bfeea61.tar.gz
hdf5-25f69a687afe6d426cb8bccfffaca6eb1bfeea61.tar.bz2
If H5_HAVE_THREADSAFE is not #defined, define nothing but a stub implementation
of H5TS_thread_id().
-rw-r--r--src/H5TSprivate.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index f22ed52..887f001 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -26,6 +26,7 @@
#ifndef H5TSprivate_H_
#define H5TSprivate_H_
+#ifdef H5_HAVE_THREADSAFE
/* Public headers needed by this file */
#ifdef LATER
#include "H5TSpublic.h" /*Public API prototypes */
@@ -128,5 +129,11 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t * att
}
#endif /* c_plusplus || __cplusplus */
+#else /* H5_HAVE_THREADSAFE */
+
+#define H5TS_thread_id() ((uint64_t)0)
+
+#endif /* H5_HAVE_THREADSAFE */
+
#endif /* H5TSprivate_H_ */