summaryrefslogtreecommitdiffstats
path: root/src/H5MFsection.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-05 15:04:56 (GMT)
committerGitHub <noreply@github.com>2023-06-05 15:04:56 (GMT)
commit7ecf1d09afa9379186c2ace158fb60d4afd96f0e (patch)
tree529564764b9cc063dcf0f8741ce45d5c2fd11095 /src/H5MFsection.c
parente3559c7b64e7963e3515c2ebfd7f1abad810ed19 (diff)
downloadhdf5-7ecf1d09afa9379186c2ace158fb60d4afd96f0e.zip
hdf5-7ecf1d09afa9379186c2ace158fb60d4afd96f0e.tar.gz
hdf5-7ecf1d09afa9379186c2ace158fb60d4afd96f0e.tar.bz2
Convert H5F haddr_t macros to H5 (#3039)
Several macros for handling haddr_t values exist in H5Fprivate.h and have H5F prefixes, even though they have nothing to do with a particular file (e.g., H5F_addr_lt()). These macros have been moved to H5private.h and renamed to have an H5 prefix. Affected macros: H5F_addr_overflow H5F_addr_defined H5F_addr_eq H5F_addr_ne H5F_addr_lt H5F_addr_le H5F_addr_gt H5F_addr_ge H5F_addr_cmp H5F_addr_overlap H5F_addr_pow2 was unused and removed instead of converted.
Diffstat (limited to 'src/H5MFsection.c')
-rw-r--r--src/H5MFsection.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 1e30fbc..cfab485 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -268,7 +268,7 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN
/* Check arguments. */
HDassert(cls);
- HDassert(H5F_addr_defined(sect_addr));
+ HDassert(H5_addr_defined(sect_addr));
HDassert(sect_size);
/* Create free space section for block */
@@ -379,10 +379,10 @@ H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_sectio
HDassert(sect1);
HDassert(sect2);
HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
- ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
+ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5MF__sect_simple_can_merge() */
@@ -417,7 +417,7 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect
HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
HDassert(sect2);
HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SIMPLE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -467,7 +467,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
end = sect->sect_info.addr + sect->sect_info.size;
/* Check if the section is exactly at the end of the allocated space in the file */
- if (H5F_addr_eq(end, eoa)) {
+ if (H5_addr_eq(end, eoa)) {
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE
@@ -693,10 +693,10 @@ H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
HDassert(sect1);
HDassert(sect2);
HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Check if second section adjoins first section */
- ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
+ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
if (ret_value > 0)
/* If they are on different pages, couldn't merge */
if ((sect1->sect_info.addr / udata->f->shared->fs_page_size) !=
@@ -741,7 +741,7 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_SMALL);
HDassert(sect2);
HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_SMALL);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -803,9 +803,9 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section
HDassert(sect1);
HDassert(sect2);
HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */
- HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
+ HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
- ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
+ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr);
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Leaving: ret_value = %d\n", __func__, ret_value);
@@ -842,7 +842,7 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2
HDassert((*sect1)->sect_info.type == H5MF_FSPACE_SECT_LARGE);
HDassert(sect2);
HDassert(sect2->sect_info.type == H5MF_FSPACE_SECT_LARGE);
- HDassert(H5F_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
+ HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr));
/* Add second section's size to first section */
(*sect1)->sect_info.size += sect2->sect_info.size;
@@ -892,7 +892,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
end = sect->sect_info.addr + sect->sect_info.size;
/* Check if the section is exactly at the end of the allocated space in the file */
- if (H5F_addr_eq(end, eoa) && sect->sect_info.size >= udata->f->shared->fs_page_size) {
+ if (H5_addr_eq(end, eoa) && sect->sect_info.size >= udata->f->shared->fs_page_size) {
/* Set the shrinking type */
udata->shrink = H5MF_SHRINK_EOA;
#ifdef H5MF_ALLOC_DEBUG_MORE