summaryrefslogtreecommitdiffstats
path: root/test/ttsafe.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 /test/ttsafe.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 'test/ttsafe.c')
-rw-r--r--test/ttsafe.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 1fadd95..253470b 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -89,11 +89,14 @@ int main(int argc, char *argv[])
/* Initialize testing framework */
TestInit(argv[0], NULL, NULL);
- /* Tests are generally arranged from least to most complexity... */
- AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL);
- AddTest("error", tts_error, cleanup_error, "per-thread error stacks", NULL);
- AddTest("cancel", tts_cancel, cleanup_cancel, "thread cancellation safety test", NULL);
- AddTest("acreate", tts_acreate, cleanup_acreate, "multi-attribute creation", NULL);
+ /* Tests are generally arranged from least to most complexity... */
+ AddTest("dcreate", tts_dcreate, cleanup_dcreate, "multi-dataset creation", NULL);
+ AddTest("error", tts_error, cleanup_error, "per-thread error stacks", NULL);
+#ifdef H5_HAVE_PTHREAD_H
+ /* Thread cancellability only supported with pthreads ... */
+ AddTest("cancel", tts_cancel, cleanup_cancel, "thread cancellation safety test", NULL);
+#endif /* H5_HAVE_PTHREAD_H */
+ AddTest("acreate", tts_acreate, cleanup_acreate, "multi-attribute creation", NULL);
/* Display testing information */
TestInfo(argv[0]);