diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2008-06-06 19:11:46 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2008-06-06 19:11:46 (GMT) |
commit | 259d1afce9bca2f7dfada3bd396e7f804bb3c1a6 (patch) | |
tree | b2c754200c341f52256a3b3c45924bf38d3c3769 /src/H5CS.c | |
parent | ba9abd20069ec92af1b25ff1a5ea9b88d84462b8 (diff) | |
download | hdf5-259d1afce9bca2f7dfada3bd396e7f804bb3c1a6.zip hdf5-259d1afce9bca2f7dfada3bd396e7f804bb3c1a6.tar.gz hdf5-259d1afce9bca2f7dfada3bd396e7f804bb3c1a6.tar.bz2 |
[svn-r15165] Purpose: Create new HDpthread_self and HDpthread_self_ulong macros
Description:
On Windows, the pthread_self function cannot be used to print the returned thread ID for debugging. Instead, we need a separate function, GetCurrentThreadId. To eliminate some Windows ifdef's in the code, we create two new function macros which can be used by all platforms. It is conditionally defined in H5win32defs.h, and globally in H5private.h.
Tested:
VS2005 w/ pthreads on WinXP
kagiso w/ pthreads
Diffstat (limited to 'src/H5CS.c')
-rw-r--r-- | src/H5CS.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -135,7 +135,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 %d.", (int)pthread_self()); + HDfprintf (stream, "thread %lu.", HDpthread_self_ulong()); #else /* H5_HAVE_THREADSAFE */ HDfprintf (stream, "thread 0."); #endif /* H5_HAVE_THREADSAFE */ |