diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /test/ttsafe_cancel.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/ttsafe_cancel.c')
-rw-r--r-- | test/ttsafe_cancel.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index 0323d5f..22e2cb3 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -64,46 +64,46 @@ tts_cancel(void) /* make thread scheduling global */ ret = pthread_attr_init(&attribute); - HDassert(ret == 0); + assert(ret == 0); #ifdef H5_HAVE_SYSTEM_SCOPE_THREADS ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - HDassert(ret == 0); + assert(ret == 0); #endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* Initialize mutex & condition variables */ ret = pthread_mutex_init(&mutex, NULL); - HDassert(ret == 0); + assert(ret == 0); ret = pthread_cond_init(&cond, NULL); - HDassert(ret == 0); + assert(ret == 0); /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file * creation plist and default file access plist */ cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(cancel_file >= 0); + assert(cancel_file >= 0); ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL); - HDassert(ret == 0); + assert(ret == 0); tts_cancel_barrier(); ret = pthread_cancel(childthread); - HDassert(ret == 0); + assert(ret == 0); dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT); - HDassert(dataset >= 0); + assert(dataset >= 0); ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); - HDassert(ret >= 0); + assert(ret >= 0); if (buffer != 11) TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer); ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(cancel_file); - HDassert(ret >= 0); + assert(ret >= 0); /* Destroy the thread attribute */ ret = pthread_attr_destroy(&attribute); - HDassert(ret == 0); + assert(ret == 0); } /* end tts_cancel() */ void * @@ -135,7 +135,7 @@ tts_cancel_thread(void H5_ATTR_UNUSED *arg) CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2"); /* If thread is cancelled, make cleanup call */ - cleanup_structure = (cancel_cleanup_t *)HDmalloc(sizeof(cancel_cleanup_t)); + cleanup_structure = (cancel_cleanup_t *)malloc(sizeof(cancel_cleanup_t)); cleanup_structure->dataset = dataset; cleanup_structure->datatype = datatype; cleanup_structure->dataspace = dataspace; |