From 308880e894e4efa447b4f714ce75376c456abafa Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Tue, 15 Oct 2013 14:16:05 -0500 Subject: [svn-r24293] Bring revisions #24058 - #24098 from trunk to revise_chunks. h5committested. --- CMakeLists.txt | 16 ++++- MANIFEST | 5 +- README.txt | 2 +- c++/src/Makefile.in | 2 +- c++/src/h5c++.in | 10 ++- config/lt_vers.am | 2 +- configure | 22 +++---- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- fortran/src/h5fc.in | 10 +-- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/H5HLprivate2.h | 1 + hl/src/Makefile.in | 2 +- hl/tools/h5watch/h5watch.c | 2 +- release_docs/RELEASE.txt | 2 +- release_docs/USING_HDF5_VS.txt | 4 +- src/CMakeLists.txt | 12 ++-- src/H5B.c | 50 +++++++-------- src/H5Bcache.c | 12 ++-- src/H5Bdbg.c | 10 +-- src/H5Bpkg.h | 4 +- src/H5Bprivate.h | 4 +- src/H5Dbtree.c | 18 +++--- src/H5F.c | 2 +- src/H5Fpkg.h | 4 +- src/H5Fprivate.h | 6 +- src/H5Fquery.c | 2 +- src/H5Gnode.c | 8 +-- src/H5Oprivate.h | 2 +- src/H5RC.c | 127 -------------------------------------- src/H5RCprivate.h | 63 ------------------- src/H5UC.c | 130 +++++++++++++++++++++++++++++++++++++++ src/H5UCprivate.h | 66 ++++++++++++++++++++ src/H5public.h | 4 +- src/Makefile.am | 2 +- src/Makefile.in | 8 +-- src/hdf5.lnt | 2 +- test/CMakeLists.txt | 2 +- tools/h5import/h5import.c | 112 ++++++++++++++++++++++++++++++--- tools/h5repack/h5repack_verify.c | 4 +- tools/misc/h5cc.in | 10 +-- vms/src/h5pubconf.h | 6 +- vms/src/make.com | 2 +- 44 files changed, 440 insertions(+), 320 deletions(-) delete mode 100644 src/H5RC.c delete mode 100644 src/H5RCprivate.h create mode 100644 src/H5UC.c create mode 100644 src/H5UCprivate.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e3d753..7ddc562 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -507,16 +507,16 @@ IF (NOT MSVC) SET (H5_CFLAGS3 "${H5_CFLAGS3} -Wlogical-op -Wlarger-than=2048 -Wvla") # Append more extra warning flags that only gcc 4.4+ know about - SET (H5_CFLAGS3 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat") + SET (H5_CFLAGS4 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat") # Append more extra warning flags that only gcc 4.5+ know about SET (H5_CFLAGS4 "${H5_CFLAGS4} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants") # Append more extra warning flags that only gcc 4.6+ know about - SET (H5_CFLAGS4 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines") + SET (H5_CFLAGS5 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines") # Append more extra warning flags that only gcc 4.7+ know about - SET (H5_CFLAGS4 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn") + SET (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn") ENDIF (NOT MSVC) #----------------------------------------------------------------------------- @@ -605,6 +605,16 @@ IF (HDF5_ENABLE_GROUPFOUR_WARNINGS) ENDIF (HDF5_ENABLE_GROUPFOUR_WARNINGS) #----------------------------------------------------------------------------- +# Option to allow the user to enable warnings by groups +#----------------------------------------------------------------------------- +OPTION (HDF5_ENABLE_GROUPFIVE_WARNINGS "Enable group five warnings" OFF) +IF (HDF5_ENABLE_GROUPFIVE_WARNINGS) + IF (NOT MSVC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS5}") + ENDIF (NOT MSVC) +ENDIF (HDF5_ENABLE_GROUPFIVE_WARNINGS) + +#----------------------------------------------------------------------------- # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- diff --git a/MANIFEST b/MANIFEST index 2660caf..b70fd30 100644 --- a/MANIFEST +++ b/MANIFEST @@ -870,8 +870,8 @@ ./src/H5Rpkg.h ./src/H5Rprivate.h ./src/H5Rpublic.h -./src/H5RC.c -./src/H5RCprivate.h +./src/H5UC.c +./src/H5UCprivate.h ./src/H5RS.c ./src/H5RSprivate.h ./src/H5S.c @@ -2361,7 +2361,6 @@ ./hl/tools/h5watch/h5watch.c ./hl/tools/h5watch/h5watchgentest.c ./hl/tools/h5watch/testh5watch.sh.in -./hl/tools/h5watch/WATCH.h5 # expected test output from testing h5watch # diff --git a/README.txt b/README.txt index 3551695..c55f821 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.162-FA_a5 currently under development +HDF5 version 1.9.164-FA_a5 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 261a7b0..f601487 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 # Include src directory diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index 4c86c6a..a4aaf52 100644 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -122,9 +122,10 @@ usage() { echo " subdirectories [default: $prefix]" echo " -show Show the commands without executing them" echo " -showconfig Show the HDF5 library configuration summary" - echo " -shlib Compile with shared HDF5 libraries [default when built with" - echo " disable-static]" - echo " -noshlib Compile with static HDF5 libraries [default when static available]" + echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built" + echo " without static libraries]" + echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built" + echo " with static libraries]" echo " " echo " - the normal compile line options for your compiler." echo " $prog_name uses the same compiler you used to compile" @@ -137,6 +138,9 @@ usage() { echo " " echo " HDF5_CXX - use a different C++ compiler" echo " HDF5_CXXLINKER - use a different linker" + echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" + echo " [default: no except when built with only" + echo " shared libraries]" echo " You can also add or change paths and flags to the compile line using" echo " the following environment varibles or by assigning them to their counterparts" echo " in the 'Things You Can Modify to Override...'" section of $prog_name diff --git a/config/lt_vers.am b/config/lt_vers.am index 710e2a0..8d9927b 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 12c4eb7..cdfde30 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.162-FA_a5. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.164-FA_a5. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.162-FA_a5' -PACKAGE_STRING='HDF5 1.9.162-FA_a5' +PACKAGE_VERSION='1.9.164-FA_a5' +PACKAGE_STRING='HDF5 1.9.164-FA_a5' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.162-FA_a5 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.164-FA_a5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.162-FA_a5:";; + short | recursive ) echo "Configuration of HDF5 1.9.164-FA_a5:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.162-FA_a5 +HDF5 configure 1.9.164-FA_a5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.162-FA_a5, which was +It was created by HDF5 $as_me 1.9.164-FA_a5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.162-FA_a5' + VERSION='1.9.164-FA_a5' cat >>confdefs.h <<_ACEOF @@ -31613,7 +31613,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.162-FA_a5 +HDF5 config.lt 1.9.164-FA_a5 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33743,7 +33743,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.162-FA_a5, which was +This file was extended by HDF5 $as_me 1.9.164-FA_a5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33809,7 +33809,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.162-FA_a5 +HDF5 config.status 1.9.164-FA_a5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f99ad95..17981ca 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.162-FA_a5], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.164-FA_a5], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 65ebcaf..e826a35 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in index 1285541..b5a6486 100644 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -118,9 +118,10 @@ usage() { echo " subdirectories [default: $prefix]" echo " -show Show the commands without executing them" echo " -showconfig Show the HDF5 library configuration summary" - echo " -shlib Compile with shared HDF5 libraries [default when built with" - echo " disable-static]" - echo " -noshlib Compile with static HDF5 libraries [default when static available]" + echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built" + echo " without static libraries]" + echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built" + echo " with static libraries]" echo " " echo " - the normal compile line options for your compiler." echo " $prog_name uses the same compiler you used to compile" @@ -133,7 +134,8 @@ usage() { echo " HDF5_FC - use a different Fortran 90 or 95 compiler" echo " HDF5_FLINKER - use a different linker" echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" - echo " [default: no]" + echo " [default: no except when built with only" + echo " shared libraries]" echo " " echo " You can also add or change paths and flags to the compile line using" echo " the following environment varibles or by assigning them to their counterparts" diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 369ccc2..102fe39 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 85e4757..c69b952 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/H5HLprivate2.h b/hl/src/H5HLprivate2.h index 7480bd8..5646d6c 100644 --- a/hl/src/H5HLprivate2.h +++ b/hl/src/H5HLprivate2.h @@ -66,6 +66,7 @@ #ifndef HDrealloc #define HDrealloc(M,Z) realloc(M,Z) #endif /* HDrealloc */ +H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifndef HDfree #define HDfree(M) free(M) #endif /* HDfree */ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 466449c..a796bd1 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 # This library is our main target. diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 7cf8ff6..2324300 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -20,6 +20,7 @@ #include #include "h5tools.h" +#include "h5tools_dump.h" #include "h5tools_utils.h" #include "h5tools_ref.h" #include "h5trav.h" @@ -313,7 +314,6 @@ done: static herr_t monitor_dataset(hid_t fid, char *dsetname) { - char drivername[50];/* Driver's name for opening the file */ hid_t did; /* dataset id */ hid_t sid; /* dataspace id */ int ndims; /* # of dimensions in the dataspace */ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c320061..c000431 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.162-FA_a5 currently under development +HDF5 version 1.9.164-FA_a5 currently under development INTRODUCTION diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index b817f7e..9bf301e 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -35,7 +35,7 @@ Using Visual Studio 2010 with HDF5 Libraries built with Visual Studio 2010 library, and then optionally the HDF5 High Level, Fortran or C++ libraries. For example, to compile a C++ application, enter: - szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib + szip.lib zlib.lib hdf5.lib hdf5_cpp.lib ========================================================================== @@ -67,7 +67,7 @@ Using Visual Studio 2008 with HDF5 Libraries built with Visual Studio 2008 library, and then optionally the HDF5 High Level, Fortran or C++ libraries. For example, to compile a C++ application, enter: - szip.lib zlib.lib hdf5dll.lib hdf5_cppdll.lib + szip.lib zlib.lib hdf5.lib hdf5_cpp.lib ======================================================================== 3. Helpful Pointers diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2a1c7e..b667199 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -511,12 +511,12 @@ SET (H5R_HDRS IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" ) -SET (H5RC_SRCS - ${HDF5_SRC_DIR}/H5RC.c +SET (H5UC_SRCS + ${HDF5_SRC_DIR}/H5UC.c ) -SET (H5RC_HDRS +SET (H5UC_HDRS ) -IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5UC" "${H5UC_HDRS}" "${H5UC_SRCS}" ) SET (H5RS_SRCS @@ -686,7 +686,7 @@ SET (common_SRCS ${H5P_SRCS} ${H5PL_SRCS} ${H5R_SRCS} - ${H5RC_SRCS} + ${H5UC_SRCS} ${H5RS_SRCS} ${H5S_SRCS} ${H5SL_SRCS} @@ -764,7 +764,7 @@ SET (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5Oprivate.h ${HDF5_SRC_DIR}/H5Pprivate.h ${HDF5_SRC_DIR}/H5PLprivate.h - ${HDF5_SRC_DIR}/H5RCprivate.h + ${HDF5_SRC_DIR}/H5UCprivate.h ${HDF5_SRC_DIR}/H5Rprivate.h ${HDF5_SRC_DIR}/H5RSprivate.h ${HDF5_SRC_DIR}/H5SLprivate.h diff --git a/src/H5B.c b/src/H5B.c index b75939c..646ffd2 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -245,8 +245,8 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata, bt->nchildren = 0; if(NULL == (bt->rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer") - H5RC_INC(bt->rc_shared); - shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + H5UC_INC(bt->rc_shared); + shared=(H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) || NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k))) @@ -308,7 +308,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata, void *parent) { H5B_t *bt = NULL; - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */ @@ -330,7 +330,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -399,7 +399,7 @@ H5B_find_node(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata, void *parent, H5B_t **node) { H5B_t *bt = NULL; - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */ @@ -421,7 +421,7 @@ H5B_find_node(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -531,7 +531,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx, /* * Initialize variables. */ - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt_ud->bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt_ud->bt->rc_shared); HDassert(shared); HDassert(bt_ud->bt->nchildren == shared->two_k); @@ -779,7 +779,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */ H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */ H5B_t *new_root_bt = NULL; /* New root node */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ H5B_ins_t my_ins = H5B_INS_ERROR; @@ -798,7 +798,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* Protect the root node */ @@ -976,7 +976,7 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned *idx, HDassert(bt); HDassert(bt_flags); HDassert(H5F_addr_defined(child)); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(bt->nchildren < shared->two_k); @@ -1062,7 +1062,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, H5B_ins_ud_t *split_bt_ud/*out*/) { H5B_t *bt; /* Convenience pointer to B-tree */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */ @@ -1102,7 +1102,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -1430,7 +1430,7 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add H5B_operator_t op, void *udata, void *parent) { H5B_t *bt = NULL; /* Pointer to current B-tree node */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned i; /* Index */ @@ -1450,7 +1450,7 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* Protect the initial/current node */ @@ -1553,7 +1553,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type { H5B_t *bt = NULL, *sibling = NULL; unsigned bt_flags = H5AC__NO_FLAGS_SET; - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */ @@ -1573,7 +1573,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -1924,7 +1924,7 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata, void *parent) { H5B_t *bt = NULL; /* B-tree node being operated on */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned u; /* Local index variable */ @@ -1940,7 +1940,7 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* Lock this B-tree node into memory for now */ @@ -2123,7 +2123,7 @@ H5B_copy(const H5B_t *old_bt) * Check arguments. */ HDassert(old_bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(old_bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(old_bt->rc_shared); HDassert(shared); /* Allocate memory for the new H5B_t object */ @@ -2145,7 +2145,7 @@ H5B_copy(const H5B_t *old_bt) HDmemcpy(new_node->child, old_bt->child, (sizeof(haddr_t) * shared->two_k)); /* Increment the ref-count on the raw page */ - H5RC_INC(new_node->rc_shared); + H5UC_INC(new_node->rc_shared); /* Set return value */ ret_value = new_node; @@ -2181,7 +2181,7 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad const H5B_info_ud_t *info_udata, void *parent) { H5B_t *bt = NULL; /* Pointer to current B-tree node */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned level; /* Node level */ @@ -2205,7 +2205,7 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, info_udata->udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* Get the raw node size for iteration */ @@ -2340,7 +2340,7 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *parent) { H5B_t *bt = NULL; /* The B-tree */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ htri_t ret_value = SUCCEED; /* Return value */ @@ -2359,7 +2359,7 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, NULL))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -2406,7 +2406,7 @@ H5B_node_dest(H5B_t *bt) bt->child = H5FL_SEQ_FREE(haddr_t, bt->child); bt->native = H5FL_BLK_FREE(native_block, bt->native); - H5RC_DEC(bt->rc_shared); + H5UC_DEC(bt->rc_shared); bt = H5FL_FREE(H5B_t, bt); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 0afe251..b85c10c 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -122,10 +122,10 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Set & increment the ref-counted "shared" B-tree information for the node */ bt->rc_shared = udata->rc_shared; - H5RC_INC(bt->rc_shared); + H5UC_INC(bt->rc_shared); /* Get a pointer to the shared info, for convenience */ - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); /* Allocate space for the native keys and child addresses */ @@ -225,7 +225,7 @@ H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, un HDassert(f); HDassert(H5F_addr_defined(addr)); HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(shared->type); HDassert(shared->type->encode); @@ -326,7 +326,7 @@ H5B__dest(H5F_t *f, H5B_t *bt) H5B_shared_t *shared; /* Pointer to shared B-tree info */ /* Get the pointer to the shared B-tree info */ - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); /* Release the space on disk */ @@ -407,7 +407,7 @@ H5B__notify(H5AC_notify_action_t action, H5B_t *bt) */ HDassert(bt); HDassert(bt->rc_shared); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); /* Check if the file was opened with SWMR-write access */ if(shared->swmr_write) { @@ -462,7 +462,7 @@ H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) HDassert(f); HDassert(bt); HDassert(bt->rc_shared); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(shared->type); HDassert(size_ptr); diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index c309a0a..fa721f0 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -59,7 +59,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f const H5B_class_t *type, void *udata) { H5B_t *bt = NULL; - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ unsigned u; /* Local index variable */ @@ -83,7 +83,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* @@ -178,7 +178,7 @@ herr_t H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void *udata) { H5B_t *bt = NULL; - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ int ncell, cmp; @@ -203,7 +203,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, udata))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); HDassert(shared); /* Initialize the queue */ @@ -212,7 +212,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void cache_udata.rc_shared = rc_shared; bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ); HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t)); HDassert(cur); diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 8478ae3..7832a09 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -52,7 +52,7 @@ typedef struct H5B_t { H5AC_info_t cache_info; /* Information for H5AC cache functions */ /* _must_ be first field in structure */ - H5RC_t *rc_shared; /*ref-counted shared info */ + H5UC_t *rc_shared; /*ref-counted shared info */ unsigned level; /*node level */ unsigned nchildren; /*number of child pointers */ haddr_t left; /*address of left sibling */ @@ -69,7 +69,7 @@ typedef struct H5B_cache_ud_t { H5F_t *f; /* File that B-tree node is within */ const struct H5B_class_t *type; /* Type of tree */ void *parent; /* Flush dependency parent */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; /*****************************/ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 1d371a3..32236f0 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -34,7 +34,7 @@ /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ #include "H5Fprivate.h" /* File access */ -#include "H5RCprivate.h" /* Reference counted object functions */ +#include "H5UCprivate.h" /* Reference counted object functions */ /**************************/ /* Library Private Macros */ @@ -114,7 +114,7 @@ typedef struct H5B_shared_t { typedef struct H5B_class_t { H5B_subid_t id; /*id as found in file*/ size_t sizeof_nkey; /*size of native (memory) key*/ - H5RC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */ + H5UC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */ herr_t (*new_node)(H5F_t*, hid_t, H5B_ins_t, void*, void*, void*, haddr_t*); int (*cmp2)(void*, void*, void*); /*compare 2 keys */ int (*cmp3)(void*, void*, void*); /*compare 3 keys */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 7ba29b8..89e6fba 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -105,7 +105,7 @@ static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_k haddr_t addr, const void *right_key, void *_udata); /* B-tree callbacks */ -static H5RC_t *H5D__btree_get_shared(const H5F_t *f, const void *_udata); +static H5UC_t *H5D__btree_get_shared(const H5F_t *f, const void *_udata); static herr_t H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p /*out*/); static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key); @@ -232,7 +232,7 @@ H5B_class_t H5B_BTREE[1] = {{ *------------------------------------------------------------------------- */ /* ARGSUSED */ -static H5RC_t * +static H5UC_t * H5D__btree_get_shared(const H5F_t UNUSED *f, const void *_udata) { const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *) _udata; @@ -822,7 +822,7 @@ H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned nd /* */ HDassert(!store->u.btree.shared); /* Make shared B-tree info reference counted */ - if(NULL == (store->u.btree.shared = H5RC_create(shared, H5B_shared_free))) + if(NULL == (store->u.btree.shared = H5UC_create(shared, H5B_shared_free))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") done: @@ -1398,7 +1398,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Release the shared B-tree page */ if(NULL == tmp_storage.u.btree.shared) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(tmp_storage.u.btree.shared) < 0) + if(H5UC_DEC(tmp_storage.u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ @@ -1483,9 +1483,9 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, HDassert(storage_dst); /* Decrement refcount on shared B-tree info */ - if(H5RC_DEC(storage_src->u.btree.shared) < 0) + if(H5UC_DEC(storage_src->u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") - if(H5RC_DEC(storage_dst->u.btree.shared) < 0) + if(H5UC_DEC(storage_dst->u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") done: @@ -1563,7 +1563,7 @@ done: if(shared_init) { if(NULL == idx_info->storage->u.btree.shared) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0) + if(H5UC_DEC(idx_info->storage->u.btree.shared) < 0) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ @@ -1765,7 +1765,7 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Free the raw B-tree node buffer */ if(NULL == idx_info->storage->u.btree.shared) HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0) + if(H5UC_DEC(idx_info->storage->u.btree.shared) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") done: @@ -1820,7 +1820,7 @@ done: if(NULL == storage.u.btree.shared) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") else - if(H5RC_DEC(storage.u.btree.shared) < 0) + if(H5UC_DEC(storage.u.btree.shared) < 0) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ diff --git a/src/H5F.c b/src/H5F.c index e442803..6b89c4e 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -3223,7 +3223,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_set_grp_btree_shared(H5F_t *f, H5RC_t *rc) +H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 59e50e3..e47662e 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -42,7 +42,7 @@ #include "H5FSprivate.h" /* File free space */ #include "H5Gprivate.h" /* Groups */ #include "H5Oprivate.h" /* Object header messages */ -#include "H5RCprivate.h" /* Reference counted object functions */ +#include "H5UCprivate.h" /* Reference counted object functions */ /* @@ -236,7 +236,7 @@ struct H5F_file_t { struct H5HG_heap_t **cwfs; /* Global heap cache */ struct H5G_t *root_grp; /* Open root group */ H5FO_t *open_objs; /* Open objects in file */ - H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */ + H5UC_t *grp_btree_shared; /* Ref-counted group B-tree node info */ /* File space allocation information */ H5F_file_space_type_t fs_strategy; /* File space handling strategy */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index ee478c2..09dfcec 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -549,7 +549,7 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t; /* Forward declarations for prototype arguments */ struct H5B_class_t; -struct H5RC_t; +struct H5UC_t; struct H5O_loc_t; struct H5HG_heap_t; @@ -600,8 +600,8 @@ H5_DLL unsigned H5F_gc_ref(const H5F_t *f); H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f); H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f); H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag); -H5_DLL struct H5RC_t *H5F_grp_btree_shared(const H5F_t *f); -H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5RC_t *rc); +H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f); +H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5UC_t *rc); H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f); H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr); diff --git a/src/H5Fquery.c b/src/H5Fquery.c index c04ba24..6c3ca12 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -703,7 +703,7 @@ H5F_get_base_addr(const H5F_t *f) * *------------------------------------------------------------------------- */ -H5RC_t * +H5UC_t * H5F_grp_btree_shared(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index d579da6..3226f5f 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -77,7 +77,7 @@ typedef struct H5G_node_key_t { /********************/ /* B-tree callbacks */ -static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); +static H5UC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p/*out*/); @@ -158,7 +158,7 @@ H5FL_SEQ_DEFINE(H5G_entry_t); * *------------------------------------------------------------------------- */ -static H5RC_t * +static H5UC_t * H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1191,7 +1191,7 @@ H5G__node_init(H5F_t *f) /* */ /* Make shared B-tree info reference counted */ - if(H5F_SET_GRP_BTREE_SHARED(f, H5RC_create(shared, H5B_shared_free)) < 0) + if(H5F_SET_GRP_BTREE_SHARED(f, H5UC_create(shared, H5B_shared_free)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") done: @@ -1224,7 +1224,7 @@ H5G_node_close(const H5F_t *f) /* Free the raw B-tree node buffer */ if(H5F_GRP_BTREE_SHARED(f)) - H5RC_DEC(H5F_GRP_BTREE_SHARED(f)); + H5UC_DEC(H5F_GRP_BTREE_SHARED(f)); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G_node_close */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 1bef253..1a0f76c 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -416,7 +416,7 @@ typedef struct H5O_storage_contig_t { typedef struct H5O_storage_chunk_btree_t { haddr_t dset_ohdr_addr; /* File address dataset's object header */ - H5RC_t *shared; /* Ref-counted shared info for B-tree nodes */ + H5UC_t *shared; /* Ref-counted shared info for B-tree nodes */ } H5O_storage_chunk_btree_t; /* Forward declaration of structs used below */ diff --git a/src/H5RC.c b/src/H5RC.c deleted file mode 100644 index 6abe837..0000000 --- a/src/H5RC.c +++ /dev/null @@ -1,127 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Reference counting buffer algorithms. - * - * These are used for various internal buffers which are shared. - * - */ - - -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5RCprivate.h" /* Reference-counted buffers */ - -/* Private typedefs & structs */ - -/* Declare a free list to manage the H5RC_t struct */ -H5FL_DEFINE_STATIC(H5RC_t); - - -/*-------------------------------------------------------------------------- - NAME - H5RC_create - PURPOSE - Create a reference counted object - USAGE - H5RC_t *H5RC_create(o,free) - const void *o; IN: Object to initialize ref-counted object with - H5RC_free_func_t free; IN: Function to call when ref-count drop to zero - - RETURNS - Returns a pointer to a new ref-counted object on success, NULL on failure. - DESCRIPTION - Create a reference counted object. The object is not duplicated, it is - assumed to be owned by the reference counted object now and will be freed - with the 'free' function when the reference count drops to zero. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ -H5RC_t * -H5RC_create(void *o, H5RC_free_func_t free_func) -{ - H5RC_t *ret_value; /* Return value */ - - FUNC_ENTER_NOAPI(NULL) - - /* Sanity check */ - HDassert(o); - HDassert(free_func); - - /* Allocate ref-counted string structure */ - if(NULL == (ret_value = H5FL_MALLOC(H5RC_t))) - HGOTO_ERROR(H5E_RS,H5E_NOSPACE,NULL,"memory allocation failed") - - /* Set the internal fields */ - ret_value->o = o; - ret_value->n = 1; - ret_value->free_func = free_func; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5RC_create() */ - - -/*-------------------------------------------------------------------------- - NAME - H5RC_decr - PURPOSE - Decrement the reference count for a ref-counted object - USAGE - herr_t H5RC_decr(rc) - H5RC_t *rc; IN: Ref-counted object to decrement count for - - RETURNS - SUCCEED/FAIL - DESCRIPTION - Decrements the reference count for a ref-counted object, calling the - object's free function if ref-count drops to zero. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ -herr_t -H5RC_decr(H5RC_t *rc) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - /* Sanity check */ - HDassert(rc); - HDassert(rc->o); - HDassert(rc->n > 0); - HDassert(rc->free_func); - - /* Decrement reference count */ - rc->n--; - - /* Check if we should delete this object now */ - if(rc->n == 0) { - if((rc->free_func)(rc->o) < 0) { - rc = H5FL_FREE(H5RC_t, rc); - HGOTO_ERROR(H5E_RS, H5E_CANTFREE, FAIL, "memory release failed") - } /* end if */ - rc = H5FL_FREE(H5RC_t, rc); - } /* end if */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5RC_decr() */ - diff --git a/src/H5RCprivate.h b/src/H5RCprivate.h deleted file mode 100644 index 2fe3551..0000000 --- a/src/H5RCprivate.h +++ /dev/null @@ -1,63 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * This file contains private information about the H5RC module - */ -#ifndef _H5RCprivate_H -#define _H5RCprivate_H - -/**************************************/ -/* Public headers needed by this file */ -/**************************************/ -#ifdef LATER -#include "H5RCpublic.h" -#endif /* LATER */ - -/***************************************/ -/* Private headers needed by this file */ -/***************************************/ -#include "H5private.h" - -/************/ -/* Typedefs */ -/************/ - -/* Typedef for function to release object when reference count drops to zero */ -typedef herr_t (*H5RC_free_func_t)(void *o); - -/* Typedef for reference counted objects */ -typedef struct H5RC_t { - void *o; /* Object to be reference counted */ - size_t n; /* Reference count of number of pointers sharing object */ - H5RC_free_func_t free_func; /* Function to free object */ -} H5RC_t; - -/**********/ -/* Macros */ -/**********/ -#define H5RC_INC(rc) ((rc)->n++) -#define H5RC_DEC(rc) (H5RC_decr(rc)) -#define H5RC_GET_OBJ(rc) ((rc)->o) - -/********************/ -/* Private routines */ -/********************/ -H5_DLL H5RC_t *H5RC_create(void *s, H5RC_free_func_t free_func); -H5_DLL herr_t H5RC_decr(H5RC_t *rc); - -#endif /* _H5RSprivate_H */ - - diff --git a/src/H5UC.c b/src/H5UC.c new file mode 100644 index 0000000..5762cc5 --- /dev/null +++ b/src/H5UC.c @@ -0,0 +1,130 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Reference counting buffer algorithms. + * + * These are used for various internal buffers which are shared. + * + * The module used to be H5RC, but changed to H5UC because of + * conflicting requirement for the use of H5RC. + * + */ + + +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5UCprivate.h" /* Reference-counted buffers */ + +/* Private typedefs & structs */ + +/* Declare a free list to manage the H5UC_t struct */ +H5FL_DEFINE_STATIC(H5UC_t); + + +/*-------------------------------------------------------------------------- + NAME + H5UC_create + PURPOSE + Create a reference counted object + USAGE + H5UC_t *H5UC_create(o,free) + const void *o; IN: Object to initialize ref-counted object with + H5UC_free_func_t free; IN: Function to call when ref-count drop to zero + + RETURNS + Returns a pointer to a new ref-counted object on success, NULL on failure. + DESCRIPTION + Create a reference counted object. The object is not duplicated, it is + assumed to be owned by the reference counted object now and will be freed + with the 'free' function when the reference count drops to zero. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +H5UC_t * +H5UC_create(void *o, H5UC_free_func_t free_func) +{ + H5UC_t *ret_value; /* Return value */ + + FUNC_ENTER_NOAPI(NULL) + + /* Sanity check */ + HDassert(o); + HDassert(free_func); + + /* Allocate ref-counted string structure */ + if(NULL == (ret_value = H5FL_MALLOC(H5UC_t))) + HGOTO_ERROR(H5E_RS,H5E_NOSPACE,NULL,"memory allocation failed") + + /* Set the internal fields */ + ret_value->o = o; + ret_value->n = 1; + ret_value->free_func = free_func; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5UC_create() */ + + +/*-------------------------------------------------------------------------- + NAME + H5UC_decr + PURPOSE + Decrement the reference count for a ref-counted object + USAGE + herr_t H5UC_decr(rc) + H5UC_t *rc; IN: Ref-counted object to decrement count for + + RETURNS + SUCCEED/FAIL + DESCRIPTION + Decrements the reference count for a ref-counted object, calling the + object's free function if ref-count drops to zero. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5UC_decr(H5UC_t *rc) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity check */ + HDassert(rc); + HDassert(rc->o); + HDassert(rc->n > 0); + HDassert(rc->free_func); + + /* Decrement reference count */ + rc->n--; + + /* Check if we should delete this object now */ + if(rc->n == 0) { + if((rc->free_func)(rc->o) < 0) { + rc = H5FL_FREE(H5UC_t, rc); + HGOTO_ERROR(H5E_RS, H5E_CANTFREE, FAIL, "memory release failed") + } /* end if */ + rc = H5FL_FREE(H5UC_t, rc); + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5UC_decr() */ + diff --git a/src/H5UCprivate.h b/src/H5UCprivate.h new file mode 100644 index 0000000..a702c03 --- /dev/null +++ b/src/H5UCprivate.h @@ -0,0 +1,66 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * This file contains private information about the H5UC module + * The module used to be H5RC, but changed to H5UC because of + * conflicting requirement for the use of H5RC. + */ + +#ifndef _H5UCprivate_H +#define _H5UCprivate_H + +/**************************************/ +/* Public headers needed by this file */ +/**************************************/ +#ifdef LATER +#include "H5UCpublic.h" +#endif /* LATER */ + +/***************************************/ +/* Private headers needed by this file */ +/***************************************/ +#include "H5private.h" + +/************/ +/* Typedefs */ +/************/ + +/* Typedef for function to release object when reference count drops to zero */ +typedef herr_t (*H5UC_free_func_t)(void *o); + +/* Typedef for reference counted objects */ +typedef struct H5UC_t { + void *o; /* Object to be reference counted */ + size_t n; /* Reference count of number of pointers sharing object */ + H5UC_free_func_t free_func; /* Function to free object */ +} H5UC_t; + +/**********/ +/* Macros */ +/**********/ +#define H5UC_INC(rc) ((rc)->n++) +#define H5UC_DEC(rc) (H5UC_decr(rc)) +#define H5UC_GET_OBJ(rc) ((rc)->o) + +/********************/ +/* Private routines */ +/********************/ +H5_DLL H5UC_t *H5UC_create(void *s, H5UC_free_func_t free_func); +H5_DLL herr_t H5UC_decr(H5UC_t *rc); + +#endif /* _H5RSprivate_H */ + + diff --git a/src/H5public.h b/src/H5public.h index 5087a8c..eab0a7b 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 162 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 164 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "FA_a5" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.162-FA_a5" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.164-FA_a5" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.am b/src/Makefile.am index c910714..49676ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -96,7 +96,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ - H5RC.c \ + H5UC.c \ H5RS.c \ H5S.c H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ H5Sselect.c H5Stest.c \ diff --git a/src/Makefile.in b/src/Makefile.in index f5d89b0..0f435f5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -163,7 +163,7 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo \ H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo \ H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo \ - H5Pstrcpl.lo H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5RC.lo \ + H5Pstrcpl.lo H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo \ H5RS.lo H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo \ H5Snone.lo H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \ @@ -525,7 +525,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 152 +LT_VERS_REVISION = 154 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) @@ -596,7 +596,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ - H5RC.c \ + H5UC.c \ H5RS.c \ H5S.c H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ H5Sselect.c H5Stest.c \ @@ -977,7 +977,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pstrcpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5R.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Rdeprec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5S.Plo@am__quote@ @@ -1021,6 +1020,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tstrpad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvisit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvlen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5UC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Z.Plo@am__quote@ diff --git a/src/hdf5.lnt b/src/hdf5.lnt index 1d02039..6865720 100644 --- a/src/hdf5.lnt +++ b/src/hdf5.lnt @@ -33,7 +33,7 @@ -esym(534, H5CS_push, H5CS_pop) -esym(534, H5I_clear_type, H5I_dec_type_ref) -esym(534, H5MM_xfree) --esym(534, H5RC_decr) +-esym(534, H5UC_decr) -esym(534, H5V_array_fill) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2704f0c..f41a5a1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -65,7 +65,7 @@ IF (BUILD_SHARED_LIBS) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c) - TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ") + TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ") TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 7038a95..a10ef24 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -273,7 +273,6 @@ static int gtoken(char *s) * identify the token type */ if (s[0] == '-') { /* option name (or negative number) */ - token = ERR; len = HDstrlen(&s[1]); switch (s[1]) { case 'o': @@ -310,6 +309,9 @@ static int gtoken(char *s) if (!HDstrncmp("size", &s[1], len)) token = OPT_s; break; + default: + token = ERR; /* not a supported option tag */ + break; } if (token == ERR) @@ -3386,6 +3388,11 @@ hid_t createOutputDataType(struct Input *in) { hid_t new_type = (-1); const char *err1 = "Invalid value for output class.\n"; + const char *err2 = "Invalid value for output size.\n"; + const char *err3 = "Invalid value for output byte order.\n"; + const char *err4 = "Invalid value for output architecture.\n"; + const char *err5 = "STD not supported for float.\n"; + const char *err6 = "IEEE not supported for INT.\n"; switch (in->outputClass) { case 0: @@ -3407,6 +3414,10 @@ hid_t createOutputDataType(struct Input *in) case 64: new_type = H5Tcopy(H5T_NATIVE_LLONG); break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } switch (in->outputByteOrder) { case -1: /* default */ @@ -3418,6 +3429,10 @@ hid_t createOutputDataType(struct Input *in) case 1: H5Tset_order(new_type, H5T_ORDER_LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3433,6 +3448,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_I8LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3446,6 +3465,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_I16LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3459,6 +3482,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_I32LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3472,11 +3499,22 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_I64LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } break; + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); } break; @@ -3491,6 +3529,10 @@ hid_t createOutputDataType(struct Input *in) case 64: new_type = H5Tcopy(H5T_NATIVE_DOUBLE); break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } switch (in->outputByteOrder) { case -1: /* DEFAULT */ @@ -3502,12 +3544,16 @@ hid_t createOutputDataType(struct Input *in) case 1: H5Tset_order(new_type, H5T_ORDER_LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; case 1: - /* STD not supported for float */ - break; + (void) HDfprintf(stderr, "%s", err5); + return (-1); case 2: switch (in->outputSize) { @@ -3521,6 +3567,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_IEEE_F32LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3534,11 +3584,22 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_IEEE_F64LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } break; + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); } break; @@ -3561,6 +3622,10 @@ hid_t createOutputDataType(struct Input *in) case 64: new_type = H5Tcopy(H5T_NATIVE_ULLONG); break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } switch (in->outputByteOrder) { case -1: /* Default */ @@ -3572,6 +3637,10 @@ hid_t createOutputDataType(struct Input *in) case 1: H5Tset_order(new_type, H5T_ORDER_LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3587,6 +3656,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_U8LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3600,6 +3673,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_U16LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3613,6 +3690,10 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_U32LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; @@ -3626,17 +3707,27 @@ hid_t createOutputDataType(struct Input *in) case 1: new_type = H5Tcopy(H5T_STD_U64LE); break; + + default: + (void) HDfprintf(stderr, "%s", err3); + return (-1); } break; + + default: + (void) HDfprintf(stderr, "%s", err2); + return (-1); } break; case 2: - /* IEEE not supported for INT */ - break; + (void) HDfprintf(stderr, "%s", err6); + return (-1); + default: + (void) HDfprintf(stderr, "%s", err4); + return (-1); } - break; default: @@ -3650,6 +3741,7 @@ hid_t createInputDataType(struct Input *in) { hid_t new_type = (-1); const char *err1 = "Invalid value for input class.\n"; + const char *err2 = "Invalid value for output size.\n"; switch (in->inputClass) { case 0: @@ -3672,7 +3764,7 @@ hid_t createInputDataType(struct Input *in) break; default: - (void) HDfprintf(stderr, "%s", err1); + (void) HDfprintf(stderr, "%s", err2); return (-1); } break; @@ -3690,12 +3782,14 @@ hid_t createInputDataType(struct Input *in) break; default: - (void) HDfprintf(stderr, "%s", err1); + (void) HDfprintf(stderr, "%s", err2); return (-1); } break; case 5: + (void) HDfprintf(stderr, "%s", err1); + return (-1); break; case 6: @@ -3718,7 +3812,7 @@ hid_t createInputDataType(struct Input *in) break; default: - (void) HDfprintf(stderr, "%s", err1); + (void) HDfprintf(stderr, "%s", err2); return (-1); } break; diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index 47cba5b..a57295b 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -676,7 +676,9 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter) break; - + default: + /* filter has no local values */ + break; } /* switch */ diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in index f62c66f..da1a26d 100644 --- a/tools/misc/h5cc.in +++ b/tools/misc/h5cc.in @@ -132,9 +132,10 @@ usage() { echo " subdirectories [default: $prefix]" echo " -show Show the commands without executing them" echo " -showconfig Show the HDF5 library configuration summary" - echo " -shlib Compile with shared HDF5 libraries [default when built with" - echo " disable-static]" - echo " -noshlib Compile with static HDF5 libraries [default when static available]" + echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built" + echo " without static libraries]" + echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built" + echo " with static libraries]" echo " " echo " - the normal compile line options for your compiler." echo " $prog_name uses the same compiler you used to compile" @@ -148,7 +149,8 @@ usage() { echo " HDF5_CC - use a different C compiler" echo " HDF5_CLINKER - use a different linker" echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library" - echo " [default: no]" + echo " [default: no except when built with only" + echo " shared libraries]" echo " " echo " You can also add or change paths and flags to the compile line using" echo " the following environment varibles or by assigning them to their counterparts" diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 3152e3b..d32692d 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.162-FA_a5" +#define H5_PACKAGE_STRING "HDF5 1.9.164-FA_a5" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.162-FA_a5" +#define H5_PACKAGE_VERSION "1.9.164-FA_a5" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.162-FA_a5" +#define H5_VERSION "1.9.164-FA_a5" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/vms/src/make.com b/vms/src/make.com index cdf0f4a..20429b2 100644 --- a/vms/src/make.com +++ b/vms/src/make.com @@ -59,7 +59,7 @@ $ cobj1= "H5MFaggr, H5MF, H5MFdbg, H5MFsection, H5MM,"+- "H5Orefcount, H5Osdspace, H5Oshared, H5Oshmesg, H5Ostab, H5Otest, H5Ounknown,"+- "H5Pacpl, H5P, H5Pdapl, H5Pdcpl, H5Pdeprec, H5Pdxpl, H5Pencdec, H5Pfapl, H5Pfcpl, H5Pfmpl, H5Pgcpl, H5Pint,"+- "H5Plapl, H5Plcpl, H5Pocpl, H5Pocpypl, H5Pstrcpl, H5Ptest,"+- - "H5R, H5RC, H5Rdeprec, H5RS, H5Sall, H5S, H5Sdbg, H5Shyper, H5SL, H5SMbtree2, H5SM, H5SMcache,"+- + "H5R, H5UC, H5Rdeprec, H5RS, H5Sall, H5S, H5Sdbg, H5Shyper, H5SL, H5SMbtree2, H5SM, H5SMcache,"+- "H5SMmessage, H5Smpio, H5SMtest, H5Snone, H5Spoint, H5Sselect, H5ST, H5Stest,"+- "H5Tarray, H5Tbit, H5T, H5Tcommit, H5Tcompound, H5Tconv, H5Tcset, H5Tdbg, H5Tdeprec, H5Tenum,"+- "H5Tfields, H5Tfixed, H5Tfloat, H5Tinit, H5Tnative, H5Toffset, H5Toh, H5Topaque, H5Torder,"+- -- cgit v0.12