summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-12-21 00:50:01 (GMT)
committerGitHub <noreply@github.com>2022-12-21 00:50:01 (GMT)
commit777d9fc570f739e37e535f9d4ff35b8d9499f0e4 (patch)
tree838b96512108fdd7e891dd0dec95c14922520ed7 /src
parent35b6449c22edfad2af3b70094802215e4455b6e4 (diff)
downloadhdf5-777d9fc570f739e37e535f9d4ff35b8d9499f0e4.zip
hdf5-777d9fc570f739e37e535f9d4ff35b8d9499f0e4.tar.gz
hdf5-777d9fc570f739e37e535f9d4ff35b8d9499f0e4.tar.bz2
1.14.0: Brings the following changesets over from develop: (#2330)
* Brings the following changesets over from develop: b9244a85d9f1cc5e9bbec61ca73c0cbd9c4cf249 Align arg types of H5D_chunk_iter_op_t with H5Dget_chunk_info (#2074) 70cf2c390bc2eef8e57f8fa023341011e2d02d9d Removed idioms and misc. text clean-up (#2320) 8102fa8c972bdc0d8fd8f3dae604e070893150d6 Only document Fortran functions (#2319) 784061b15e176b9919c19a220ce278a9f4cddf0e moved onion VFD to FAPL group (#2321) 6b6bcdead66f0456ac0528683faac6a8e48b6565 Hdffv 11052 (#2315) 10c693a04ff0c4a5219879d7f8900157dcbece66 Update hdf5_header.html 0cb58080875070db09b5ecae92482519d58872bc Hdffv 11052 (#2303) a1c81eda203addced514ef655f7a9079f3f0bb04 added doc. warning for H5Literate_async return value (#2295) 502b32b0f22a4bcf6333c85c256db34162c2764a Updated H5ES documenation (#2293) a9036005c3916e6fda0296026323f00d043300f8 Fix for HDFFV-11052: h5debug fails on a corrupted file (h5_nrefs_POC)… (#2291) * Brings the following changes over from develop: c1e44d32e616518e0626bdfe042bed0052846fef Fix doxygen warnings and remove javadocs (#2324) 149b8e9769887c5b23400b526dc10463f88f2c3e Disable hl tools by default (#2313)
Diffstat (limited to 'src')
-rw-r--r--src/H5Amodule.h2
-rw-r--r--src/H5D.c16
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5Dpublic.h2
-rw-r--r--src/H5ESpublic.h10
-rw-r--r--src/H5FDonion.h8
-rw-r--r--src/H5Fint.c4
-rw-r--r--src/H5Gmodule.h2
-rw-r--r--src/H5Lpublic.h9
-rw-r--r--src/H5Tpublic.h2
-rw-r--r--src/H5VLconnector_passthru.h2
-rw-r--r--src/H5VLnative_file.c52
12 files changed, 63 insertions, 50 deletions
diff --git a/src/H5Amodule.h b/src/H5Amodule.h
index 7f88a22..4823d0d 100644
--- a/src/H5Amodule.h
+++ b/src/H5Amodule.h
@@ -363,7 +363,7 @@
* will be ignored by HDF5.
*
* The use of ASCII or UTF-8 characters is determined by the character encoding property. See
- * #H5Pset_char_encoding in the \ref RM.
+ * #H5Pset_char_encoding in the \ref RM.
*
* <h4>No Special I/O or Storage</h4>
*
diff --git a/src/H5D.c b/src/H5D.c
index d921356..006f4a9 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2515,18 +2515,18 @@ done:
*
* typedef int (*H5D_chunk_iter_op_t)(
* const hsize_t *offset,
- * uint32_t filter_mask,
+ * unsigned filter_mask,
* haddr_t addr,
- * uint32_t nbytes,
+ * hsize_t size,
* void *op_data);
*
* H5D_chunk_iter_op_t parameters:
- * hsize_t *offset; IN/OUT: Array of starting logical coordinates of chunk.
- * uint32_t filter_mask; IN: Filter mask of chunk.
- * haddr_t addr; IN: Offset in file of chunk data.
- * uint32_t nbytes; IN: Size in number of bytes of chunk data in file.
- * void *op_data; IN/OUT: Pointer to any user-defined data
- * associated with the operation.
+ * hsize_t *offset; IN/OUT: Logical position of the chunk’s first element in units of dataset
+ * elements
+ * unsigned filter_mask; IN: Bitmask indicating the filters used when the chunk was written haddr_t
+ * addr; IN: Chunk address in the file
+ * hsize_t; IN: Chunk size in bytes, 0 if the chunk does not exist
+ * void *op_data; IN/OUT: Pointer to any user-defined data associated with the operation.
*
* The return values from an operator are:
* Zero (H5_ITER_CONT) causes the iterator to continue, returning zero when all
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 40f8359..830560d 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -8278,8 +8278,8 @@ H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata)
FUNC_ENTER_PACKAGE_NOERR
/* Check for callback failure and pass along return value */
- if ((ret_value = (data->op)(offset, chunk_rec->filter_mask, chunk_rec->chunk_addr, chunk_rec->nbytes,
- data->op_data)) < 0)
+ if ((ret_value = (data->op)(offset, (unsigned)chunk_rec->filter_mask, chunk_rec->chunk_addr,
+ (hsize_t)chunk_rec->nbytes, data->op_data)) < 0)
HERROR(H5E_DATASET, H5E_CANTNEXT, "iteration operator failed");
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index ac76bc8..f7d208d 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -238,7 +238,7 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us
* \li A negative (#H5_ITER_ERROR) causes the iterator to immediately
* return that value, indicating failure.
*/
-typedef int (*H5D_chunk_iter_op_t)(const hsize_t *offset, uint32_t filter_mask, haddr_t addr, uint32_t size,
+typedef int (*H5D_chunk_iter_op_t)(const hsize_t *offset, unsigned filter_mask, haddr_t addr, hsize_t size,
void *op_data);
//! <!-- [H5D_chunk_iter_op_t_snip] -->
diff --git a/src/H5ESpublic.h b/src/H5ESpublic.h
index 3d46e82..ecfd08f 100644
--- a/src/H5ESpublic.h
+++ b/src/H5ESpublic.h
@@ -189,7 +189,7 @@ H5_DLL herr_t H5ESwait(hid_t es_id, uint64_t timeout, size_t *num_in_progress, h
* \param[out] err_occurred Status indicating if error is present in the event set
* \returns \herr_t
*
- * \details H5ESget_count() attempts to cancel operations in an event set specified
+ * \details H5EScancel() attempts to cancel operations in an event set specified
* by \p es_id. H5ES_NONE is a valid value for \p es_id, but functions as a no-op.
*
* \since 1.13.0
@@ -217,14 +217,14 @@ H5_DLL herr_t H5ESget_count(hid_t es_id, size_t *count);
/**
* \ingroup H5ES
*
- * \brief Retrieves the next operation counter to be assigned in an event set
+ * \brief Retrieves the accumulative operation counter for an event set
*
* \es_id
- * \param[out] counter The next counter value to be assigned to an event
+ * \param[out] counter The accumulative counter value for an event set
* \returns \herr_t
*
- * \details H5ESget_op_counter() retrieves the \p counter that will be assigned
- * to the next operation inserted into the event set \p es_id.
+ * \details H5ESget_op_counter() retrieves the current accumulative count of
+ * event set operations since the event set creation of \p es_id.
*
* \note This is designed for wrapper libraries mainly, to use as a mechanism
* for matching operations inserted into the event set with possible
diff --git a/src/H5FDonion.h b/src/H5FDonion.h
index 63c2d77..0e605d0 100644
--- a/src/H5FDonion.h
+++ b/src/H5FDonion.h
@@ -142,11 +142,11 @@ H5_DLL hid_t H5FD_onion_init(void);
/**
* --------------------------------------------------------------------------
- * \ingroup H5P
+ * \ingroup FAPL
*
* \brief get the onion info from the file access property list
*
- * \param[in] fapl_id The ID of the file access property list
+ * \fapl_id
* \param[out] fa_out The pointer to the structure H5FD_onion_fapl_info_t
*
* \return \herr_t
@@ -159,11 +159,11 @@ H5_DLL herr_t H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out);
/**
* --------------------------------------------------------------------------
- * \ingroup H5P
+ * \ingroup FAPL
*
* \brief set the onion info for the file access property list
*
- * \param[in] fapl_id The ID of the file access property list
+ * \fapl_id
* \param[in] fa The pointer to the structure H5FD_onion_fapl_info_t
*
* \return \herr_t
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 2c1b4b2..7ad35fc 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1615,7 +1615,9 @@ H5F__dest(H5F_t *f, hbool_t flush)
if (H5FO_top_dest(f) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "problems closing file")
f->shared = NULL;
- f = H5FL_FREE(H5F_t, f);
+
+ if (ret_value >= 0)
+ f = H5FL_FREE(H5F_t, f);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__dest() */
diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h
index 4b58ee6..d4738f6 100644
--- a/src/H5Gmodule.h
+++ b/src/H5Gmodule.h
@@ -923,7 +923,7 @@
* containing thousands to millions of members. Links are stored in
* a fractal heap and indexed with an improved B-tree.
* \li The new implementation also enables the use of link names consisting of
- * non-ASCII character sets (see H5Pset_char_encoding()) and is
+ * non-ASCII character sets (see #H5Pset_char_encoding) and is
* required for all link types other than hard or soft links, e.g.,
* external and user-defined links (see the \ref H5L APIs).
*
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 6f6c638..d2d9e9d 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -729,7 +729,7 @@ H5_DLL herr_t H5Lexists_async(hid_t loc_id, const char *name, hbool_t *exists, h
* \p cset specifies the character set in which the link name is
* encoded. Valid values include the following:
* \csets
- * This value is set with H5Pset_char_encoding().
+ * This value is set with #H5Pset_char_encoding.
*
* \c token is the location that a hard link points to, and
* \c val_size is the size of a soft link or user defined link value.
@@ -923,6 +923,11 @@ H5_DLL herr_t H5Literate2(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t ord
/**
* --------------------------------------------------------------------------
* \ingroup ASYNC
+ *
+ * \warning The returned value of the callback routine op will not be set
+ * in the return value for H5Literate_async(), so the \p herr_t value
+ * should not be used for determining the return state of the callback routine.
+ *
* \async_variant_of{H5Literate}
*/
#ifndef H5_DOXYGEN
@@ -1520,7 +1525,7 @@ typedef herr_t (*H5L_iterate1_t)(hid_t group, const char *name, const H5L_info1_
* \c cset specifies the character set in which the link name is
* encoded. Valid values include the following:
* \csets
- * This value is set with H5Pset_char_encoding().
+ * This value is set with #H5Pset_char_encoding.
*
* \c address and \c val_size are returned for hard and symbolic
* links, respectively. Symbolic links include soft and external links
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index dcaffd8..16172a8 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -1035,7 +1035,7 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g;
* When creating a fixed-length string datatype, \p size will
* be the length of the string in bytes. The length of the
* string in characters will depend on i the encoding used; see
- * H5Pset_char_encoding().
+ * #H5Pset_char_encoding.
*
* ENUMs created with this function have a signed native integer
* base datatype. Use H5Tenum_create() if a different integer base
diff --git a/src/H5VLconnector_passthru.h b/src/H5VLconnector_passthru.h
index 68dd33a..d10bac4 100644
--- a/src/H5VLconnector_passthru.h
+++ b/src/H5VLconnector_passthru.h
@@ -71,7 +71,7 @@ H5_DLL herr_t H5VLcmp_connector_cls(int *cmp, hid_t connector_id1, hid_t connect
* - #H5I_MAP
* - #H5I_ATTR
*
- * \return \hid_t
+ * \return \hid_t{VOL connector}
*
* \note This routine is mainly targeted toward wrapping objects for
* iteration routine callbacks (i.e. the callbacks from H5Aiterate*,
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index 907a12d..f2f0ea7 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -753,29 +753,35 @@ H5VL__native_file_close(void *file, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U
FUNC_ENTER_PACKAGE
/* This routine should only be called when a file ID's ref count drops to zero */
- HDassert(H5F_ID_EXISTS(f));
-
- /* Flush file if this is the last reference to this id and we have write
- * intent, unless it will be flushed by the "shared" file being closed.
- * This is only necessary to replicate previous behaviour, and could be
- * disabled by an option/property to improve performance.
- */
- if ((H5F_NREFS(f) > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) {
- /* Get the file ID corresponding to the H5F_t struct */
- if (H5I_find_id(f, H5I_FILE, &file_id) < 0 || H5I_INVALID_HID == file_id)
- HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "invalid ID")
-
- /* Get the number of references outstanding for this file ID */
- if ((nref = H5I_get_ref(file_id, FALSE)) < 0)
- HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "can't get ID ref count")
- if (nref == 1)
- if (H5F__flush(f) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
- } /* end if */
-
- /* Close the file */
- if (H5F__close(f) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close file")
+ HDassert(f->shared == NULL || H5F_ID_EXISTS(f));
+
+ if (f->shared == NULL)
+ f = H5FL_FREE(H5F_t, f);
+
+ else {
+
+ /* Flush file if this is the last reference to this id and we have write
+ * intent, unless it will be flushed by the "shared" file being closed.
+ * This is only necessary to replicate previous behaviour, and could be
+ * disabled by an option/property to improve performance.
+ */
+ if ((H5F_NREFS(f) > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) {
+ /* Get the file ID corresponding to the H5F_t struct */
+ if (H5I_find_id(f, H5I_FILE, &file_id) < 0 || H5I_INVALID_HID == file_id)
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "invalid ID")
+
+ /* Get the number of references outstanding for this file ID */
+ if ((nref = H5I_get_ref(file_id, FALSE)) < 0)
+ HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "can't get ID ref count")
+ if (nref == 1)
+ if (H5F__flush(f) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
+ } /* end if */
+
+ /* Close the file */
+ if (H5F__close(f) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close file")
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)