summaryrefslogtreecommitdiffstats
path: root/src/H5TSprivate.h
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-03 17:59:14 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-02-03 17:59:14 (GMT)
commit986c7451a03aa8d54ce3b57ffd2e394665d360cc (patch)
treef026b4f18a17976c4f2072f5082bfa2654547b06 /src/H5TSprivate.h
parent0147d2493eed235ba31077a6da38608ce2fe152a (diff)
downloadhdf5-986c7451a03aa8d54ce3b57ffd2e394665d360cc.zip
hdf5-986c7451a03aa8d54ce3b57ffd2e394665d360cc.tar.gz
hdf5-986c7451a03aa8d54ce3b57ffd2e394665d360cc.tar.bz2
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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 9e093a6..76cf8f1 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() ((unsigned long)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 unsigned long H5TS_thread_id(void);
#endif /* H5_HAVE_WIN_THREADS */