diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-05 19:34:00 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-02-05 19:34:00 (GMT) |
commit | 00608a8756330fc387cde90c397562103c857671 (patch) | |
tree | 53b8017bdaf1c30e8926d4f923771a72f6c0372f /src/H5TSprivate.h | |
parent | 7ab0fa2d7c3b23e1e6dfd9f33833f5ac536ee9fb (diff) | |
parent | cefacee21b5ad569e2394b32793648e1b80f3d6b (diff) | |
download | hdf5-00608a8756330fc387cde90c397562103c857671.zip hdf5-00608a8756330fc387cde90c397562103c857671.tar.gz hdf5-00608a8756330fc387cde90c397562103c857671.tar.bz2 |
Merge pull request #2341 in HDFFV/hdf5 from ~DYOUNG/werror:thread_id to develop
* commit 'cefacee21b5ad569e2394b32793648e1b80f3d6b':
src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
Change thread IDs to uint64_t from unsigned long, per Quincey's suggestion.
Add thread_id.c to the MANIFEST and the CMakeLists.txt per Allen's request.
Replace pthread_self_ulong() with H5TS_thread_id(). The POSIX Threads implementation ought to be portable to any system that has POSIX Threads. On Windows, I use the same API call as before.
Diffstat (limited to 'src/H5TSprivate.h')
-rw-r--r-- | src/H5TSprivate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index 9e093a6..f22ed52 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -68,7 +68,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 +102,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 */ |