summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_attr_vlen.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-12 22:07:15 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-12 22:07:15 (GMT)
commit037bad4f7220b88de5ff3b74c205ea1d790290d5 (patch)
tree2905ac4ed7436be5be6a4c8225132e56bb5dfc08 /test/ttsafe_attr_vlen.c
parent7dcd7830ae11634e92113e0d50ea201ebd79a7de (diff)
downloadhdf5-037bad4f7220b88de5ff3b74c205ea1d790290d5.zip
hdf5-037bad4f7220b88de5ff3b74c205ea1d790290d5.tar.gz
hdf5-037bad4f7220b88de5ff3b74c205ea1d790290d5.tar.bz2
Fixes Windows issues due to exposed pthread code
Diffstat (limited to 'test/ttsafe_attr_vlen.c')
-rw-r--r--test/ttsafe_attr_vlen.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/ttsafe_attr_vlen.c b/test/ttsafe_attr_vlen.c
index b07e362..2b94167 100644
--- a/test/ttsafe_attr_vlen.c
+++ b/test/ttsafe_attr_vlen.c
@@ -54,7 +54,7 @@ void *tts_attr_vlen_thread(void *);
void
tts_attr_vlen(void)
{
- pthread_t threads[NUM_THREADS] = {0}; /* Thread declaration */
+ H5TS_thread_t threads[NUM_THREADS] = {0}; /* Thread declaration */
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t gid = H5I_INVALID_HID; /* Group ID */
hid_t atid = H5I_INVALID_HID; /* Datatype ID for attribute */
@@ -106,12 +106,15 @@ tts_attr_vlen(void)
CHECK(ret, H5I_INVALID_HID, "H5Tclose");
/* Start multiple threads and execute tts_attr_vlen_thread() for each thread */
- for(i = 0; i < NUM_THREADS; i++)
- pthread_create(&threads[i], NULL, tts_attr_vlen_thread, NULL);
+ for(i = 0; i < NUM_THREADS; i++) {
+ threads[i] = H5TS_create_thread(tts_attr_vlen_thread, NULL, NULL);
+ }
+ //pthread_create(&threads[i], NULL, tts_attr_vlen_thread, NULL);
/* Wait for the threads to end */
for(i = 0; i < NUM_THREADS; i++)
- pthread_join(threads[i], NULL);
+ H5TS_wait_for_thread(threads[i]);
+ //pthread_join(threads[i], NULL);
} /* end tts_attr_vlen() */