summaryrefslogtreecommitdiffstats
path: root/src/H5MF.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-06 20:56:04 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-06 20:56:04 (GMT)
commit07e4ef9da47eda1f23ca72c748fbb6d4b309540b (patch)
tree56917d007a31e919a6ff9055d872dc88bd4e0834 /src/H5MF.c
parent302dfeb11b4bb5d204683dbfd6824586b3863122 (diff)
downloadhdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.zip
hdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.tar.gz
hdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.tar.bz2
Clean up private / package / static namespace issues (function naming, which
header file, FUNC_ENTER / LEAVE, etc). Removed remaining personal email addresses from library source code (still needs cleaned from other directories). Misc. warning, style, and whitespace cleanup.
Diffstat (limited to 'src/H5MF.c')
-rw-r--r--src/H5MF.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index fac6620..7de09cb 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -15,7 +15,7 @@
*
* Created: H5MF.c
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: File memory management functions.
*
@@ -51,9 +51,11 @@
#define H5MF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
#define H5MF_CHECK_FSM(FSM, CF) \
- HDassert(*CF == FALSE); \
- if(!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
- *CF = TRUE;
+ do { \
+ HDassert(*CF == FALSE); \
+ if(!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
+ *CF = TRUE; \
+ } while(0)
/* For non-paged aggregation: map allocation request type to tracked free-space type */
/* F_SH -- pointer to H5F_shared_t; T -- H5FD_mem_t */
@@ -300,7 +302,6 @@ H5MF__alloc_to_fs_type(H5F_shared_t *f_sh, H5FD_mem_t alloc_type, hsize_t size,
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -380,7 +381,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -419,7 +419,7 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type)
fs_create.client = H5FS_CLIENT_FILE_ID;
fs_create.shrink_percent = H5MF_FSPACE_SHRINK;
fs_create.expand_percent = H5MF_FSPACE_EXPAND;
- fs_create.max_sect_addr = 1 + H5VM_log2_gen((uint64_t)f->shared->maxaddr);
+ fs_create.max_sect_addr = 1 + H5VM__log2_gen((uint64_t)f->shared->maxaddr);
fs_create.max_sect_size = f->shared->maxaddr;
/* Set up alignment and threshold to use depending on TYPE */
@@ -466,7 +466,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -781,7 +780,6 @@ done:
* Failure: HADDR_UNDEF
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 11 1997
*
*-------------------------------------------------------------------------
@@ -1086,7 +1084,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
@@ -1448,7 +1445,6 @@ H5MF__sects_dump(f, stderr);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 14 2008
*
*-------------------------------------------------------------------------
@@ -2173,7 +2169,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
} /* end for */
/* check the two aggregators */
- if((status = H5MF_aggrs_try_shrink_eoa(f)) < 0)
+ if((status = H5MF__aggrs_try_shrink_eoa(f)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
else if(status > 0)
eoa_shrank = TRUE;
@@ -2503,7 +2499,7 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
hsize_t hnums = 0; /* # of sections */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -3334,35 +3330,31 @@ static herr_t
H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, hbool_t *continue_alloc_fsm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(f_sh);
HDassert(continue_alloc_fsm);
/* Check sm_hdr_fspace */
- if(sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo) {
+ if(sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo)
H5MF_CHECK_FSM(sm_hdr_fspace, continue_alloc_fsm);
- } /* end if */
if(!(*continue_alloc_fsm))
if(sm_sinfo_fspace && sm_sinfo_fspace != sm_hdr_fspace &&
- sm_sinfo_fspace->serial_sect_count > 0 && sm_sinfo_fspace->sinfo) {
+ sm_sinfo_fspace->serial_sect_count > 0 && sm_sinfo_fspace->sinfo)
H5MF_CHECK_FSM(sm_hdr_fspace, continue_alloc_fsm);
- } /* end if */
if(H5F_SHARED_PAGED_AGGR(f_sh) && !(*continue_alloc_fsm)) {
/* Check lg_hdr_fspace */
- if(lg_hdr_fspace && lg_hdr_fspace->serial_sect_count > 0 && lg_hdr_fspace->sinfo) {
+ if(lg_hdr_fspace && lg_hdr_fspace->serial_sect_count > 0 && lg_hdr_fspace->sinfo)
H5MF_CHECK_FSM(lg_hdr_fspace, continue_alloc_fsm);
- } /* end if */
/* Check lg_sinfo_fspace */
if(!(*continue_alloc_fsm))
if(lg_sinfo_fspace && lg_sinfo_fspace != lg_hdr_fspace &&
- lg_sinfo_fspace->serial_sect_count > 0 && lg_sinfo_fspace->sinfo) {
+ lg_sinfo_fspace->serial_sect_count > 0 && lg_sinfo_fspace->sinfo)
H5MF_CHECK_FSM(lg_sinfo_fspace, continue_alloc_fsm);
- } /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)