summaryrefslogtreecommitdiffstats
path: root/src/H5CS.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-05 19:34:00 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-02-05 19:34:00 (GMT)
commit00608a8756330fc387cde90c397562103c857671 (patch)
tree53b8017bdaf1c30e8926d4f923771a72f6c0372f /src/H5CS.c
parent7ab0fa2d7c3b23e1e6dfd9f33833f5ac536ee9fb (diff)
parentcefacee21b5ad569e2394b32793648e1b80f3d6b (diff)
downloadhdf5-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/H5CS.c')
-rw-r--r--src/H5CS.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/H5CS.c b/src/H5CS.c
index 0a3dcce..3fccce4 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -145,11 +145,7 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
HDfprintf(stream, "HDF5-DIAG: Function stack from %s ", H5_lib_vers_info_g);
/* try show the process or thread id in multiple processes cases*/
-#ifdef H5_HAVE_THREADSAFE
- HDfprintf(stream, "thread %lu.", HDpthread_self_ulong());
-#else /* H5_HAVE_THREADSAFE */
- HDfprintf(stream, "thread 0.");
-#endif /* H5_HAVE_THREADSAFE */
+ HDfprintf(stream, "thread %" PRIu64 ".", H5TS_thread_id());
if(fstack && fstack->nused>0)
HDfprintf(stream, " Back trace follows.");
HDfputc('\n', stream);