summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/H5Pget_metadata_read_attempts.3.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-05-26 16:53:05 (GMT)
committerGitHub <noreply@github.com>2021-05-26 16:53:05 (GMT)
commita0968ce775096e83602c7cacb419d3565041fa60 (patch)
treeb861c812113ec11e3b2225cc1b980dccec62a011 /doxygen/examples/H5Pget_metadata_read_attempts.3.c
parent5e9e8ff598e6af721459db59aea8b2a9b489d4ec (diff)
downloadhdf5-a0968ce775096e83602c7cacb419d3565041fa60.zip
hdf5-a0968ce775096e83602c7cacb419d3565041fa60.tar.gz
hdf5-a0968ce775096e83602c7cacb419d3565041fa60.tar.bz2
Hdf5 1 10 doxygen merges (#684)
* HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'doxygen/examples/H5Pget_metadata_read_attempts.3.c')
-rw-r--r--doxygen/examples/H5Pget_metadata_read_attempts.3.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/doxygen/examples/H5Pget_metadata_read_attempts.3.c b/doxygen/examples/H5Pget_metadata_read_attempts.3.c
new file mode 100644
index 0000000..4b5ea3a
--- /dev/null
+++ b/doxygen/examples/H5Pget_metadata_read_attempts.3.c
@@ -0,0 +1,44 @@
+/* Open the file with non-SWMR access and default file access property list */
+fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+
+/* Get the file's file access roperty list */
+file_fapl = H5Fget_access_plist(fid);
+
+/* Retrieve the # of read attempts from the file's file access property list */
+H5Pget_metadata_read_attempts(file_fapl, &attempts);
+
+/*
+ * The value returned in "attempts" will be 1 (default for non-SWMR access).
+ */
+
+/* Close the property list */
+H5Pclose(file_fapl);
+
+/* Close the file */
+H5Fclose(fid);
+
+/* Create a copy of file access property list */
+fapl = H5Pcreate(H5P_FILE_ACCESS);
+
+/* Set the # of read attempts */
+H5Pset_metadata_read_attempts(fapl, 20);
+
+/* Open the file with non-SWMR access and the non-default file access property list */
+fid = H5Fopen(FILE, H5F_ACC_RDONLY, fapl);
+
+/* Get the file's file access roperty list */
+file_fapl = H5Fget_access_plist(fid);
+
+/* Retrieve the # of read attempts from the file's file access property list */
+H5Pget_metadata_read_attempts(file_fapl, &attempts);
+
+/*
+ * The value returned in "attempts" will be 1 (default for non-SWMR access).
+ */
+
+/* Close the property lists */
+H5Pclose(file_fapl);
+H5Pclose(fapl);
+
+/* Close the file */
+H5Fclose(fid);