summaryrefslogtreecommitdiffstats
path: root/src/H5CS.c
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2010-09-10 16:15:34 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2010-09-10 16:15:34 (GMT)
commitb7c2d18029df6d724e44b74c8f49bb7aa1e2f02b (patch)
treec3dd326b9b8ed4746b57165165713ae9b046c62b /src/H5CS.c
parent47c792faa033c4c149b2c5d4dd0e70e4f2b0e3d2 (diff)
downloadhdf5-b7c2d18029df6d724e44b74c8f49bb7aa1e2f02b.zip
hdf5-b7c2d18029df6d724e44b74c8f49bb7aa1e2f02b.tar.gz
hdf5-b7c2d18029df6d724e44b74c8f49bb7aa1e2f02b.tar.bz2
[svn-r19367] Purpose:
Add windows threads support to HDF5. Description: Added calls to the windows threads library to the H5TS layer, and wrapped most calls to either pthreads or windows threads library with portable H5TS-style defines. Modified tests to use portable function definitions as well. This can be configured via CMake with the HDF5_ENABLE_THREADSAFE option, and should work on windows vista and later operating systems. Tested: h5committest, plus threadsafe with pthreads on jam and amani, and tested on a Windows Vista VM with threadsafe using windows threads.
Diffstat (limited to 'src/H5CS.c')
-rw-r--r--src/H5CS.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5CS.c b/src/H5CS.c
index dd80671..c033e7e 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -81,7 +81,7 @@ H5CS_get_stack(void)
FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_get_stack);
- fstack = pthread_getspecific(H5TS_funcstk_key_g);
+ fstack = H5TS_get_thread_local_value(H5TS_funcstk_key_g);
if (!fstack) {
/* no associated value with current thread - create one */
fstack = (H5CS_t *)HDmalloc(sizeof(H5CS_t)); /* Don't use H5MM_malloc() here, it causes infinite recursion */
@@ -94,7 +94,7 @@ H5CS_get_stack(void)
* released by the "key destructor" set up in the H5TS
* routines. See calls to pthread_key_create() in H5TS.c -QAK)
*/
- pthread_setspecific(H5TS_funcstk_key_g, (void *)fstack);
+ H5TS_set_thread_local_value(H5TS_funcstk_key_g, (void *)fstack);
}
FUNC_LEAVE_NOAPI_NOFS(fstack);