diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-07-20 21:26:15 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-07-20 21:26:15 (GMT) |
commit | 9dfeb4020c7a4c4cf384899d3768440078b266b9 (patch) | |
tree | 500e2f4a267f98e52d5a13e92ce84fa69056ef73 /src/H5TSprivate.h | |
parent | 09c266186d68e78055ba05d509e28ffe1589a27a (diff) | |
parent | aecefbb2f5737890a27dcfd2ef20276d2ff88b2a (diff) | |
download | hdf5-9dfeb4020c7a4c4cf384899d3768440078b266b9.zip hdf5-9dfeb4020c7a4c4cf384899d3768440078b266b9.tar.gz hdf5-9dfeb4020c7a4c4cf384899d3768440078b266b9.tar.bz2 |
Merge pull request #2704 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:1_10_normalization to hdf5_1_10
* commit 'aecefbb2f5737890a27dcfd2ef20276d2ff88b2a':
Corrected missing H5CS thread-safety change.
Brought over thread-safety changes from develop.
Diffstat (limited to 'src/H5TSprivate.h')
-rw-r--r-- | src/H5TSprivate.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index 9e093a6..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 */ @@ -68,7 +69,7 @@ H5_DLL void H5TS_win32_process_exit(void); H5_DLL herr_t H5TS_win32_thread_enter(void); H5_DLL herr_t H5TS_win32_thread_exit(void); - +#define H5TS_thread_id() ((uint64_t)GetCurrentThreadId()) #else /* H5_HAVE_WIN_THREADS */ @@ -102,6 +103,7 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_mutex_init(mutex) pthread_mutex_init(mutex, NULL) #define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex) #define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex) +H5_DLL uint64_t H5TS_thread_id(void); #endif /* H5_HAVE_WIN_THREADS */ @@ -127,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_ */ |