From 1821f8219ddb233f63561231f752301c5f376956 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 May 2018 12:07:56 -0500 Subject: Valgrind fixed by checking for prefix_len of 0 --- src/H5Fint.c | 180 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index 49538f4..7e9bdec 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -104,7 +104,7 @@ H5FL_DEFINE(H5F_t); H5FL_DEFINE(H5F_file_t); - + /*------------------------------------------------------------------------- * Function: H5F_get_access_plist * @@ -218,7 +218,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_access_plist() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_obj_count * @@ -246,7 +246,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_obj_count() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_obj_ids * @@ -273,7 +273,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_obj_ids() */ - + /*--------------------------------------------------------------------------- * Function: H5F_get_objects * @@ -375,7 +375,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_objects() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_objects_cb * @@ -484,7 +484,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_objects_cb() */ - + /*-------------------------------------------------------------------------- * Function: H5F__build_name * @@ -510,13 +510,13 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out /* Compose the full file name */ HDsnprintf(*full_name, (prefix_len + fname_len + 2), "%s%s%s", prefix, - (H5_CHECK_DELIMITER(prefix[prefix_len - 1]) ? "" : H5_DIR_SEPS), file_name); + ((prefix_len == 0 || H5_CHECK_DELIMITER(prefix[prefix_len - 1])) ? "" : H5_DIR_SEPS), file_name); done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__build_name() */ - + /*-------------------------------------------------------------------------- * Function: H5F__getenv_prefix_name * @@ -553,7 +553,7 @@ H5F__getenv_prefix_name(char **env_prefix/*in,out*/) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__getenv_prefix_name() */ - + /*------------------------------------------------------------------------- * Function: H5F_prefix_open_file * @@ -775,7 +775,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_prefix_open_file() */ - + /*------------------------------------------------------------------------- * Function: H5F__is_hdf5 * @@ -816,7 +816,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__is_hdf5() */ - + /*------------------------------------------------------------------------- * Function: H5F_new * @@ -1076,7 +1076,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_new() */ - + /*------------------------------------------------------------------------- * Function: H5F__dest * @@ -1330,7 +1330,7 @@ H5F__dest(H5F_t *f, hbool_t flush) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__dest() */ - + /*------------------------------------------------------------------------- * Function: H5F__create * @@ -1343,8 +1343,8 @@ H5F__dest(H5F_t *f, hbool_t flush) * Return: Success: Non-NULL, pointer to new file object. * Failure: NULL * - * Programmer: Quincey Koziol - * December 13, 2017 + * Programmer: Quincey Koziol + * December 13, 2017 * *------------------------------------------------------------------------- */ @@ -1366,7 +1366,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__create() */ - + /*------------------------------------------------------------------------- * Function: H5F__open * @@ -1379,8 +1379,8 @@ done: * Return: Success: Non-NULL, pointer to new file object. * Failure: NULL * - * Programmer: Quincey Koziol - * December 13, 2017 + * Programmer: Quincey Koziol + * December 13, 2017 * *------------------------------------------------------------------------- */ @@ -1402,7 +1402,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__open() */ - + /*------------------------------------------------------------------------- * Function: H5F_open * @@ -1818,7 +1818,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_open() */ - + /*------------------------------------------------------------------------- * Function: H5F_flush_phase1 * @@ -1855,7 +1855,7 @@ H5F__flush_phase1(H5F_t *f) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_phase1() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush_phase2 * @@ -1881,8 +1881,8 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) #ifdef H5_HAVE_PARALLEL if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) - /* Since we just returned from a call to H5AC_flush(), we just - * passed through a barrier. Hence we can skip the barrier on + /* Since we just returned from a call to H5AC_flush(), we just + * passed through a barrier. Hence we can skip the barrier on * entry to the mpio file driver truncate call below, and the first * barrier in the following call to flush the cache again. */ @@ -1923,7 +1923,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_phase2() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush_real * @@ -1955,7 +1955,7 @@ H5F__flush_real(H5F_t *f) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_real() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush * @@ -1967,8 +1967,8 @@ H5F__flush_real(H5F_t *f) * * Return: Non-negative on success / Negative on failure * - * Programmer: Quincey Koziol - * December 13, 2017 + * Programmer: Quincey Koziol + * December 13, 2017 * *------------------------------------------------------------------------- */ @@ -1998,7 +1998,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__flush() */ - + /*------------------------------------------------------------------------- * Function: H5F__close * @@ -2010,8 +2010,8 @@ done: * * Return: Non-negative on success / Negative on failure * - * Programmer: Quincey Koziol - * December 16, 2017 + * Programmer: Quincey Koziol + * December 16, 2017 * *------------------------------------------------------------------------- */ @@ -2049,7 +2049,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__close() */ - + /*------------------------------------------------------------------------- * Function: H5F__close_cb * @@ -2107,7 +2107,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__close_cb() */ - + /*------------------------------------------------------------------------- * Function: H5F_try_close * @@ -2281,7 +2281,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_try_close() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_id * @@ -2317,7 +2317,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_id() */ - + /*------------------------------------------------------------------------- * Function: H5F_incr_nopen_objs * @@ -2338,7 +2338,7 @@ H5F_incr_nopen_objs(H5F_t *f) FUNC_LEAVE_NOAPI(++f->nopen_objs) } /* end H5F_incr_nopen_objs() */ - + /*------------------------------------------------------------------------- * Function: H5F_decr_nopen_objs * @@ -2359,7 +2359,7 @@ H5F_decr_nopen_objs(H5F_t *f) FUNC_LEAVE_NOAPI(--f->nopen_objs) } /* end H5F_decr_nopen_objs() */ - + /*------------------------------------------------------------------------- * Function: H5F_build_actual_name * @@ -2481,7 +2481,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_build_actual_name() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_encode_len * @@ -2518,7 +2518,7 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr) FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_encode_len() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_encode * @@ -2542,7 +2542,7 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr) FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_encode() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_decode_len * @@ -2606,7 +2606,7 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_decode_len() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_decode * @@ -2633,7 +2633,7 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_decode() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_grp_btree_shared * @@ -2659,7 +2659,7 @@ H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_grp_btree_shared() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_addr * @@ -2684,7 +2684,7 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_addr() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_vers * @@ -2709,7 +2709,7 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_vers() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_nindexes * @@ -2734,7 +2734,7 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_nindexes() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_store_msg_crt_idx * @@ -2759,7 +2759,7 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_store_msg_crt_idx() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_libver_bounds() * @@ -2792,19 +2792,19 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) * metadata entry class changes when the file format low / high * bounds are changed and an unwritten entry of that class is * sitting in the metadata cache. - * + * * If that happens, it's possible that the entry's size could * become larger, potentially corrupting the file (if the larger * entry is fully written, overwriting data outside its allocated * space), or corrupting the entry (if the entry is truncated to * fit into the allocated space). - * + * * Although I'm not aware of any metadata with this behavior * currently, it would be very difficult to guard against and / or * detect, but if we flush everything here, the format version * for metadata entries in the cache will be finalized and these * sorts of problems can be avoided. - * + * * QAK - April, 2018 */ if(H5F__flush_real(f) < 0) @@ -2819,7 +2819,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_set_libver_bounds() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_freespace * @@ -2851,7 +2851,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_freespace() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_file_image * @@ -2961,7 +2961,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_file_image() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_info * @@ -3011,7 +3011,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_info() */ - + /*------------------------------------------------------------------------- * Function: H5F_track_metadata_read_retries * @@ -3059,7 +3059,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_track_metadata_read_retries() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_retries * @@ -3095,7 +3095,7 @@ H5F_set_retries(H5F_t *f) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_retries() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_free_sections * @@ -3128,7 +3128,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_free_sections() */ - + /*------------------------------------------------------------------------- * Function: H5F_object_flush_cb * @@ -3158,7 +3158,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_object_flush_cb() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_base_addr * @@ -3185,7 +3185,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_base_addr() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_eoa * @@ -3212,7 +3212,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_eoa() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_paged_aggr * @@ -3240,7 +3240,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_paged_aggr() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_max_eof_eoa * @@ -3279,7 +3279,7 @@ done: } /* end H5F__get_max_eof_eoa() */ #ifdef H5_HAVE_PARALLEL - + /*------------------------------------------------------------------------- * Function: H5F_set_coll_md_read * @@ -3304,7 +3304,7 @@ H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t cmr) } /* H5F_set_coll_md_read() */ #endif /* H5_HAVE_PARALLEL */ - + /*------------------------------------------------------------------------- * Function: H5F__get_metadata_read_retry_info * @@ -3394,7 +3394,7 @@ done: } /* end H5F__get_metadata_read_retry_info() */ - + /*------------------------------------------------------------------------- * Function: H5F__start_swmr_write * @@ -3619,7 +3619,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__start_swmr_write() */ - + /*------------------------------------------------------------------------- * Function: H5F__format_convert * @@ -3635,7 +3635,7 @@ done: herr_t H5F__format_convert(H5F_t *f) { - hbool_t mark_dirty = FALSE; /* Whether to mark the file's superblock dirty */ + hbool_t mark_dirty = FALSE; /* Whether to mark the file's superblock dirty */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_VOL @@ -3646,39 +3646,39 @@ H5F__format_convert(H5F_t *f) /* Check if the superblock should be downgraded */ if(f->shared->sblock->super_vers > HDF5_SUPERBLOCK_VERSION_V18_LATEST) { - f->shared->sblock->super_vers = HDF5_SUPERBLOCK_VERSION_V18_LATEST; - mark_dirty = TRUE; + f->shared->sblock->super_vers = HDF5_SUPERBLOCK_VERSION_V18_LATEST; + mark_dirty = TRUE; } /* end if */ /* Check for persistent freespace manager, which needs to be downgraded */ if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF && - f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF && - f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF && - f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) { - /* Check to remove free-space manager info message from superblock extension */ - if(H5F_addr_defined(f->shared->sblock->ext_addr)) - if(H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension") - - /* Close freespace manager */ - if(H5MF_try_close(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to free free-space address") - - /* Set non-persistent freespace manager */ - f->shared->fs_strategy = H5F_FILE_SPACE_STRATEGY_DEF; - f->shared->fs_persist = H5F_FREE_SPACE_PERSIST_DEF; - f->shared->fs_threshold = H5F_FREE_SPACE_THRESHOLD_DEF; - f->shared->fs_page_size = H5F_FILE_SPACE_PAGE_SIZE_DEF; - - /* Indicate that the superblock should be marked dirty */ - mark_dirty = TRUE; + f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF && + f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF && + f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) { + /* Check to remove free-space manager info message from superblock extension */ + if(H5F_addr_defined(f->shared->sblock->ext_addr)) + if(H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension") + + /* Close freespace manager */ + if(H5MF_try_close(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to free free-space address") + + /* Set non-persistent freespace manager */ + f->shared->fs_strategy = H5F_FILE_SPACE_STRATEGY_DEF; + f->shared->fs_persist = H5F_FREE_SPACE_PERSIST_DEF; + f->shared->fs_threshold = H5F_FREE_SPACE_THRESHOLD_DEF; + f->shared->fs_page_size = H5F_FILE_SPACE_PAGE_SIZE_DEF; + + /* Indicate that the superblock should be marked dirty */ + mark_dirty = TRUE; } /* end if */ /* Check if we should mark the superblock dirty */ if(mark_dirty) - /* Mark superblock as dirty */ - if(H5F_super_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + /* Mark superblock as dirty */ + if(H5F_super_dirty(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") done: FUNC_LEAVE_NOAPI_VOL(ret_value) -- cgit v0.12 From 13743e6baf167458343c29fd72ee0fab2b2fccc7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 May 2018 14:28:58 -0500 Subject: Update text --- release_docs/USING_HDF5_VS.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index 3019631..ba22753 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -15,9 +15,9 @@ NOTE: Building applications with the dynamic/shared hdf5 libraries requires The following two sections are helpful if you do not use CMake to build your applications. -======================================================================== -Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010 -======================================================================== +============================================================================================== +Using Visual Studio 2010 and above with HDF5 Libraries built with Visual Studio 2010 and above +============================================================================================== 1. Set up path for external libraries and headers @@ -79,13 +79,9 @@ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 3.1 FAQ Many other common questions and hints are located online and being updated - in the HDF5 FAQ. For Windows-specific questions, please see: - - https://support.hdfgroup.org/HDF5/faq/windows.html - - For all other general questions, you can look in the general FAQ: + in the HDF Knowledge Base, please see: - https://support.hdfgroup.org/HDF5/HDF5-FAQ.html + https://portal.hdfgroup.org/display/knowledge/HDF+Knowledge+Base ************************************************************************ Please send email to help@hdfgroup.org for further assistance. -- cgit v0.12 From 0ce9d125f6593822f66181898722b6035683023f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 May 2018 14:37:30 -0500 Subject: Update support link --- config/cmake/README.txt.cmake.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in index ceeda49..be6ddc1 100644 --- a/config/cmake/README.txt.cmake.in +++ b/config/cmake/README.txt.cmake.in @@ -62,9 +62,6 @@ For more information see USING_CMake_Examples.txt in the install folder. =========================================================================== Documentation for this release can be found at the following URL: - http://www.hdfgroup.org/HDF5/doc/. - -See the HDF5 home page for further details: - http://hdfgroup.org/HDF5/ + https://portal.hdfgroup.org/display/support Bugs should be reported to help@hdfgroup.org. -- cgit v0.12 From bcd8b31f3c9ace931df4483b855fae371c27a3dc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 May 2018 14:56:09 -0500 Subject: Put back CTRL-L chars --- src/H5Fint.c | 104 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index 7e9bdec..7d71fbc 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -104,7 +104,7 @@ H5FL_DEFINE(H5F_t); H5FL_DEFINE(H5F_file_t); - + /*------------------------------------------------------------------------- * Function: H5F_get_access_plist * @@ -218,7 +218,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_access_plist() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_obj_count * @@ -246,7 +246,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_obj_count() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_obj_ids * @@ -273,7 +273,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_obj_ids() */ - + /*--------------------------------------------------------------------------- * Function: H5F_get_objects * @@ -375,7 +375,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_objects() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_objects_cb * @@ -484,7 +484,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_objects_cb() */ - + /*-------------------------------------------------------------------------- * Function: H5F__build_name * @@ -516,7 +516,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__build_name() */ - + /*-------------------------------------------------------------------------- * Function: H5F__getenv_prefix_name * @@ -553,7 +553,7 @@ H5F__getenv_prefix_name(char **env_prefix/*in,out*/) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__getenv_prefix_name() */ - + /*------------------------------------------------------------------------- * Function: H5F_prefix_open_file * @@ -775,7 +775,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_prefix_open_file() */ - + /*------------------------------------------------------------------------- * Function: H5F__is_hdf5 * @@ -816,7 +816,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__is_hdf5() */ - + /*------------------------------------------------------------------------- * Function: H5F_new * @@ -1076,7 +1076,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_new() */ - + /*------------------------------------------------------------------------- * Function: H5F__dest * @@ -1330,7 +1330,7 @@ H5F__dest(H5F_t *f, hbool_t flush) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__dest() */ - + /*------------------------------------------------------------------------- * Function: H5F__create * @@ -1366,7 +1366,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__create() */ - + /*------------------------------------------------------------------------- * Function: H5F__open * @@ -1402,7 +1402,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__open() */ - + /*------------------------------------------------------------------------- * Function: H5F_open * @@ -1818,7 +1818,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_open() */ - + /*------------------------------------------------------------------------- * Function: H5F_flush_phase1 * @@ -1855,7 +1855,7 @@ H5F__flush_phase1(H5F_t *f) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_phase1() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush_phase2 * @@ -1923,7 +1923,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_phase2() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush_real * @@ -1955,7 +1955,7 @@ H5F__flush_real(H5F_t *f) FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__flush_real() */ - + /*------------------------------------------------------------------------- * Function: H5F__flush * @@ -1998,7 +1998,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__flush() */ - + /*------------------------------------------------------------------------- * Function: H5F__close * @@ -2010,8 +2010,8 @@ done: * * Return: Non-negative on success / Negative on failure * - * Programmer: Quincey Koziol - * December 16, 2017 + * Programmer: Quincey Koziol + * December 16, 2017 * *------------------------------------------------------------------------- */ @@ -2049,7 +2049,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__close() */ - + /*------------------------------------------------------------------------- * Function: H5F__close_cb * @@ -2107,7 +2107,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__close_cb() */ - + /*------------------------------------------------------------------------- * Function: H5F_try_close * @@ -2281,7 +2281,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_try_close() */ - + /*------------------------------------------------------------------------- * Function: H5F_get_id * @@ -2317,7 +2317,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_id() */ - + /*------------------------------------------------------------------------- * Function: H5F_incr_nopen_objs * @@ -2338,7 +2338,7 @@ H5F_incr_nopen_objs(H5F_t *f) FUNC_LEAVE_NOAPI(++f->nopen_objs) } /* end H5F_incr_nopen_objs() */ - + /*------------------------------------------------------------------------- * Function: H5F_decr_nopen_objs * @@ -2359,7 +2359,7 @@ H5F_decr_nopen_objs(H5F_t *f) FUNC_LEAVE_NOAPI(--f->nopen_objs) } /* end H5F_decr_nopen_objs() */ - + /*------------------------------------------------------------------------- * Function: H5F_build_actual_name * @@ -2481,7 +2481,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_build_actual_name() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_encode_len * @@ -2518,7 +2518,7 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr) FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_encode_len() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_encode * @@ -2542,7 +2542,7 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr) FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_encode() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_decode_len * @@ -2606,7 +2606,7 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_decode_len() */ - + /*------------------------------------------------------------------------- * Function: H5F_addr_decode * @@ -2633,7 +2633,7 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o FUNC_LEAVE_NOAPI_VOID } /* end H5F_addr_decode() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_grp_btree_shared * @@ -2659,7 +2659,7 @@ H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_grp_btree_shared() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_addr * @@ -2684,7 +2684,7 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_addr() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_vers * @@ -2709,7 +2709,7 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_vers() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_sohm_nindexes * @@ -2734,7 +2734,7 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_sohm_nindexes() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_store_msg_crt_idx * @@ -2759,7 +2759,7 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_store_msg_crt_idx() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_libver_bounds() * @@ -2819,7 +2819,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_set_libver_bounds() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_freespace * @@ -2851,7 +2851,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_freespace() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_file_image * @@ -2961,7 +2961,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_file_image() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_info * @@ -3011,7 +3011,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_info() */ - + /*------------------------------------------------------------------------- * Function: H5F_track_metadata_read_retries * @@ -3059,7 +3059,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_track_metadata_read_retries() */ - + /*------------------------------------------------------------------------- * Function: H5F_set_retries * @@ -3095,7 +3095,7 @@ H5F_set_retries(H5F_t *f) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F_set_retries() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_free_sections * @@ -3128,7 +3128,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__get_free_sections() */ - + /*------------------------------------------------------------------------- * Function: H5F_object_flush_cb * @@ -3158,7 +3158,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_object_flush_cb() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_base_addr * @@ -3185,7 +3185,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_base_addr() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_eoa * @@ -3212,7 +3212,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_eoa() */ - + /*------------------------------------------------------------------------- * Function: H5F__set_paged_aggr * @@ -3240,7 +3240,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__set_paged_aggr() */ - + /*------------------------------------------------------------------------- * Function: H5F__get_max_eof_eoa * @@ -3279,7 +3279,7 @@ done: } /* end H5F__get_max_eof_eoa() */ #ifdef H5_HAVE_PARALLEL - + /*------------------------------------------------------------------------- * Function: H5F_set_coll_md_read * @@ -3304,7 +3304,7 @@ H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t cmr) } /* H5F_set_coll_md_read() */ #endif /* H5_HAVE_PARALLEL */ - + /*------------------------------------------------------------------------- * Function: H5F__get_metadata_read_retry_info * @@ -3394,7 +3394,7 @@ done: } /* end H5F__get_metadata_read_retry_info() */ - + /*------------------------------------------------------------------------- * Function: H5F__start_swmr_write * @@ -3619,7 +3619,7 @@ done: FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5F__start_swmr_write() */ - + /*------------------------------------------------------------------------- * Function: H5F__format_convert * -- cgit v0.12 From a2bafdc7a1021ca608b39f96d1f518701dbd45f8 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 23 May 2018 23:40:23 -0700 Subject: Minor H5FS tweaks. --- src/H5FS.c | 6 +++--- src/H5FSpkg.h | 8 ++++---- src/H5FSsection.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/H5FS.c b/src/H5FS.c index ec2dc11..e1a760f 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -1195,14 +1195,14 @@ H5FS_get_sect_count(const H5FS_t *frsp, hsize_t *tot_sect_count) * * Purpose: Verify that the free space manager is mostly sane * - * Return: SUCCEED (Can't fail) + * Return: void * * Programmer: Quincey Koziol * Jul 17 2006 * *------------------------------------------------------------------------- */ -herr_t +void H5FS__assert(const H5FS_t *fspace) { FUNC_ENTER_PACKAGE_NOERR @@ -1228,7 +1228,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__assert", fspace-> HDassert(fspace->serial_sect_count > 0 || fspace->ghost_sect_count == 0); #endif /* QAK */ - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI_VOID } /* end H5FS__assert() */ #endif /* H5FS_DEBUG_ASSERT */ diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index 23e1212..a5896ee 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -235,10 +235,10 @@ H5_DLL herr_t H5FS__hdr_dest(H5FS_t *hdr); H5_DLL herr_t H5FS_sinfo_dest(H5FS_sinfo_t *sinfo); /* Sanity check routines */ -#ifdef H5FS_DEBUG -H5_DLL herr_t H5FS__assert(const H5FS_t *fspace); -H5_DLL herr_t H5FS__sect_assert(const H5FS_t *fspace); -#endif /* H5FS_DEBUG */ +#ifdef H5FS_DEBUG_ASSERT +H5_DLL void H5FS__assert(const H5FS_t *fspace); +H5_DLL void H5FS__sect_assert(const H5FS_t *fspace); +#endif /* H5FS_DEBUG_ASSERT */ /* Testing routines */ #ifdef H5FS_TESTING diff --git a/src/H5FSsection.c b/src/H5FSsection.c index f0d9f47..11cd722 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -2197,14 +2197,14 @@ done: * * Purpose: Verify that the sections managed are mostly sane * - * Return: SUCCEED/FAIL + * Return: void * * Programmer: Quincey Koziol * Jul 17 2006 * *------------------------------------------------------------------------- */ -herr_t +void H5FS__sect_assert(const H5FS_t *fspace) { hsize_t separate_obj; /* The number of separate objects managed */ @@ -2256,7 +2256,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__sect_assert", fsp size_t size_ghost_count; /* # of ghost sections of this size */ /* Get section size node */ - fspace_node = H5SL_item(curr_size_node); + fspace_node = (H5FS_node_t *)H5SL_item(curr_size_node); /* Check sections on list */ curr_sect_node = H5SL_first(fspace_node->sect_list); @@ -2267,7 +2267,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__sect_assert", fsp H5FS_section_info_t *sect; /* Section */ /* Get section node & it's class */ - sect = H5SL_item(curr_sect_node); + sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node); cls = &fspace->sect_cls[sect->type]; #ifdef QAK HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H5FS__sect_assert", sect->size, sect->addr, sect->type); @@ -2337,7 +2337,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H if(fspace->sinfo->merge_list) HDassert(fspace->tot_sect_count == (separate_obj + H5SL_count(fspace->sinfo->merge_list))); - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI_VOID } /* end H5FS__sect_assert() */ #endif /* H5FS_DEBUG_ASSERT */ -- cgit v0.12 From 2be5b1abd43ff7e1145b4ee9a5698d8c2b6bc9a2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 May 2018 09:22:11 -0500 Subject: Fix typo --- fortran/examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index c836c17..68b817e 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -54,7 +54,7 @@ foreach (example ${examples}) # LINK_FLAGS $<$:> # ) if(MSVC) - set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") + set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran -- cgit v0.12 From 7c74d1f026cc76d5aa33a10da7b8cffef0ad7cda Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 May 2018 10:50:15 -0500 Subject: Correct script names --- java/test/junit.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index c74d2e0..07c3242 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -224,8 +224,8 @@ CLEAN_DATAFILES_AND_BLDDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $RM $BLDDIR/JUnit-interface.ert - $RM $BLDDIR/JUnit-interface.txt + $RM $BLDDIR/JUnit-*.ert + $RM $BLDDIR/JUnit-*.txt fi } -- cgit v0.12 From 448cc37a90b2a71aac45c96949da07d5a9cc9cbd Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 24 May 2018 14:05:47 -0700 Subject: Removed unused H5MF functions and updated FUNC_ENTER macros and naming in H5MFsection.c. --- src/H5MFsection.c | 297 +++++++++++++++++------------------------------------- 1 file changed, 91 insertions(+), 206 deletions(-) diff --git a/src/H5MFsection.c b/src/H5MFsection.c index fe140a7..d722139 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -56,44 +56,40 @@ /********************/ /* 'simple/small/large' section callbacks */ -static H5FS_section_info_t *H5MF_sect_deserialize(const H5FS_section_class_t *cls, +static H5FS_section_info_t *H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size, unsigned *des_flags); -static herr_t H5MF_sect_valid(const H5FS_section_class_t *cls, +static herr_t H5MF__sect_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *sect); -static H5FS_section_info_t *H5MF_sect_split(H5FS_section_info_t *sect, +static H5FS_section_info_t *H5MF__sect_split(H5FS_section_info_t *sect, hsize_t frag_size); /* 'simple' section callbacks */ -static htri_t H5MF_sect_simple_can_merge(const H5FS_section_info_t *sect1, +static htri_t H5MF__sect_simple_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2, void *udata); -static herr_t H5MF_sect_simple_merge(H5FS_section_info_t **sect1, +static herr_t H5MF__sect_simple_merge(H5FS_section_info_t **sect1, H5FS_section_info_t *sect2, void *udata); -static htri_t H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, +static htri_t H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *udata); -static herr_t H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, +static herr_t H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *udata); /* 'small' section callbacks */ -static herr_t H5MF_sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata); -static htri_t H5MF_sect_small_can_merge(const H5FS_section_info_t *sect1, +static herr_t H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata); +static htri_t H5MF__sect_small_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2, void *udata); -static herr_t H5MF_sect_small_merge(H5FS_section_info_t **sect1, +static herr_t H5MF__sect_small_merge(H5FS_section_info_t **sect1, H5FS_section_info_t *sect2, void *udata); -static htri_t H5MF_sect_small_can_shrink(const H5FS_section_info_t *_sect, - void *udata); -static herr_t H5MF_sect_small_shrink(H5FS_section_info_t **_sect, - void *udata); /* 'large' section callbacks */ -static htri_t H5MF_sect_large_can_merge(const H5FS_section_info_t *sect1, +static htri_t H5MF__sect_large_can_merge(const H5FS_section_info_t *sect1, const H5FS_section_info_t *sect2, void *udata); -static herr_t H5MF_sect_large_merge(H5FS_section_info_t **sect1, +static herr_t H5MF__sect_large_merge(H5FS_section_info_t **sect1, H5FS_section_info_t *sect2, void *udata); -static htri_t H5MF_sect_large_can_shrink(const H5FS_section_info_t *_sect, +static htri_t H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *udata); -static herr_t H5MF_sect_large_shrink(H5FS_section_info_t **_sect, +static herr_t H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *udata); /*********************/ @@ -115,14 +111,14 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{ /* Object methods */ NULL, /* Add section */ NULL, /* Serialize section */ - H5MF_sect_deserialize, /* Deserialize section */ - H5MF_sect_simple_can_merge, /* Can sections merge? */ - H5MF_sect_simple_merge, /* Merge sections */ - H5MF_sect_simple_can_shrink, /* Can section shrink container?*/ - H5MF_sect_simple_shrink, /* Shrink container w/section */ + H5MF__sect_deserialize, /* Deserialize section */ + H5MF__sect_simple_can_merge, /* Can sections merge? */ + H5MF__sect_simple_merge, /* Merge sections */ + H5MF__sect_simple_can_shrink, /* Can section shrink container?*/ + H5MF__sect_simple_shrink, /* Shrink container w/section */ H5MF_sect_free, /* Free section */ - H5MF_sect_valid, /* Check validity of section */ - H5MF_sect_split, /* Split section node for alignment */ + H5MF__sect_valid, /* Check validity of section */ + H5MF__sect_split, /* Split section node for alignment */ NULL, /* Dump debugging for section */ }}; @@ -139,16 +135,16 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{ NULL, /* Terminate section class */ /* Object methods */ - H5MF_sect_small_add, /* Add section */ + H5MF__sect_small_add, /* Add section */ NULL, /* Serialize section */ - H5MF_sect_deserialize, /* Deserialize section */ - H5MF_sect_small_can_merge, /* Can sections merge? */ - H5MF_sect_small_merge, /* Merge sections */ - NULL, /* Can section shrink container?*/ - NULL, /* Shrink container w/section */ + H5MF__sect_deserialize, /* Deserialize section */ + H5MF__sect_small_can_merge, /* Can sections merge? */ + H5MF__sect_small_merge, /* Merge sections */ + NULL, /* Can section shrink container?*/ + NULL, /* Shrink container w/section */ H5MF_sect_free, /* Free section */ - H5MF_sect_valid, /* Check validity of section */ - H5MF_sect_split, /* Split section node for alignment */ + H5MF__sect_valid, /* Check validity of section */ + H5MF__sect_split, /* Split section node for alignment */ NULL, /* Dump debugging for section */ }}; @@ -167,14 +163,14 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{ /* Object methods */ NULL, /* Add section */ NULL, /* Serialize section */ - H5MF_sect_deserialize, /* Deserialize section */ - H5MF_sect_large_can_merge, /* Can sections merge? */ - H5MF_sect_large_merge, /* Merge sections */ - H5MF_sect_large_can_shrink, /* Can section shrink container?*/ - H5MF_sect_large_shrink, /* Shrink container w/section */ + H5MF__sect_deserialize, /* Deserialize section */ + H5MF__sect_large_can_merge, /* Can sections merge? */ + H5MF__sect_large_merge, /* Merge sections */ + H5MF__sect_large_can_shrink, /* Can section shrink container?*/ + H5MF__sect_large_shrink, /* Shrink container w/section */ H5MF_sect_free, /* Free section */ - H5MF_sect_valid, /* Check validity of section */ - H5MF_sect_split, /* Split section node for alignment */ + H5MF__sect_valid, /* Check validity of section */ + H5MF__sect_split, /* Split section node for alignment */ NULL, /* Dump debugging for section */ }}; @@ -283,14 +279,14 @@ H5MF_sect_free(H5FS_section_info_t *_sect) *------------------------------------------------------------------------- */ static H5FS_section_info_t * -H5MF_sect_deserialize(const H5FS_section_class_t *cls, +H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UNUSED *buf, haddr_t sect_addr, hsize_t sect_size, unsigned H5_ATTR_UNUSED *des_flags) { H5MF_free_section_t *sect; /* New section */ H5FS_section_info_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(cls); @@ -306,11 +302,11 @@ H5MF_sect_deserialize(const H5FS_section_class_t *cls, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_deserialize() */ +} /* H5MF__sect_deserialize() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_valid + * Function: H5MF__sect_valid * * Purpose: Check the validity of a section * @@ -323,7 +319,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, +H5MF__sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_section_info_t #ifdef NDEBUG H5_ATTR_UNUSED @@ -334,17 +330,17 @@ H5MF_sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */ #endif /* NDEBUG */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Check arguments. */ HDassert(sect); FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5MF_sect_valid() */ +} /* H5MF__sect_valid() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_split + * Function: H5MF__sect_split * * Purpose: Split SECT into 2 sections: fragment for alignment & the aligned section * SECT's addr and size are updated to point to the aligned section @@ -357,11 +353,11 @@ H5MF_sect_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, *------------------------------------------------------------------------- */ static H5FS_section_info_t * -H5MF_sect_split(H5FS_section_info_t *sect, hsize_t frag_size) +H5MF__sect_split(H5FS_section_info_t *sect, hsize_t frag_size) { H5MF_free_section_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Allocate space for new section */ if(NULL == (ret_value = H5MF_sect_new(sect->type, sect->addr, frag_size))) @@ -373,14 +369,14 @@ H5MF_sect_split(H5FS_section_info_t *sect, hsize_t frag_size) done: FUNC_LEAVE_NOAPI((H5FS_section_info_t *)ret_value) -} /* end H5MF_sect_split() */ +} /* end H5MF__sect_split() */ /* * "simple" section callbacks */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_simple_can_merge + * Function: H5MF__sect_simple_can_merge * * Purpose: Can two sections of this type merge? * @@ -395,14 +391,14 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1, +H5MF__sect_simple_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata) { const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */ const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Check arguments. */ HDassert(sect1); @@ -414,11 +410,11 @@ H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1, ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_simple_can_merge() */ +} /* H5MF__sect_simple_can_merge() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_simple_merge + * Function: H5MF__sect_simple_merge * * Purpose: Merge two sections of this type * @@ -433,14 +429,14 @@ H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1, *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, +H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata) { H5MF_free_section_t **sect1 = (H5MF_free_section_t **)_sect1; /* File free section */ H5MF_free_section_t *sect2 = (H5MF_free_section_t *)_sect2; /* File free section */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect1); @@ -458,11 +454,11 @@ H5MF_sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_simple_merge() */ +} /* H5MF__sect_simple_merge() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_simple_can_shrink + * Function: H5MF__sect_simple_can_shrink * * Purpose: Can this section shrink the container? * @@ -475,7 +471,7 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) +H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) { const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */ H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ @@ -483,7 +479,7 @@ H5MF_sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) haddr_t end; /* End of section to extend */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect); @@ -557,11 +553,11 @@ HDfprintf(stderr, "%s: section {%a, %Hu}, adjoins small data aggregator\n", FUNC done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_simple_can_shrink() */ +} /* H5MF__sect_simple_can_shrink() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_simple_shrink + * Function: H5MF__sect_simple_shrink * * Purpose: Shrink container with section * @@ -574,13 +570,13 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) +H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) { H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* File free section */ H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect); @@ -617,7 +613,7 @@ H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_simple_shrink() */ +} /* H5MF__sect_simple_shrink() */ /* * "small" section callbacks @@ -625,7 +621,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5MF_sect_small_add + * Function: H5MF__sect_small_add * * Purpose: Perform actions on a small "meta" action before adding it to the free space manager: * 1) Drop the section if it is at page end and its size <= page end threshold @@ -640,7 +636,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) +H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) { H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* Fractal heap free section */ H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ @@ -648,7 +644,7 @@ H5MF_sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) hsize_t rem, prem; herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Entering, section {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); @@ -684,122 +680,11 @@ HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_inf done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_small_add() */ +} /* H5MF__sect_small_add() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_small_can_shrink - * - * Purpose: Can this section shrink the container? - * - * Note: A small section is allowed to shrink only at closing. - * - * Note: This is unused currently, to maintain the invariant that the - * file size is always a multiple of the page size. - * - * (This function should probably be deleted, or the invariant - * relaxed) - * - * Return: Success: non-negative (TRUE/FALSE) - * Failure: negative - * - * Programmer: Vailin Choi; Dec 2012 - * - *------------------------------------------------------------------------- - */ -static htri_t -H5MF_sect_small_can_shrink(const H5FS_section_info_t *_sect, void *_udata) -{ - const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */ - H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ - haddr_t eoa; /* End of address space in the file */ - haddr_t end; /* End of section to extend */ - htri_t ret_value = FALSE; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Check arguments. */ - HDassert(sect); - HDassert(udata); - HDassert(udata->f); - - /* Retrieve the end of the file's address space */ - if(HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") - - /* Compute address of end of section to check */ - 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) { - udata->shrink = H5MF_SHRINK_EOA; - -#ifdef H5MF_ALLOC_DEBUG_MORE -HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect->sect_info.addr, sect->sect_info.size, eoa); -#endif /* H5MF_ALLOC_DEBUG_MORE */ - - /* Indicate shrinking can occur */ - HGOTO_DONE(TRUE) - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_small_can_shrink() */ - - -/*------------------------------------------------------------------------- - * Function: H5MF_sect_small_shrink - * - * Purpose: Shrink container with section - * - * Note: This is unused currently, to maintain the invariant that the - * file size is always a multiple of the page size. - * - * (This function should probably be deleted, or the invariant - * relaxed) - * - * Return: Success: non-negative - * Failure: negative - * - * Programmer: Vailin Choi; Dec 2012 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5MF_sect_small_shrink(H5FS_section_info_t **_sect, void *_udata) -{ - H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* File free section */ - H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Check arguments. */ - HDassert(sect); - HDassert((*sect)->sect_info.type == H5MF_FSPACE_SECT_SMALL); - HDassert(udata); - HDassert(udata->f); - HDassert(udata->shrink == H5MF_SHRINK_EOA); - HDassert(H5F_INTENT(udata->f) & H5F_ACC_RDWR); - - /* Release section's space at EOA */ - if(H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed") - - /* Free section */ - if(H5MF_sect_free((H5FS_section_info_t *)*sect) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") - - /* Mark section as freed, for free space manager */ - *sect = NULL; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_small_shrink() */ - - -/*------------------------------------------------------------------------- - * Function: H5MF_sect_small_can_merge + * Function: H5MF__sect_small_can_merge * * Purpose: Can two sections of this type merge? * @@ -814,7 +699,7 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5MF_sect_small_can_merge(const H5FS_section_info_t *_sect1, +H5MF__sect_small_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2, void *_udata) { const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */ @@ -822,7 +707,7 @@ H5MF_sect_small_can_merge(const H5FS_section_info_t *_sect1, H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Check arguments. */ HDassert(sect1); @@ -842,11 +727,11 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_small_can_merge() */ +} /* H5MF__sect_small_can_merge() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_small_merge + * Function: H5MF__sect_small_merge * * Purpose: Merge two sections of this type * @@ -862,7 +747,7 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, +H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, void *_udata) { H5MF_free_section_t **sect1 = (H5MF_free_section_t **)_sect1; /* File free section */ @@ -870,7 +755,7 @@ H5MF_sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect1); @@ -905,7 +790,7 @@ H5MF_sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_small_merge() */ +} /* H5MF__sect_small_merge() */ /* * "Large" section callbacks @@ -913,7 +798,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5MF_sect_large_can_merge (same as H5MF_sect_simple_can_merge) + * Function: H5MF__sect_large_can_merge (same as H5MF__sect_simple_can_merge) * * Purpose: Can two sections of this type merge? * @@ -927,14 +812,14 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5MF_sect_large_can_merge(const H5FS_section_info_t *_sect1, +H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata) { const H5MF_free_section_t *sect1 = (const H5MF_free_section_t *)_sect1; /* File free section */ const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Check arguments. */ HDassert(sect1); @@ -949,11 +834,11 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_large_can_merge() */ +} /* H5MF__sect_large_can_merge() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_large_merge (same as H5MF_sect_simple_merge) + * Function: H5MF__sect_large_merge (same as H5MF__sect_simple_merge) * * Purpose: Merge two sections of this type * @@ -967,14 +852,14 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, +H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata) { H5MF_free_section_t **sect1 = (H5MF_free_section_t **)_sect1; /* File free section */ H5MF_free_section_t *sect2 = (H5MF_free_section_t *)_sect2; /* File free section */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect1); @@ -992,11 +877,11 @@ H5MF_sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_large_merge() */ +} /* H5MF__sect_large_merge() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_large_can_shrink + * Function: H5MF__sect_large_can_shrink * * Purpose: Can this section shrink the container? * @@ -1008,7 +893,7 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5MF_sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) +H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) { const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */ H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ @@ -1016,7 +901,7 @@ H5MF_sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) haddr_t end; /* End of section to extend */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect); @@ -1045,11 +930,11 @@ HDfprintf(stderr, "%s: section {%a, %Hu}, shrinks file, eoa = %a\n", FUNC, sect- done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_large_can_shrink() */ +} /* H5MF__sect_large_can_shrink() */ /*------------------------------------------------------------------------- - * Function: H5MF_sect_large_shrink + * Function: H5MF__sect_large_shrink * * Purpose: Shrink a large-sized section * @@ -1061,14 +946,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5MF_sect_large_shrink(H5FS_section_info_t **_sect, void *_udata) +H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata) { H5MF_free_section_t **sect = (H5MF_free_section_t **)_sect; /* File free section */ H5MF_sect_ud_t *udata = (H5MF_sect_ud_t *)_udata; /* User data for callback */ hsize_t frag_size = 0; /* Fragment size */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect); @@ -1100,5 +985,5 @@ H5MF_sect_large_shrink(H5FS_section_info_t **_sect, void *_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5MF_sect_large_shrink() */ +} /* H5MF__sect_large_shrink() */ -- cgit v0.12