summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/H5Pget_metadata_read_attempts.1.c
diff options
context:
space:
mode:
Diffstat (limited to 'doxygen/examples/H5Pget_metadata_read_attempts.1.c')
-rw-r--r--doxygen/examples/H5Pget_metadata_read_attempts.1.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/doxygen/examples/H5Pget_metadata_read_attempts.1.c b/doxygen/examples/H5Pget_metadata_read_attempts.1.c
new file mode 100644
index 0000000..da325c0
--- /dev/null
+++ b/doxygen/examples/H5Pget_metadata_read_attempts.1.c
@@ -0,0 +1,22 @@
+/* Get a copy of file access property list */
+fapl = H5Pcreate(H5P_FILE_ACCESS);
+
+/* Retrieve the # of read attempts from the file access property list */
+H5Pget_metadata_read_attempts(fapl, &attempts);
+
+/*
+ * The value returned in "attempts" will be 1 (default for non-SWMR access).
+ */
+
+/* Set the # of read attempts to 20 */
+H5Pset_metadata_read_attempts(fapl, 20);
+
+/* Retrieve the # of read attempts from the file access property list */
+H5Pget_metadata_read_attempts(fapl, &attempts);
+
+/*
+ * The value returned in "attempts" will be 20 as set.
+ */
+
+/* Close the property list */
+H5Pclose(fapl);