diff options
Diffstat (limited to 'src/H5MF.c')
-rw-r--r-- | src/H5MF.c | 166 |
1 files changed, 83 insertions, 83 deletions
@@ -47,9 +47,9 @@ #define H5MF_CHECK_FSM(FSM, CF) \ do { \ - assert(*CF == FALSE); \ + assert(*CF == false); \ if (!H5_addr_defined(FSM->addr) || !H5_addr_defined(FSM->sect_addr)) \ - *CF = TRUE; \ + *CF = true; \ } while (0) /* For non-paged aggregation: map allocation request type to tracked free-space type */ @@ -92,12 +92,12 @@ static herr_t H5MF__close_pagefs(H5F_t *f); static herr_t H5MF__close_shrink_eoa(H5F_t *f); /* General routines */ -static herr_t H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, size_t *nums); -static hbool_t H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type); -static hbool_t H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace); -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); +static herr_t H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, size_t *nums); +static bool H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type); +static bool H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace); +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, + bool *continue_alloc_fsm); /* Free-space type manager routines */ static herr_t H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type); @@ -135,7 +135,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh) { H5MF_aggr_merge_t mapping_type; /* Type of free list mapping */ H5FD_mem_t type; /* Memory type for iteration */ - hbool_t all_same; /* Whether all the types map to the same value */ + bool all_same; /* Whether all the types map to the same value */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -147,11 +147,11 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh) /* Iterate over all the free space types to determine if sections of that type * can merge with the metadata or small 'raw' data aggregator */ - all_same = TRUE; + all_same = true; for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) /* Check for any different type mappings */ if (f_sh->fs_type_map[type] != f_sh->fs_type_map[H5FD_MEM_DEFAULT]) { - all_same = FALSE; + all_same = false; break; } /* end if */ @@ -167,18 +167,18 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh) if (f_sh->fs_type_map[H5FD_MEM_DRAW] == f_sh->fs_type_map[H5FD_MEM_SUPER]) mapping_type = H5MF_AGGR_MERGE_SEPARATE; else { - hbool_t all_metadata_same; /* Whether all metadata go in same free list */ + bool all_metadata_same; /* Whether all metadata go in same free list */ /* One or more allocation type don't map to the same free list type */ /* Check if all the metadata allocation types map to the same type */ - all_metadata_same = TRUE; + all_metadata_same = true; for (type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; type++) /* Skip checking raw data free list mapping */ /* (global heap is treated as raw data) */ if (type != H5FD_MEM_DRAW && type != H5FD_MEM_GHEAP) { /* Check for any different type mappings */ if (f_sh->fs_type_map[type] != f_sh->fs_type_map[H5FD_MEM_SUPER]) { - all_metadata_same = FALSE; + all_metadata_same = false; break; } /* end if */ } /* end if */ @@ -616,8 +616,8 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio /* Construct user data for callbacks */ udata.f = f; udata.alloc_type = alloc_type; - udata.allow_sect_absorb = TRUE; - udata.allow_eoa_shrink_only = FALSE; + udata.allow_sect_absorb = true; + udata.allow_eoa_shrink_only = false; /* Set the ring type in the API context */ if (H5MF__fsm_is_self_referential(f->shared, fspace)) @@ -649,8 +649,8 @@ done: * Purpose: To find a section from the specified free-space manager to fulfill the request. * If found, re-add the left-over space back to the manager. * - * Return: TRUE if a section is found to fulfill the request - * FALSE if not + * Return: true if a section is found to fulfill the request + * false if not * *------------------------------------------------------------------------- */ @@ -1177,14 +1177,14 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Construct user data for callbacks */ udata.f = f; udata.alloc_type = alloc_type; - udata.allow_sect_absorb = TRUE; - udata.allow_eoa_shrink_only = FALSE; + udata.allow_sect_absorb = true; + udata.allow_eoa_shrink_only = false; /* Try to merge the section that is smaller than threshold */ if ((merged = H5FS_sect_try_merge(f, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't merge section to file free space"); - else if (merged == TRUE) /* successfully merged */ + else if (merged == true) /* successfully merged */ /* Indicate that the node was used */ node = NULL; } /* end else */ @@ -1221,8 +1221,8 @@ done: * --try to extend into a free-space section if adjoined * --try to extend into the page end threshold if a metadata block * - * Return: Success: TRUE(1) - Block was extended - * FALSE(0) - Block could not be extended + * Return: Success: true(1) - Block was extended + * false(0) - Block could not be extended * Failure: FAIL * *------------------------------------------------------------------------- @@ -1235,9 +1235,9 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi haddr_t end; /* End of block to extend */ H5FD_mem_t map_type; /* Mapped type */ H5F_mem_page_t fs_type; /* free space type */ - htri_t allow_extend = TRUE; /* Possible to extend the block */ + htri_t allow_extend = true; /* Possible to extend the block */ hsize_t frag_size = 0; /* Size of mis-aligned fragment */ - htri_t ret_value = FALSE; /* Return value */ + htri_t ret_value = false; /* Return value */ FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG @@ -1266,7 +1266,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi if (size < f->shared->fs_page_size) { /* To extend a small block: cannot cross page boundary */ if ((addr / f->shared->fs_page_size) != (((end + extra_requested) - 1) / f->shared->fs_page_size)) - allow_extend = FALSE; + allow_extend = false; } /* end if */ else { haddr_t eoa; /* EOA for the file */ @@ -1301,7 +1301,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi /* If extending at EOA succeeds: */ /* for paged aggregation, put the fragment into the large-sized free-space manager */ - if (ret_value == TRUE && H5F_PAGED_AGGR(f) && frag_size) { + if (ret_value == true && H5F_PAGED_AGGR(f) && frag_size) { H5MF_free_section_t *node = NULL; /* Free space section pointer */ /* Should be large-sized block */ @@ -1324,7 +1324,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi } /* end if */ /* For non-paged aggregation: try to extend into the aggregators */ - if (ret_value == FALSE && (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR || + if (ret_value == false && (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR || f->shared->fs_strategy == H5F_FSPACE_STRATEGY_AGGR)) { H5F_blk_aggr_t *aggr; /* Aggregator to use */ @@ -1339,7 +1339,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi } /* end if */ /* If no extension so far, try to extend into a free-space section */ - if (ret_value == FALSE && + if (ret_value == false && ((f->shared->fs_strategy == H5F_FSPACE_STRATEGY_FSM_AGGR) || (H5F_PAGED_AGGR(f)))) { H5MF_sect_ud_t udata; /* User data */ @@ -1365,11 +1365,11 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi } /* end if */ /* For paged aggregation and a metadata block: try to extend into page end threshold */ - if (ret_value == FALSE && H5F_PAGED_AGGR(f) && map_type != H5FD_MEM_DRAW) { + if (ret_value == false && H5F_PAGED_AGGR(f) && map_type != H5FD_MEM_DRAW) { H5MF_EOA_MISALIGN(f, end, f->shared->fs_page_size, frag_size); if (frag_size <= H5F_PGEND_META_THRES(f) && extra_requested <= frag_size) - ret_value = TRUE; + ret_value = true; #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: Try to extend into the page end threshold = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -1411,7 +1411,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of FSM */ H5F_mem_page_t fs_type; /* Free space type */ - htri_t ret_value = FALSE; /* Return value */ + htri_t ret_value = false; /* Return value */ FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG @@ -1447,8 +1447,8 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Construct user data for callbacks */ udata.f = f; udata.alloc_type = alloc_type; - udata.allow_sect_absorb = FALSE; /* Force section to be absorbed into aggregator */ - udata.allow_eoa_shrink_only = FALSE; + udata.allow_sect_absorb = false; /* Force section to be absorbed into aggregator */ + udata.allow_eoa_shrink_only = false; /* Check if the block can shrink the container */ if (sect_cls->can_shrink) { @@ -1761,7 +1761,7 @@ H5MF__close_aggrfs(H5F_t *f) fsinfo.version = f->shared->fs_version; /* Write the free space manager message -- message must already exist */ - if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) + if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension"); @@ -1924,7 +1924,7 @@ H5MF__close_pagefs(H5F_t *f) fsinfo.eoa_pre_fsm_fsalloc = f->shared->eoa_fsm_fsalloc; /* Write the free space manager message -- message must already exist */ - if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) + if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension"); @@ -1972,14 +1972,14 @@ H5MF__close_pagefs(H5F_t *f) * open. * * If there is a cache image in the file at file open, - * f->shared->first_alloc_dealloc will always be FALSE unless + * f->shared->first_alloc_dealloc will always be false unless * the file is opened R/O, as otherwise, the image will have been * read and discarded by this point. * * If a cache image was created on file close, the actual EOA * should be in f->shared->eoa_post_mdci_fsalloc. Note that in * this case, it is conceivable that f->shared->first_alloc_dealloc - * will still be TRUE, as the cache image is allocated directly from + * will still be true, as the cache image is allocated directly from * the file driver layer. However, as this possibility seems remote, * it is ignored in the following assert. */ @@ -1997,7 +1997,7 @@ H5MF__close_pagefs(H5F_t *f) /* Write file space info message to superblock extension object header */ /* Create the superblock extension object header in advance if needed */ - if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) + if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, false, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension"); } /* end else */ @@ -2035,7 +2035,7 @@ H5MF__close_shrink_eoa(H5F_t *f) H5AC_ring_t needed_ring = H5AC_RING_INV; /* Ring value needed for this iteration. */ H5F_mem_t type; H5F_mem_page_t ptype; /* Memory type for iteration */ - hbool_t eoa_shrank; /* Whether an EOA shrink occurs */ + bool eoa_shrank; /* Whether an EOA shrink occurs */ htri_t status; /* Status value */ H5MF_sect_ud_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2048,8 +2048,8 @@ H5MF__close_shrink_eoa(H5F_t *f) /* Construct user data for callbacks */ udata.f = f; - udata.allow_sect_absorb = FALSE; - udata.allow_eoa_shrink_only = TRUE; + udata.allow_sect_absorb = false; + udata.allow_eoa_shrink_only = true; /* Set the ring type in the API context */ H5AC_set_ring(H5AC_RING_RDFSM, &orig_ring); @@ -2057,7 +2057,7 @@ H5MF__close_shrink_eoa(H5F_t *f) /* Iterate until no more EOA shrinking occurs */ do { - eoa_shrank = FALSE; + eoa_shrank = false; if (H5F_PAGED_AGGR(f)) { /* Check the last section of each free-space manager */ @@ -2081,7 +2081,7 @@ H5MF__close_shrink_eoa(H5F_t *f) if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[ptype], &udata)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); else if (status > 0) - eoa_shrank = TRUE; + eoa_shrank = true; } /* end if */ } /* end for */ } /* end if */ @@ -2105,7 +2105,7 @@ H5MF__close_shrink_eoa(H5F_t *f) if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[type], &udata)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); else if (status > 0) - eoa_shrank = TRUE; + eoa_shrank = true; } /* end if */ } /* end for */ @@ -2113,7 +2113,7 @@ H5MF__close_shrink_eoa(H5F_t *f) 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; + eoa_shrank = true; } /* end else */ } while (eoa_shrank); @@ -2195,14 +2195,14 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) /* Iterate over all the free space types that have managers and get each free list's space */ for (type = start_type; type < end_type; type++) { - fs_started[type] = FALSE; + fs_started[type] = false; /* Check if the free space for the file has been initialized */ if (!f->shared->fs_man[type] && H5_addr_defined(f->shared->fs_addr[type])) { if (H5MF__open_fstype(f, type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); assert(f->shared->fs_man[type]); - fs_started[type] = TRUE; + fs_started[type] = true; } /* end if */ /* Test to see if we need to switch rings -- do so if required */ @@ -2335,8 +2335,8 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t /* Iterate over memory types, retrieving the number of sections of each type */ for (ty = start_type; ty < end_type; ty++) { - hbool_t fs_started = FALSE; /* The free-space manager is opened or not */ - size_t nums = 0; /* The number of free-space sections */ + bool fs_started = false; /* The free-space manager is opened or not */ + size_t nums = 0; /* The number of free-space sections */ /* Test to see if we need to switch rings -- do so if required */ if (H5MF__fsm_type_is_self_referential(f->shared, ty)) @@ -2353,7 +2353,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t if (H5MF__open_fstype(f, ty) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager"); assert(f->shared->fs_man[ty]); - fs_started = TRUE; + fs_started = true; } /* end if */ /* Check if there's free space sections of this type */ @@ -2549,7 +2549,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) +H5MF_settle_raw_data_fsm(H5F_t *f, bool *fsm_settled) { int pass_count; hsize_t alloc_size; @@ -2578,8 +2578,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * the private property in f->shared->null_fsm_addr is not enabled. */ if (f->shared->fs_persist && !H5F_NULL_FSM_ADDR(f)) { - hbool_t fsm_opened[H5F_MEM_PAGE_NTYPES]; /* State of FSM */ - hbool_t fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */ + bool fsm_opened[H5F_MEM_PAGE_NTYPES]; /* State of FSM */ + bool fsm_visited[H5F_MEM_PAGE_NTYPES]; /* State of FSM */ /* should only be called if file is opened R/W */ assert(H5F_INTENT(f) & H5F_ACC_RDWR); @@ -2668,10 +2668,10 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) assert(fsm_type < H5F_MEM_PAGE_NTYPES); } /* end else-if */ else /* paged allocation disabled -- should be unreachable */ - assert(FALSE); + assert(false); if (!fsm_visited[fsm_type]) { - fsm_visited[fsm_type] = TRUE; + fsm_visited[fsm_type] = true; /* If there is no active FSM for this type, but such a FSM has * space allocated in file, open it so that we can free its file @@ -2680,12 +2680,12 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (NULL == f->shared->fs_man[fsm_type]) { if (H5_addr_defined(f->shared->fs_addr[fsm_type])) { /* Sanity check */ - assert(fsm_opened[fsm_type] == FALSE); + assert(fsm_opened[fsm_type] == false); if (H5MF__open_fstype(f, fsm_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space manager"); - fsm_opened[fsm_type] = TRUE; + fsm_opened[fsm_type] = true; } /* end if */ } /* end if */ @@ -2711,7 +2711,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * reallocate later if the free space manager contains * any free space. */ - if (H5FS_free(f, f->shared->fs_man[fsm_type], TRUE) < 0) + if (H5FS_free(f, f->shared->fs_man[fsm_type], true) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't release free-space headers"); f->shared->fs_addr[fsm_type] = HADDR_UNDEF; @@ -2770,7 +2770,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) fsinfo.pgend_meta_thres = f->shared->pgend_meta_thres; fsinfo.eoa_pre_fsm_fsalloc = HADDR_UNDEF; - if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, TRUE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) + if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, true, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing fsinfo message to superblock extension"); } @@ -2796,7 +2796,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) /* Reinitialize fsm_visited */ for (fsm_type = H5F_MEM_PAGE_SUPER; fsm_type < H5F_MEM_PAGE_NTYPES; fsm_type++) - fsm_visited[fsm_type] = FALSE; + fsm_visited[fsm_type] = false; for (pass_count = 0; pass_count <= 1; pass_count++) { if (pass_count == 0) @@ -2818,7 +2818,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) assert(fsm_type < H5F_MEM_PAGE_NTYPES); } /* end else-if */ else /* paged allocation disabled -- should be unreachable */ - assert(FALSE); + assert(false); /* Test to see if we need to switch rings -- do so if required */ if (H5MF__fsm_type_is_self_referential(f->shared, fsm_type)) @@ -2836,7 +2836,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * more than once. */ if (!fsm_visited[fsm_type]) { - fsm_visited[fsm_type] = TRUE; + fsm_visited[fsm_type] = true; if (f->shared->fs_man[fsm_type]) { /* Only allocate file space if the target free space manager @@ -2901,7 +2901,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5MF__close_fstype(f, fsm_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space manager"); - fsm_opened[fsm_type] = FALSE; + fsm_opened[fsm_type] = false; } /* end if */ } /* end if */ } /* end for */ @@ -2912,7 +2912,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) assert(!fsm_opened[fsm_type]); /* Indicate that the FSM was settled successfully */ - *fsm_settled = TRUE; + *fsm_settled = true; } /* end if */ done: @@ -3017,7 +3017,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) +H5MF_settle_meta_data_fsm(H5F_t *f, bool *fsm_settled) { H5F_mem_page_t sm_fshdr_fs_type; /* small fs hdr fsm */ H5F_mem_page_t sm_fssinfo_fs_type; /* small fs sinfo fsm */ @@ -3029,7 +3029,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) H5FS_t *lg_sinfo_fspace = NULL; /* ptr to lg FSM sinfo alloc FSM */ haddr_t eoa_fsm_fsalloc; /* eoa after file space allocation */ /* for self referential FSMs */ - hbool_t continue_alloc_fsm = FALSE; /* Continue allocating addr and sect_addr for FSMs */ + bool continue_alloc_fsm = false; /* Continue allocating addr and sect_addr for FSMs */ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3185,7 +3185,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) * they are all settled, */ do { - continue_alloc_fsm = FALSE; + continue_alloc_fsm = false; if (sm_hdr_fspace) if (H5FS_vfd_alloc_hdr_and_section_info_if_needed( f, sm_hdr_fspace, &(f->shared->fs_addr[sm_fshdr_fs_type])) < 0) @@ -3241,7 +3241,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) f->shared->eoa_fsm_fsalloc = eoa_fsm_fsalloc; /* Indicate that the FSM was settled successfully */ - *fsm_settled = TRUE; + *fsm_settled = true; } /* end if */ done: @@ -3257,7 +3257,7 @@ done: * * Purpose: To determine whether any of the input FSMs has allocated * its "addr" and "sect_addr". - * Return TRUE or FALSE in *continue_alloc_fsm. + * Return true or false in *continue_alloc_fsm. * * Return: SUCCEED/FAIL * @@ -3265,7 +3265,7 @@ done: */ 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) + H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, bool *continue_alloc_fsm) { FUNC_ENTER_PACKAGE_NOERR @@ -3300,21 +3300,21 @@ H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_s /*------------------------------------------------------------------------- * Function: H5MF__fsm_type_is_self_referential() * - * Purpose: Return TRUE if the indicated free space manager allocates - * file space for free space managers. Return FALSE otherwise. + * Purpose: Return true if the indicated free space manager allocates + * file space for free space managers. Return false otherwise. * - * Return: TRUE/FALSE + * Return: true/false * *------------------------------------------------------------------------- */ -static hbool_t +static bool H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type) { H5F_mem_page_t sm_fshdr_fsm; H5F_mem_page_t sm_fssinfo_fsm; H5F_mem_page_t lg_fshdr_fsm; H5F_mem_page_t lg_fssinfo_fsm; - hbool_t result = FALSE; + bool result = false; FUNC_ENTER_PACKAGE_NOERR @@ -3337,11 +3337,11 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type) /* In principle, fsm_type should always be less than * H5F_MEM_PAGE_LARGE_SUPER whenever paged aggregation * is not enabled. However, since there is code that does - * not observe this principle, force the result to FALSE if + * not observe this principle, force the result to false if * fsm_type is greater than or equal to H5F_MEM_PAGE_LARGE_SUPER. */ if (fsm_type >= H5F_MEM_PAGE_LARGE_SUPER) - result = FALSE; + result = false; else result = (fsm_type == sm_fshdr_fsm) || (fsm_type == sm_fssinfo_fsm); } /* end else */ @@ -3352,19 +3352,19 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type) /*------------------------------------------------------------------------- * Function: H5MF__fsm_is_self_referential() * - * Purpose: Return TRUE if the indicated free space manager allocates - * file space for free space managers. Return FALSE otherwise. + * Purpose: Return true if the indicated free space manager allocates + * file space for free space managers. Return false otherwise. * - * Return: TRUE/FALSE + * Return: true/false * *------------------------------------------------------------------------- */ -static hbool_t +static bool H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace) { H5F_mem_page_t sm_fshdr_fsm; H5F_mem_page_t sm_fssinfo_fsm; - hbool_t result = FALSE; + bool result = false; FUNC_ENTER_PACKAGE_NOERR |