summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt280
-rw-r--r--[-rwxr-xr-x]src/COPYING0
-rw-r--r--src/H5.c16
-rw-r--r--src/H5A.c94
-rw-r--r--src/H5AC.c132
-rw-r--r--src/H5Abtree2.c22
-rw-r--r--src/H5Adense.c38
-rw-r--r--src/H5Adeprec.c14
-rw-r--r--src/H5Aint.c239
-rw-r--r--src/H5Apkg.h2
-rw-r--r--src/H5Atest.c4
-rw-r--r--src/H5B.c42
-rw-r--r--src/H5B2.c28
-rw-r--r--src/H5B2cache.c30
-rw-r--r--src/H5B2dbg.c6
-rw-r--r--src/H5B2hdr.c20
-rw-r--r--src/H5B2int.c50
-rw-r--r--src/H5B2stat.c4
-rw-r--r--src/H5B2test.c22
-rw-r--r--src/H5Bcache.c12
-rw-r--r--src/H5Bdbg.c4
-rw-r--r--src/H5C.c136
-rw-r--r--src/H5CS.c14
-rw-r--r--src/H5D.c42
-rw-r--r--src/H5Dbtree.c62
-rw-r--r--src/H5Dbtree2.c68
-rw-r--r--src/H5Dchunk.c133
-rw-r--r--src/H5Dcompact.c16
-rw-r--r--src/H5Dcontig.c38
-rw-r--r--src/H5Ddbg.c4
-rw-r--r--src/H5Ddeprec.c12
-rw-r--r--src/H5Dearray.c66
-rw-r--r--src/H5Defl.c20
-rw-r--r--src/H5Dfarray.c56
-rw-r--r--src/H5Dfill.c12
-rw-r--r--src/H5Dint.c113
-rw-r--r--src/H5Dio.c50
-rw-r--r--src/H5Dlayout.c14
-rw-r--r--src/H5Dmpio.c594
-rw-r--r--src/H5Dnone.c22
-rw-r--r--src/H5Doh.c16
-rw-r--r--src/H5Dpkg.h2
-rw-r--r--src/H5Dprivate.h2
-rw-r--r--src/H5Dproxy.c22
-rw-r--r--src/H5Dscatgath.c16
-rw-r--r--src/H5Dselect.c6
-rw-r--r--src/H5Dtest.c8
-rw-r--r--src/H5E.c79
-rw-r--r--src/H5Edeprec.c18
-rw-r--r--src/H5Eint.c35
-rw-r--r--src/H5Eprivate.h2
-rw-r--r--src/H5F.c263
-rw-r--r--src/H5FD.c165
-rw-r--r--src/H5FDcore.c79
-rw-r--r--src/H5FDcore.h6
-rw-r--r--src/H5FDdirect.c854
-rw-r--r--src/H5FDdirect.h4
-rw-r--r--src/H5FDfamily.c87
-rw-r--r--src/H5FDfamily.h4
-rw-r--r--src/H5FDint.c12
-rw-r--r--src/H5FDlog.c383
-rw-r--r--src/H5FDlog.h3
-rw-r--r--src/H5FDmpi.c23
-rw-r--r--src/H5FDmpi.h4
-rw-r--r--src/H5FDmpio.c118
-rw-r--r--src/H5FDmpio.h2
-rw-r--r--src/H5FDmpiposix.c709
-rw-r--r--src/H5FDmpiposix.h1
-rw-r--r--src/H5FDmulti.c39
-rw-r--r--src/H5FDmulti.h6
-rw-r--r--src/H5FDpublic.h16
-rw-r--r--src/H5FDsec2.c375
-rw-r--r--src/H5FDsec2.h3
-rw-r--r--src/H5FDspace.c14
-rw-r--r--src/H5FDstdio.c436
-rw-r--r--src/H5FDstdio.h1
-rw-r--r--src/H5FDwindows.c1079
-rw-r--r--src/H5FDwindows.h81
-rw-r--r--src/H5FL.c90
-rw-r--r--src/H5FO.c28
-rw-r--r--src/H5FS.c34
-rw-r--r--src/H5FScache.c24
-rw-r--r--src/H5FSdbg.c6
-rw-r--r--src/H5FSsection.c60
-rw-r--r--src/H5FSstat.c3
-rw-r--r--src/H5FStest.c6
-rw-r--r--src/H5Faccum.c12
-rw-r--r--src/H5Fcwfs.c323
-rw-r--r--src/H5Fdbg.c8
-rw-r--r--src/H5Fdeprec.c4
-rw-r--r--src/H5Fefc.c24
-rw-r--r--src/H5Ffake.c6
-rw-r--r--src/H5Fio.c8
-rw-r--r--src/H5Fmount.c107
-rw-r--r--src/H5Fmpi.c6
-rw-r--r--src/H5Fpkg.h4
-rw-r--r--src/H5Fprivate.h134
-rw-r--r--src/H5Fpublic.h29
-rw-r--r--src/H5Fquery.c335
-rw-r--r--src/H5Fsfile.c8
-rw-r--r--src/H5Fsuper.c24
-rw-r--r--src/H5Fsuper_cache.c12
-rw-r--r--src/H5Ftest.c8
-rw-r--r--src/H5G.c1352
-rw-r--r--src/H5Gbtree2.c22
-rw-r--r--src/H5Gcache.c18
-rw-r--r--src/H5Gcompact.c88
-rw-r--r--src/H5Gdense.c144
-rw-r--r--src/H5Gdeprec.c64
-rw-r--r--src/H5Gent.c114
-rw-r--r--src/H5Gint.c1116
-rw-r--r--src/H5Glink.c205
-rw-r--r--src/H5Gloc.c44
-rw-r--r--src/H5Gname.c225
-rw-r--r--src/H5Gnode.c155
-rw-r--r--src/H5Gobj.c169
-rw-r--r--src/H5Goh.c18
-rw-r--r--src/H5Gpkg.h240
-rw-r--r--src/H5Gprivate.h93
-rw-r--r--src/H5Groot.c51
-rw-r--r--src/H5Gstab.c224
-rw-r--r--src/H5Gtest.c102
-rw-r--r--src/H5Gtraverse.c174
-rw-r--r--src/H5HF.c29
-rw-r--r--src/H5HFbtree2.c60
-rw-r--r--src/H5HFcache.c34
-rw-r--r--src/H5HFdbg.c14
-rw-r--r--src/H5HFdblock.c14
-rw-r--r--src/H5HFdtable.c12
-rw-r--r--src/H5HFhdr.c48
-rw-r--r--src/H5HFhuge.c24
-rw-r--r--src/H5HFiblock.c38
-rw-r--r--src/H5HFiter.c22
-rw-r--r--src/H5HFman.c12
-rw-r--r--src/H5HFsection.c120
-rw-r--r--src/H5HFspace.c16
-rw-r--r--src/H5HFstat.c4
-rw-r--r--src/H5HFtest.c24
-rw-r--r--src/H5HFtiny.c14
-rw-r--r--src/H5HG.c169
-rw-r--r--src/H5HGcache.c42
-rw-r--r--src/H5HGdbg.c60
-rw-r--r--src/H5HGpkg.h6
-rw-r--r--src/H5HGprivate.h32
-rw-r--r--src/H5HGquery.c145
-rw-r--r--src/H5HL.c46
-rw-r--r--src/H5HLcache.c52
-rw-r--r--src/H5HLdbg.c2
-rw-r--r--src/H5HLint.c16
-rw-r--r--src/H5HLpkg.h6
-rw-r--r--src/H5HLprivate.h2
-rw-r--r--src/H5HP.c26
-rw-r--r--src/H5I.c90
-rw-r--r--src/H5Itest.c2
-rw-r--r--src/H5L.c248
-rw-r--r--src/H5Lexternal.c19
-rw-r--r--src/H5Lpkg.h3
-rw-r--r--src/H5MF.c28
-rw-r--r--src/H5MFaggr.c18
-rw-r--r--src/H5MFdbg.c6
-rw-r--r--src/H5MFsection.c18
-rw-r--r--src/H5MM.c85
-rw-r--r--src/H5MP.c10
-rw-r--r--src/H5MPtest.c10
-rw-r--r--src/H5O.c148
-rw-r--r--src/H5Oainfo.c35
-rw-r--r--src/H5Oalloc.c74
-rw-r--r--src/H5Oattr.c28
-rw-r--r--src/H5Oattribute.c76
-rw-r--r--src/H5Obtreek.c10
-rw-r--r--src/H5Ocache.c28
-rw-r--r--src/H5Ochunk.c12
-rw-r--r--src/H5Ocont.c12
-rw-r--r--src/H5Ocopy.c37
-rw-r--r--src/H5Odbg.c39
-rw-r--r--src/H5Odrvinfo.c12
-rw-r--r--src/H5Odtype.c28
-rw-r--r--src/H5Oefl.c16
-rw-r--r--src/H5Ofill.c30
-rw-r--r--src/H5Oflush.c24
-rw-r--r--src/H5Ofsinfo.c12
-rw-r--r--src/H5Oginfo.c12
-rw-r--r--src/H5Olayout.c30
-rw-r--r--src/H5Olinfo.c32
-rw-r--r--src/H5Olink.c27
-rw-r--r--src/H5Omessage.c117
-rw-r--r--src/H5Omtime.c88
-rw-r--r--src/H5Oname.c18
-rw-r--r--src/H5Opkg.h6
-rw-r--r--src/H5Opline.c20
-rw-r--r--src/H5Oprivate.h20
-rw-r--r--src/H5Opublic.h2
-rw-r--r--src/H5Orefcount.c14
-rw-r--r--src/H5Osdspace.c18
-rw-r--r--src/H5Oshared.c133
-rw-r--r--src/H5Oshared.h38
-rw-r--r--src/H5Oshmesg.c10
-rw-r--r--src/H5Ostab.c31
-rw-r--r--src/H5Ostorage.c20
-rw-r--r--src/H5Otest.c20
-rw-r--r--src/H5Ounknown.c4
-rw-r--r--src/H5P.c74
-rw-r--r--src/H5Pdapl.c10
-rw-r--r--src/H5Pdcpl.c62
-rw-r--r--src/H5Pdeprec.c12
-rw-r--r--src/H5Pdxpl.c149
-rw-r--r--src/H5Pfapl.c164
-rw-r--r--src/H5Pfcpl.c64
-rw-r--r--src/H5Pfmpl.c2
-rw-r--r--src/H5Pgcpl.c18
-rw-r--r--src/H5Pint.c124
-rw-r--r--src/H5Plapl.c34
-rw-r--r--src/H5Plcpl.c6
-rwxr-xr-xsrc/H5Pocpl.c50
-rwxr-xr-xsrc/H5Pocpypl.c6
-rw-r--r--src/H5Ppublic.h36
-rw-r--r--src/H5Pstrcpl.c10
-rw-r--r--src/H5Ptest.c8
-rw-r--r--src/H5R.c70
-rw-r--r--src/H5RC.c4
-rw-r--r--src/H5RS.c24
-rw-r--r--src/H5Rdeprec.c58
-rw-r--r--src/H5Rpkg.h2
-rw-r--r--src/H5Rpublic.h3
-rw-r--r--src/H5S.c102
-rw-r--r--src/H5SL.c182
-rw-r--r--src/H5SLprivate.h8
-rwxr-xr-xsrc/H5SM.c474
-rwxr-xr-xsrc/H5SMbtree2.c12
-rw-r--r--src/H5SMcache.c33
-rw-r--r--src/H5SMmessage.c14
-rwxr-xr-xsrc/H5SMpkg.h2
-rwxr-xr-xsrc/H5SMprivate.h12
-rw-r--r--src/H5SMtest.c12
-rw-r--r--src/H5ST.c34
-rw-r--r--src/H5Sall.c80
-rw-r--r--src/H5Sdbg.c2
-rw-r--r--src/H5Shyper.c174
-rw-r--r--src/H5Smpio.c14
-rw-r--r--src/H5Snone.c50
-rw-r--r--src/H5Spoint.c58
-rw-r--r--src/H5Sselect.c68
-rw-r--r--src/H5Stest.c4
-rw-r--r--src/H5T.c260
-rw-r--r--src/H5TS.c55
-rw-r--r--src/H5Tarray.c18
-rw-r--r--src/H5Tbit.c36
-rw-r--r--src/H5Tcommit.c34
-rw-r--r--src/H5Tcompound.c26
-rw-r--r--src/H5Tconv.c1184
-rw-r--r--src/H5Tcset.c6
-rw-r--r--src/H5Tdbg.c4
-rw-r--r--src/H5Tdeprec.c8
-rw-r--r--src/H5Tenum.c22
-rw-r--r--src/H5Tfields.c16
-rw-r--r--src/H5Tfixed.c8
-rw-r--r--src/H5Tfloat.c18
-rw-r--r--src/H5Tnative.c14
-rw-r--r--src/H5Toffset.c10
-rw-r--r--src/H5Toh.c10
-rw-r--r--src/H5Topaque.c6
-rw-r--r--src/H5Torder.c10
-rw-r--r--src/H5Tpad.c6
-rw-r--r--src/H5Tpkg.h2
-rw-r--r--src/H5Tprecis.c10
-rw-r--r--src/H5Tprivate.h1
-rw-r--r--src/H5Tstrpad.c6
-rw-r--r--src/H5Tvisit.c2
-rw-r--r--src/H5Tvlen.c52
-rw-r--r--src/H5V.c51
-rw-r--r--src/H5Vprivate.h20
-rw-r--r--src/H5WB.c8
-rw-r--r--src/H5Z.c53
-rw-r--r--src/H5Zdeflate.c2
-rw-r--r--src/H5Zfletcher32.c2
-rw-r--r--src/H5Znbit.c18
-rw-r--r--src/H5Zpkg.h3
-rw-r--r--src/H5Zscaleoffset.c14
-rw-r--r--src/H5Zshuffle.c4
-rw-r--r--src/H5Zszip.c6
-rw-r--r--src/H5Ztrans.c237
-rw-r--r--src/H5api_adpt.h22
-rw-r--r--src/H5checksum.c14
-rw-r--r--src/H5config.h.in13
-rw-r--r--src/H5dbg.c2
-rw-r--r--src/H5detect.c2
-rw-r--r--src/H5private.h1419
-rw-r--r--src/H5public.h4
-rw-r--r--src/H5system.c715
-rw-r--r--src/H5trace.c128
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h423
-rw-r--r--src/H5win32defs.h61
-rwxr-xr-xsrc/Makefile.am5
-rw-r--r--src/Makefile.in96
-rw-r--r--src/hdf5.h2
-rw-r--r--src/libhdf5.settings.in1
297 files changed, 11782 insertions, 12025 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9279481..ab07ff4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required (VERSION 2.8.6)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
@@ -12,7 +12,6 @@ SET (H5_SRCS
${HDF5_SRC_DIR}/H5timer.c
${HDF5_SRC_DIR}/H5trace.c
)
-
SET (H5_HDRS
${HDF5_SRC_DIR}/hdf5.h
${HDF5_SRC_DIR}/H5api_adpt.h
@@ -22,6 +21,7 @@ SET (H5_HDRS
)
IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" )
+
SET (H5A_SRCS
${HDF5_SRC_DIR}/H5A.c
${HDF5_SRC_DIR}/H5Abtree2.c
@@ -30,25 +30,36 @@ SET (H5A_SRCS
${HDF5_SRC_DIR}/H5Aint.c
${HDF5_SRC_DIR}/H5Atest.c
)
-
SET (H5A_HDRS
${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Apublic.h
)
IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" )
+
SET (H5AC_SRCS
${HDF5_SRC_DIR}/H5AC.c
)
-
SET (H5AC_HDRS
${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACpublic.h
)
IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SRCS}" )
+
SET (H5B_SRCS
${HDF5_SRC_DIR}/H5B.c
+ ${HDF5_SRC_DIR}/H5Bcache.c
+ ${HDF5_SRC_DIR}/H5Bdbg.c
+)
+SET (H5B_HDRS
+ ${HDF5_SRC_DIR}/H5Bpkg.h
+ ${HDF5_SRC_DIR}/H5Bpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" )
+
+
+SET (H5B2_SRCS
${HDF5_SRC_DIR}/H5B2.c
${HDF5_SRC_DIR}/H5B2cache.c
${HDF5_SRC_DIR}/H5B2dbg.c
@@ -56,29 +67,32 @@ SET (H5B_SRCS
${HDF5_SRC_DIR}/H5B2int.c
${HDF5_SRC_DIR}/H5B2stat.c
${HDF5_SRC_DIR}/H5B2test.c
- ${HDF5_SRC_DIR}/H5Bcache.c
- ${HDF5_SRC_DIR}/H5Bdbg.c
)
-
-SET (H5B_HDRS
+SET (H5B2_HDRS
${HDF5_SRC_DIR}/H5B2pkg.h
${HDF5_SRC_DIR}/H5B2public.h
- ${HDF5_SRC_DIR}/H5Bpkg.h
- ${HDF5_SRC_DIR}/H5Bpublic.h
)
-IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" )
+IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SRCS}" )
+
SET (H5C_SRCS
${HDF5_SRC_DIR}/H5C.c
- ${HDF5_SRC_DIR}/H5CS.c
)
-
SET (H5C_HDRS
${HDF5_SRC_DIR}/H5Cpkg.h
${HDF5_SRC_DIR}/H5Cpublic.h
)
IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SRCS}" )
+
+SET (H5CS_SRCS
+ ${HDF5_SRC_DIR}/H5CS.c
+)
+SET (H5CS_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5CS" "${H5CS_HDRS}" "${H5CS_SRCS}" )
+
+
SET (H5D_SRCS
${HDF5_SRC_DIR}/H5D.c
${HDF5_SRC_DIR}/H5Dbtree2.c
@@ -102,19 +116,18 @@ SET (H5D_SRCS
${HDF5_SRC_DIR}/H5Dselect.c
${HDF5_SRC_DIR}/H5Dtest.c
)
-
SET (H5D_HDRS
${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dpublic.h
)
IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SRCS}" )
+
SET (H5E_SRCS
${HDF5_SRC_DIR}/H5E.c
${HDF5_SRC_DIR}/H5Edeprec.c
${HDF5_SRC_DIR}/H5Eint.c
)
-
SET (H5E_HDRS
${HDF5_SRC_DIR}/H5Edefin.h
${HDF5_SRC_DIR}/H5Einit.h
@@ -125,6 +138,7 @@ SET (H5E_HDRS
)
IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SRCS}" )
+
SET (H5EA_SRCS
${HDF5_SRC_DIR}/H5EA.c
${HDF5_SRC_DIR}/H5EAcache.c
@@ -138,15 +152,16 @@ SET (H5EA_SRCS
${HDF5_SRC_DIR}/H5EAstat.c
${HDF5_SRC_DIR}/H5EAtest.c
)
-
SET (H5EA_HDRS
${HDF5_SRC_DIR}/H5EApkg.h
)
IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SRCS}" )
+
SET (H5F_SRCS
${HDF5_SRC_DIR}/H5F.c
${HDF5_SRC_DIR}/H5Faccum.c
+ ${HDF5_SRC_DIR}/H5Fcwfs.c
${HDF5_SRC_DIR}/H5Fdbg.c
${HDF5_SRC_DIR}/H5Fdeprec.c
${HDF5_SRC_DIR}/H5Fefc.c
@@ -160,13 +175,13 @@ SET (H5F_SRCS
${HDF5_SRC_DIR}/H5Fsuper_cache.c
${HDF5_SRC_DIR}/H5Ftest.c
)
-
SET (H5F_HDRS
${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fpublic.h
)
IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SRCS}" )
+
SET (H5FA_SRCS
${HDF5_SRC_DIR}/H5FA.c
${HDF5_SRC_DIR}/H5FAcache.c
@@ -177,12 +192,12 @@ SET (H5FA_SRCS
${HDF5_SRC_DIR}/H5FAstat.c
${HDF5_SRC_DIR}/H5FAtest.c
)
-
SET (H5FA_HDRS
${HDF5_SRC_DIR}/H5FApkg.h
)
IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SRCS}" )
+
SET (H5FD_SRCS
${HDF5_SRC_DIR}/H5FD.c
${HDF5_SRC_DIR}/H5FDcore.c
@@ -197,8 +212,8 @@ SET (H5FD_SRCS
${HDF5_SRC_DIR}/H5FDsec2.c
${HDF5_SRC_DIR}/H5FDspace.c
${HDF5_SRC_DIR}/H5FDstdio.c
+ ${HDF5_SRC_DIR}/H5FDwindows.c
)
-
SET (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDcore.h
${HDF5_SRC_DIR}/H5FDdirect.h
@@ -212,9 +227,27 @@ SET (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDpublic.h
${HDF5_SRC_DIR}/H5FDsec2.h
${HDF5_SRC_DIR}/H5FDstdio.h
+ ${HDF5_SRC_DIR}/H5FDwindows.h
)
IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SRCS}" )
+
+SET (H5FL_SRCS
+ ${HDF5_SRC_DIR}/H5FL.c
+)
+SET (H5FL_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5FL" "${H5FL_HDRS}" "${H5FL_SRCS}" )
+
+
+SET (H5FO_SRCS
+ ${HDF5_SRC_DIR}/H5FO.c
+)
+SET (H5FO_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5FO" "${H5FO_HDRS}" "${H5FO_SRCS}" )
+
+
SET (H5FS_SRCS
${HDF5_SRC_DIR}/H5FS.c
${HDF5_SRC_DIR}/H5FScache.c
@@ -223,13 +256,13 @@ SET (H5FS_SRCS
${HDF5_SRC_DIR}/H5FSstat.c
${HDF5_SRC_DIR}/H5FStest.c
)
-
SET (H5FS_HDRS
${HDF5_SRC_DIR}/H5FSpkg.h
${HDF5_SRC_DIR}/H5FSpublic.h
)
IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SRCS}" )
+
SET (H5G_SRCS
${HDF5_SRC_DIR}/H5G.c
${HDF5_SRC_DIR}/H5Gbtree2.c
@@ -250,13 +283,13 @@ SET (H5G_SRCS
${HDF5_SRC_DIR}/H5Gtest.c
${HDF5_SRC_DIR}/H5Gtraverse.c
)
-
SET (H5G_HDRS
${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gpublic.h
)
IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SRCS}" )
+
SET (H5HF_SRCS
${HDF5_SRC_DIR}/H5HF.c
${HDF5_SRC_DIR}/H5HFbtree2.c
@@ -275,59 +308,99 @@ SET (H5HF_SRCS
${HDF5_SRC_DIR}/H5HFtest.c
${HDF5_SRC_DIR}/H5HFtiny.c
)
-
SET (H5HF_HDRS
${HDF5_SRC_DIR}/H5HFpkg.h
${HDF5_SRC_DIR}/H5HFpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SRCS}" )
+
SET (H5HG_SRCS
${HDF5_SRC_DIR}/H5HG.c
${HDF5_SRC_DIR}/H5HGcache.c
${HDF5_SRC_DIR}/H5HGdbg.c
+ ${HDF5_SRC_DIR}/H5HGquery.c
)
-
SET (H5HG_HDRS
${HDF5_SRC_DIR}/H5HGpkg.h
${HDF5_SRC_DIR}/H5HGpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SRCS}" )
+
SET (H5HL_SRCS
${HDF5_SRC_DIR}/H5HL.c
${HDF5_SRC_DIR}/H5HLcache.c
${HDF5_SRC_DIR}/H5HLdbg.c
${HDF5_SRC_DIR}/H5HLint.c
)
-
SET (H5HL_HDRS
${HDF5_SRC_DIR}/H5HLpkg.h
${HDF5_SRC_DIR}/H5HLpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SRCS}" )
+
+SET (H5HP_SRCS
+ ${HDF5_SRC_DIR}/H5HP.c
+)
+SET (H5HP_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5HP" "${H5HP_HDRS}" "${H5HP_SRCS}" )
+
+
+SET (H5I_SRCS
+ ${HDF5_SRC_DIR}/H5I.c
+ ${HDF5_SRC_DIR}/H5Itest.c
+)
+SET (H5I_HDRS
+ ${HDF5_SRC_DIR}/H5Ipkg.h
+ ${HDF5_SRC_DIR}/H5Ipublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SRCS}" )
+
+
+SET (H5L_SRCS
+ ${HDF5_SRC_DIR}/H5L.c
+ ${HDF5_SRC_DIR}/H5Lexternal.c
+)
+SET (H5L_HDRS
+ ${HDF5_SRC_DIR}/H5Lpkg.h
+ ${HDF5_SRC_DIR}/H5Lpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SRCS}" )
+
+
SET (H5MF_SRCS
${HDF5_SRC_DIR}/H5MF.c
${HDF5_SRC_DIR}/H5MFaggr.c
${HDF5_SRC_DIR}/H5MFdbg.c
${HDF5_SRC_DIR}/H5MFsection.c
)
-
SET (H5MF_HDRS
)
IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" )
+
+SET (H5MM_SRCS
+ ${HDF5_SRC_DIR}/H5MM.c
+)
+SET (H5MM_HDRS
+ ${HDF5_SRC_DIR}/H5MMpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5MM" "${H5MM_HDRS}" "${H5MM_SRCS}" )
+
+
SET (H5MP_SRCS
${HDF5_SRC_DIR}/H5MP.c
${HDF5_SRC_DIR}/H5MPtest.c
)
-
SET (H5MP_HDRS
${HDF5_SRC_DIR}/H5MPpkg.h
)
IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SRCS}" )
+
SET (H5O_SRCS
${HDF5_SRC_DIR}/H5O.c
${HDF5_SRC_DIR}/H5Oainfo.c
@@ -364,7 +437,6 @@ SET (H5O_SRCS
${HDF5_SRC_DIR}/H5Otest.c
${HDF5_SRC_DIR}/H5Ounknown.c
)
-
SET (H5O_HDRS
${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Opublic.h
@@ -372,6 +444,7 @@ SET (H5O_HDRS
)
IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SRCS}" )
+
SET (H5P_SRCS
${HDF5_SRC_DIR}/H5P.c
${HDF5_SRC_DIR}/H5Pacpl.c
@@ -391,13 +464,40 @@ SET (H5P_SRCS
${HDF5_SRC_DIR}/H5Pstrcpl.c
${HDF5_SRC_DIR}/H5Ptest.c
)
-
SET (H5P_HDRS
${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Ppublic.h
)
IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" )
+
+SET (H5R_SRCS
+ ${HDF5_SRC_DIR}/H5R.c
+ ${HDF5_SRC_DIR}/H5Rdeprec.c
+)
+SET (H5R_HDRS
+ ${HDF5_SRC_DIR}/H5Rpkg.h
+ ${HDF5_SRC_DIR}/H5Rpublic.h
+)
+IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" )
+
+
+SET (H5RC_SRCS
+ ${HDF5_SRC_DIR}/H5RC.c
+)
+SET (H5RC_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SRCS}" )
+
+
+SET (H5RS_SRCS
+ ${HDF5_SRC_DIR}/H5RS.c
+)
+SET (H5RS_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SRCS}" )
+
+
SET (H5S_SRCS
${HDF5_SRC_DIR}/H5S.c
${HDF5_SRC_DIR}/H5Sall.c
@@ -409,13 +509,21 @@ SET (H5S_SRCS
${HDF5_SRC_DIR}/H5Sselect.c
${HDF5_SRC_DIR}/H5Stest.c
)
-
SET (H5S_HDRS
${HDF5_SRC_DIR}/H5Spkg.h
${HDF5_SRC_DIR}/H5Spublic.h
)
IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SRCS}" )
+
+SET (H5SL_SRCS
+ ${HDF5_SRC_DIR}/H5SL.c
+)
+SET (H5SL_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5SL" "${H5SL_HDRS}" "${H5SL_SRCS}" )
+
+
SET (H5SM_SRCS
${HDF5_SRC_DIR}/H5SM.c
${HDF5_SRC_DIR}/H5SMbtree2.c
@@ -423,12 +531,20 @@ SET (H5SM_SRCS
${HDF5_SRC_DIR}/H5SMmessage.c
${HDF5_SRC_DIR}/H5SMtest.c
)
-
SET (H5SM_HDRS
${HDF5_SRC_DIR}/H5SMpkg.h
)
IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SRCS}" )
+
+SET (H5ST_SRCS
+ ${HDF5_SRC_DIR}/H5ST.c
+)
+SET (H5ST_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5ST" "${H5ST_HDRS}" "${H5ST_SRCS}" )
+
+
SET (H5T_SRCS
${HDF5_SRC_DIR}/H5T.c
${HDF5_SRC_DIR}/H5Tarray.c
@@ -454,13 +570,37 @@ SET (H5T_SRCS
${HDF5_SRC_DIR}/H5Tvisit.c
${HDF5_SRC_DIR}/H5Tvlen.c
)
-
SET (H5T_HDRS
${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tpublic.h
)
IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SRCS}" )
+
+SET (H5TS_SRCS
+ ${HDF5_SRC_DIR}/H5TS.c
+)
+SET (H5TS_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5TS" "${H5TS_HDRS}" "${H5TS_SRCS}" )
+
+
+SET (H5V_SRCS
+ ${HDF5_SRC_DIR}/H5V.c
+)
+SET (H5V_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5V" "${H5V_HDRS}" "${H5V_SRCS}" )
+
+
+SET (H5WB_SRCS
+ ${HDF5_SRC_DIR}/H5WB.c
+)
+SET (H5WB_HDRS
+)
+IDE_GENERATED_PROPERTIES ("H5WB" "${H5WB_HDRS}" "${H5WB_SRCS}" )
+
+
SET (H5Z_SRCS
${HDF5_SRC_DIR}/H5Z.c
${HDF5_SRC_DIR}/H5Zdeflate.c
@@ -475,55 +615,54 @@ IF (H5_ZLIB_HEADER)
SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY
COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}")
ENDIF (H5_ZLIB_HEADER)
-
SET (H5Z_HDRS
${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zpublic.h
)
IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SRCS}" )
+
SET (common_SRCS
${H5_SRCS}
${H5A_SRCS}
${H5AC_SRCS}
${H5B_SRCS}
+ ${H5B2_SRCS}
${H5C_SRCS}
+ ${H5CS_SRCS}
${H5D_SRCS}
${H5E_SRCS}
${H5EA_SRCS}
${H5F_SRCS}
${H5FA_SRCS}
${H5FD_SRCS}
+ ${H5FL_SRCS}
+ ${H5FO_SRCS}
${H5FS_SRCS}
${H5G_SRCS}
${H5HF_SRCS}
${H5HG_SRCS}
${H5HL_SRCS}
+ ${H5HP_SRCS}
+ ${H5I_SRCS}
+ ${H5L_SRCS}
${H5MF_SRCS}
+ ${H5MM_SRCS}
${H5MP_SRCS}
${H5O_SRCS}
${H5P_SRCS}
+ ${H5R_SRCS}
+ ${H5RC_SRCS}
+ ${H5RS_SRCS}
${H5S_SRCS}
+ ${H5SL_SRCS}
${H5SM_SRCS}
+ ${H5ST_SRCS}
${H5T_SRCS}
+ ${H5TS_SRCS}
+ ${H5V_SRCS}
+ ${H5WB_SRCS}
${H5Z_SRCS}
- ${HDF5_SRC_DIR}/H5FL.c
- ${HDF5_SRC_DIR}/H5FO.c
- ${HDF5_SRC_DIR}/H5HP.c
- ${HDF5_SRC_DIR}/H5I.c
- ${HDF5_SRC_DIR}/H5Itest.c
- ${HDF5_SRC_DIR}/H5L.c
- ${HDF5_SRC_DIR}/H5Lexternal.c
- ${HDF5_SRC_DIR}/H5MM.c
- ${HDF5_SRC_DIR}/H5R.c
- ${HDF5_SRC_DIR}/H5RC.c
- ${HDF5_SRC_DIR}/H5Rdeprec.c
- ${HDF5_SRC_DIR}/H5RS.c
- ${HDF5_SRC_DIR}/H5SL.c
- ${HDF5_SRC_DIR}/H5ST.c
- ${HDF5_SRC_DIR}/H5TS.c
- ${HDF5_SRC_DIR}/H5V.c
- ${HDF5_SRC_DIR}/H5WB.c
)
SET (H5_PUBLIC_HEADERS
@@ -531,6 +670,7 @@ SET (H5_PUBLIC_HEADERS
${H5A_HDRS}
${H5AC_HDRS}
${H5B_HDRS}
+ ${H5B2_HDRS}
${H5C_HDRS}
${H5D_HDRS}
${H5E_HDRS}
@@ -543,30 +683,20 @@ SET (H5_PUBLIC_HEADERS
${H5HF_HDRS}
${H5HG_HDRS}
${H5HL_HDRS}
+ ${H5I_HDRS}
+ ${H5L_HDRS}
${H5MF_HDRS}
+ ${H5MM_HDRS}
${H5MP_HDRS}
${H5O_HDRS}
${H5P_HDRS}
+ ${H5R_HDRS}
${H5S_HDRS}
${H5SM_HDRS}
${H5T_HDRS}
${H5Z_HDRS}
- ${HDF5_SRC_DIR}/H5Ipkg.h
- ${HDF5_SRC_DIR}/H5Ipublic.h
- ${HDF5_SRC_DIR}/H5Lpkg.h
- ${HDF5_SRC_DIR}/H5Lpublic.h
- ${HDF5_SRC_DIR}/H5MMpublic.h
- ${HDF5_SRC_DIR}/H5Rpkg.h
- ${HDF5_SRC_DIR}/H5Rpublic.h
)
-# --------------------------------------------------------------------
-# If we are compiling on Windows then add the windows specific files
-# --------------------------------------------------------------------
-IF (WIN32 AND NOT CYGWIN)
- SET (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
- SET (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
-ENDIF (WIN32 AND NOT CYGWIN)
SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
@@ -617,27 +747,15 @@ INCLUDE_DIRECTORIES (${HDF5_SOURCE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
#-----------------------------------------------------------------------------
-# When building utility executables that generate other (source) files :
-# we make use of the following variables defined in the root CMakeLists.
-# Certain systems may add /Debug or /Release to output paths
-# and we need to call the executable from inside the CMake configuration
-#-----------------------------------------------------------------------------
-#inherit EXE_EXT from parent HDF5 cmake project
-#inherit CFG_INIT from parent HDF5 cmake project
-
-#-----------------------------------------------------------------------------
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT})
-IF (XCODE)
- SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect")
-ENDIF (XCODE)
ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
IF (MSVC)
TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
ENDIF (MSVC)
+SET (CMD $<TARGET_FILE:H5detect>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
COMMAND ${CMD}
@@ -645,20 +763,18 @@ ADD_CUSTOM_COMMAND (
DEPENDS H5detect
)
-SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT})
-IF (XCODE)
- SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings")
-ENDIF (XCODE)
ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
IF (MSVC)
TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
ENDIF (MSVC)
+SET (CMD $<TARGET_FILE:H5make_libsettings>)
ADD_CUSTOM_COMMAND (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
- COMMAND ${CMDL}
+ COMMAND ${CMD}
ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
DEPENDS H5make_libsettings
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
ADD_CUSTOM_COMMAND (
@@ -697,10 +813,10 @@ SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h)
SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
ADD_LIBRARY (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
-SET_TARGET_PROPERTIES(${HDF5_LIB_TARGET} PROPERTIES DEFINE_SYMBOL ${HDF5_LIB_CORENAME}_EXPORTS)
TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} ${LINK_LIBS})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE})
+SET_TARGET_PROPERTIES (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
diff --git a/src/COPYING b/src/COPYING
index 6903daf..6903daf 100755..100644
--- a/src/COPYING
+++ b/src/COPYING
diff --git a/src/H5.c b/src/H5.c
index 72e0a1b..654c730 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -108,7 +108,7 @@ H5_init_library(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5_init_library, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Make sure the package information is updated.
*/
@@ -364,7 +364,7 @@ H5dont_atexit(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API_NOINIT_NOERR_NOFS(H5dont_atexit)
+ FUNC_ENTER_API_NOINIT_NOERR_NOFS
H5TRACE0("e","");
if(H5_dont_atexit_g)
@@ -403,7 +403,7 @@ H5garbage_collect(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5garbage_collect, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE0("e","");
/* Call the garbage collection routines in the library */
@@ -455,7 +455,7 @@ H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5set_free_list_limits, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "IsIsIsIsIsIs", reg_global_lim, reg_list_lim, arr_global_lim,
arr_list_lim, blk_global_lim, blk_list_lim);
@@ -598,7 +598,7 @@ H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5get_libversion, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*Iu*Iu*Iu", majnum, minnum, relnum);
/* Set the version information */
@@ -653,7 +653,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
static const char *version_mismatch_warning = VERSION_MISMATCH_WARNING;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API_NOINIT_NOERR_NOFS(H5check_version)
+ FUNC_ENTER_API_NOINIT_NOERR_NOFS
H5TRACE3("e", "IuIuIu", majnum, minnum, relnum);
/* Don't check again, if we already have */
@@ -767,7 +767,7 @@ H5open(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API_NOCLEAR(H5open, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE0("e","");
/* all work is done by FUNC_ENTER() */
done:
@@ -797,7 +797,7 @@ H5close(void)
* whole library just to release it all right away. It is safe to call
* this function for an uninitialized library.
*/
- FUNC_ENTER_API_NOINIT_NOERR_NOFS(H5close)
+ FUNC_ENTER_API_NOINIT_NOERR_NOFS
H5TRACE0("e","");
H5_term_library();
diff --git a/src/H5A.c b/src/H5A.c
index 892e3bd..cc6a7a5 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -113,7 +113,7 @@ H5A_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -138,7 +138,7 @@ H5A_init_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Create attribute ID type.
@@ -172,7 +172,7 @@ H5A_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT
if(H5_interface_initialize_g) {
if((n = H5I_nmembers(H5I_ATTR))>0) {
@@ -225,7 +225,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
H5S_t *space; /* Dataspace to use for attribute */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Acreate2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("i", "i*siiii", loc_id, attr_name, type_id, space_id, acpl_id, aapl_id);
/* check arguments */
@@ -296,7 +296,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5S_t *space; /* Dataspace to use for attribute */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Acreate_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
acpl_id, aapl_id, lapl_id);
@@ -369,7 +369,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
htri_t tri_ret; /* htri_t return value */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5A_create, dxpl_id, loc->oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->oloc->addr, FAIL)
/* check args */
HDassert(loc);
@@ -451,9 +451,9 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
/* Check if any of the pieces should be (or are already) shared in the
* SOHM table
*/
- if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0)
+ if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "trying to share datatype failed")
- if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0)
+ if(H5SM_try_share(attr->oloc.file, dxpl_id, NULL, 0, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "trying to share dataspace failed")
/* Check whether datatype is committed & increment ref count
@@ -534,7 +534,7 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t UNUSED aapl_id)
H5A_t *attr = NULL; /* Attribute opened */
hid_t ret_value;
- FUNC_ENTER_API(H5Aopen, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, attr_name, aapl_id);
/* check arguments */
@@ -547,7 +547,7 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t UNUSED aapl_id)
/* Read in attribute from object header */
if(NULL == (attr = H5O_attr_open_by_name(loc.oloc, attr_name, H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to load attribute info from object header")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to load attribute info from object header for attribute: '%s'", attr_name)
/* Finish initializing attribute */
if(H5A_open_common(&loc, attr) < 0)
@@ -596,7 +596,7 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5A_t *attr = NULL; /* Attribute opened */
hid_t ret_value;
- FUNC_ENTER_API(H5Aopen_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*s*sii", loc_id, obj_name, attr_name, aapl_id, lapl_id);
/* check arguments */
@@ -664,7 +664,7 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_t loc; /* Object location */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aopen_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("i", "i*sIiIohii", loc_id, obj_name, idx_type, order, n, aapl_id,
lapl_id);
@@ -726,7 +726,7 @@ H5A_open_common(const H5G_loc_t *loc, H5A_t *attr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_open_common)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(loc);
@@ -783,7 +783,7 @@ H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_open_by_idx)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(loc);
@@ -847,7 +847,7 @@ H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_na
H5A_t *attr = NULL; /* Attribute from object header */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5A_open_by_name, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(loc);
@@ -912,7 +912,7 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf)
H5T_t *mem_type; /* Memory datatype */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Awrite, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", attr_id, dtype_id, buf);
/* check arguments */
@@ -963,7 +963,7 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id)
size_t buf_size; /* desired buffer size */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5A_write, dxpl_id, attr->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, attr->oloc.addr, FAIL)
HDassert(attr);
HDassert(mem_type);
@@ -1069,7 +1069,7 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf)
H5T_t *mem_type; /* Memory datatype */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aread, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", attr_id, dtype_id, buf);
/* check arguments */
@@ -1119,7 +1119,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
size_t buf_size; /* desired buffer size */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5A_read)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(attr);
HDassert(mem_type);
@@ -1215,7 +1215,7 @@ H5Aget_space(hid_t attr_id)
H5S_t *ds = NULL; /* Copy of dataspace for attribute */
hid_t ret_value;
- FUNC_ENTER_API(H5Aget_space, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
/* check arguments */
@@ -1261,13 +1261,17 @@ H5Aget_type(hid_t attr_id)
H5T_t *dt = NULL; /* Copy of attribute's datatype */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aget_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
/* check arguments */
if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
+ /* Patch the datatype's "top level" file pointer */
+ if(H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer")
+
/*
* Copy the attribute's datatype. If the type is a named type then
* reopen the type before returning it to the user. Make the type
@@ -1326,7 +1330,7 @@ H5Aget_create_plist(hid_t attr_id)
H5P_genplist_t *new_plist; /* ACPL to return */
hid_t ret_value;
- FUNC_ENTER_API(H5Aget_create_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
HDassert(H5P_LST_ATTRIBUTE_CREATE_g != -1);
@@ -1381,7 +1385,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
H5A_t *my_attr; /* Attribute object for ID */
ssize_t ret_value;
- FUNC_ENTER_API(H5Aget_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "iz*s", attr_id, buf_size, buf);
/* check arguments */
@@ -1421,7 +1425,7 @@ H5A_get_name(H5A_t *attr, size_t buf_size, char *buf)
size_t copy_len, nbytes;
ssize_t ret_value;
- FUNC_ENTER_NOAPI(H5A_get_name, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* get the real attribute length */
nbytes = HDstrlen(attr->shared->name);
@@ -1472,7 +1476,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5A_t *attr = NULL; /* Attribute object for name */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aget_name_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("Zs", "i*sIiIohxzi", loc_id, obj_name, idx_type, order, n, name, size,
lapl_id);
@@ -1539,7 +1543,7 @@ H5Aget_storage_size(hid_t attr_id)
H5A_t *attr; /* Attribute object for ID */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aget_storage_size, 0)
+ FUNC_ENTER_API(0)
H5TRACE1("h", "i", attr_id);
/* Check args */
@@ -1573,7 +1577,7 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
H5A_t *attr; /* Attribute object for name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Aget_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", attr_id, ainfo);
/* Check args */
@@ -1610,7 +1614,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5A_t *attr = NULL; /* Attribute object for name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Aget_info_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*s*s*xi", loc_id, obj_name, attr_name, ainfo, lapl_id);
/* Check args */
@@ -1669,7 +1673,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5A_t *attr = NULL; /* Attribute object for name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Aget_info_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIoh*xi", loc_id, obj_name, idx_type, order, n, ainfo,
lapl_id);
@@ -1727,7 +1731,7 @@ H5A_get_info(const H5A_t *attr, H5A_info_t *ainfo)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_get_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(attr);
@@ -1769,7 +1773,7 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
H5G_loc_t loc; /* Object location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Arename, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", loc_id, old_name, new_name);
/* check arguments */
@@ -1815,7 +1819,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Arename_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*s*s*si", loc_id, obj_name, old_attr_name, new_attr_name,
lapl_id);
@@ -1912,7 +1916,7 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
hsize_t last_attr; /* Index of last attribute examined */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aiterate2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIiIo*hx*x", loc_id, idx_type, order, idx, op, op_data);
/* check arguments */
@@ -2000,7 +2004,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
hsize_t last_attr; /* Index of last attribute examined */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aiterate_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op,
op_data, lapl_id);
@@ -2081,7 +2085,7 @@ H5Adelete(hid_t loc_id, const char *name)
H5G_loc_t loc; /* Object location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Adelete, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* check arguments */
@@ -2128,7 +2132,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Adelete_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
/* check arguments */
@@ -2204,7 +2208,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Adelete_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*sIiIohi", loc_id, obj_name, idx_type, order, n, lapl_id);
/* check arguments */
@@ -2267,7 +2271,7 @@ H5Aclose(hid_t attr_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Aclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", attr_id);
/* check arguments */
@@ -2308,7 +2312,7 @@ H5A_copy(H5A_t *_new_attr, const H5A_t *old_attr)
hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */
H5A_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5A_copy, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(old_attr);
@@ -2370,7 +2374,7 @@ H5A_free(H5A_t *attr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_free, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(attr);
@@ -2418,7 +2422,7 @@ H5A_close(H5A_t *attr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(attr);
HDassert(attr->shared);
@@ -2474,7 +2478,7 @@ H5A_oloc(H5A_t *attr)
{
H5O_loc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5A_oloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(attr);
@@ -2506,7 +2510,7 @@ H5A_nameof(H5A_t *attr)
{
H5G_name_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5A_nameof, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(attr);
@@ -2538,7 +2542,7 @@ H5Aexists(hid_t obj_id, const char *attr_name)
H5G_loc_t loc; /* Object location */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aexists, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", obj_id, attr_name);
/* check arguments */
@@ -2582,7 +2586,7 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aexists_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("t", "i*s*si", loc_id, obj_name, attr_name, lapl_id);
/* check arguments */
diff --git a/src/H5AC.c b/src/H5AC.c
index 6d865e4..3f824a2 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -236,7 +236,7 @@ H5AC_init(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -267,7 +267,7 @@ H5AC_init_interface(void)
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5AC_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(H5P_CLS_DATASET_XFER_g!=(-1));
@@ -346,7 +346,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
#else /* H5_HAVE_PARALLEL */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
assert(H5P_LST_DATASET_XFER_g!=(-1));
@@ -380,7 +380,7 @@ H5AC_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT
if (H5_interface_initialize_g) {
#ifdef H5_HAVE_PARALLEL
@@ -478,7 +478,7 @@ H5AC_create(const H5F_t *f,
#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(NULL == f->shared->cache);
@@ -490,7 +490,7 @@ H5AC_create(const H5F_t *f,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad cache configuration")
#ifdef H5_HAVE_PARALLEL
- if(IS_H5FD_MPI(f)) {
+ if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
MPI_Comm mpi_comm;
int mpi_rank;
int mpi_size;
@@ -541,10 +541,10 @@ H5AC_create(const H5F_t *f,
sprintf(prefix, "%d:", mpi_rank);
if(mpi_rank == 0) {
- if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.")
- if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.")
} /* end if */
@@ -552,7 +552,7 @@ H5AC_create(const H5F_t *f,
* when the distributed strategy is selected as all processes
* will use it in the case of a flush.
*/
- if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.")
} /* end if */
@@ -664,7 +664,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_dest, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -743,7 +743,7 @@ H5AC_expunge_entry(H5F_t *f,
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_expunge_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -828,7 +828,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -902,7 +902,7 @@ H5AC_get_entry_status(const H5F_t *f,
unsigned status = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_get_entry_status, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if((f == NULL) || (!H5F_addr_defined(addr)) || (status_ptr == NULL))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
@@ -958,7 +958,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_insert_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -970,7 +970,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
HDassert(thing);
/* Check for invalid access request */
- if(0 == (f->intent & H5F_ACC_RDWR))
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
#if H5AC__TRACE_FILE_ENABLED
@@ -1062,7 +1062,7 @@ H5AC_mark_entry_dirty(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_mark_entry_dirty, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(thing);
@@ -1133,7 +1133,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
#endif /* H5_HAVE_PARALLEL */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_move_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared->cache);
@@ -1211,7 +1211,7 @@ H5AC_pin_protected_entry(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_pin_protected_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(thing);
@@ -1261,7 +1261,7 @@ H5AC_create_flush_dependency(void * parent_thing, void * child_thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_create_flush_dependency, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(parent_thing);
@@ -1330,7 +1330,7 @@ H5AC_protect(H5F_t *f,
#endif /* H5AC__TRACE_FILE_ENABLED */
void * ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_protect, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(f);
@@ -1342,7 +1342,7 @@ H5AC_protect(H5F_t *f,
HDassert(H5F_addr_defined(addr));
/* Check for invalid access request */
- if(0 == (f->intent & H5F_ACC_RDWR) && rw == H5AC_WRITE)
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR) && rw == H5AC_WRITE)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
#if H5AC__TRACE_FILE_ENABLED
@@ -1450,7 +1450,7 @@ H5AC_resize_entry(void *thing, size_t new_size)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_resize_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(thing);
@@ -1517,7 +1517,7 @@ H5AC_unpin_entry(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_unpin_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(thing);
@@ -1566,7 +1566,7 @@ H5AC_destroy_flush_dependency(void * parent_thing, void * child_thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_destroy_flush_dependency, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(parent_thing);
@@ -1648,7 +1648,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_unprotect, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -1754,7 +1754,7 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_set_sync_point_done_callback)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -1791,7 +1791,7 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_set_write_done_callback)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -1824,7 +1824,7 @@ H5AC_stats(const H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_stats, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -1856,7 +1856,7 @@ H5AC_dump_cache(const H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_dump_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -1893,7 +1893,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
hbool_t evictions_enabled;
H5C_auto_size_ctl_t internal_config;
- FUNC_ENTER_NOAPI(H5AC_get_cache_auto_resize_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL )
||
@@ -2015,7 +2015,7 @@ H5AC_get_cache_size(H5AC_t * cache_ptr,
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_get_cache_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
result = H5C_get_cache_size((H5C_t *)cache_ptr,
max_size_ptr,
@@ -2053,7 +2053,7 @@ H5AC_get_cache_hit_rate(H5AC_t * cache_ptr, double * hit_rate_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_get_cache_hit_rate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5C_get_cache_hit_rate((H5C_t *)cache_ptr, hit_rate_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_hit_rate() failed.")
@@ -2081,7 +2081,7 @@ H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr)
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_reset_cache_hit_rate_stats, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
result = H5C_reset_cache_hit_rate_stats((H5C_t *)cache_ptr);
@@ -2122,7 +2122,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- FUNC_ENTER_NOAPI(H5AC_set_cache_auto_resize_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr );
@@ -2299,7 +2299,7 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr)
H5C_auto_size_ctl_t internal_config;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_validate_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(config_ptr == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config_ptr on entry.")
@@ -2393,7 +2393,7 @@ H5AC_close_trace_file(H5AC_t * cache_ptr)
herr_t ret_value = SUCCEED; /* Return value */
FILE * trace_file_ptr = NULL;
- FUNC_ENTER_NOAPI(H5AC_close_trace_file, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( cache_ptr == NULL ) {
@@ -2455,7 +2455,7 @@ H5AC_open_trace_file(H5AC_t * cache_ptr,
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
- FUNC_ENTER_NOAPI(H5AC_open_trace_file, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cache_ptr);
@@ -2568,7 +2568,7 @@ H5AC_add_candidate(H5AC_t * cache_ptr,
H5AC_slist_entry_t * slist_entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_add_candidate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -2650,7 +2650,7 @@ H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
int num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_broadcast_candidate_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -2761,7 +2761,7 @@ H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
int mpi_result;
int num_entries = 0;
- FUNC_ENTER_NOAPI(H5AC_broadcast_clean_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -2952,7 +2952,7 @@ H5AC_check_if_write_permitted(const H5F_t UNUSED * f,
#endif /* H5_HAVE_PARALLEL */
- FUNC_ENTER_NOAPI(H5AC_check_if_write_permitted, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5_HAVE_PARALLEL
HDassert( f != NULL );
@@ -3014,7 +3014,7 @@ H5AC_construct_candidate_list(H5AC_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_construct_candidate_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3105,7 +3105,7 @@ H5AC_copy_candidate_list_to_buffer(H5AC_t * cache_ptr,
int i = 0;
int num_entries = 0;
- FUNC_ENTER_NOAPI(H5AC_copy_candidate_list_to_buffer, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3227,7 +3227,7 @@ H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_ext_config_2_int_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( ext_conf_ptr == NULL ) ||
( ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION ) ||
@@ -3306,7 +3306,7 @@ H5AC_log_deleted_entry(H5AC_t * cache_ptr,
H5AC_slist_entry_t * slist_entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_log_deleted_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3398,7 +3398,7 @@ H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_log_dirtied_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( entry_ptr );
HDassert( entry_ptr->addr == addr );
@@ -3521,7 +3521,7 @@ H5AC_log_flushed_entry(H5C_t * cache_ptr,
H5AC_slist_entry_t * slist_entry_ptr = NULL;
- FUNC_ENTER_NOAPI(H5AC_log_flushed_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3648,7 +3648,7 @@ H5AC_log_inserted_entry(H5F_t * f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_log_inserted_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cache_ptr != NULL);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -3760,7 +3760,7 @@ H5AC_log_moved_entry(const H5F_t *f,
H5AC_slist_entry_t * slist_entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_log_moved_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -4010,7 +4010,7 @@ H5AC_propagate_and_apply_candidate_list(H5F_t * f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_propagate_and_apply_candidate_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4174,7 +4174,7 @@ H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_propagate_flushed_and_still_clean_entries_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cache_ptr != NULL);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -4234,7 +4234,7 @@ H5AC_receive_and_apply_clean_list(H5F_t * f,
int num_entries = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_receive_and_apply_clean_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
HDassert( f->shared->cache == cache_ptr );
@@ -4345,7 +4345,7 @@ H5AC_receive_candidate_list(H5AC_t * cache_ptr,
int num_entries;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_receive_candidate_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4491,7 +4491,7 @@ H5AC_rsp__dist_md_write__flush(H5F_t *f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_rsp__dist_md_write__flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
HDassert( f->shared->cache == cache_ptr );
@@ -4642,7 +4642,7 @@ H5AC_rsp__dist_md_write__flush_to_min_clean(H5F_t *f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_rsp__dist_md_write__flush_to_min_clean, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
HDassert( f->shared->cache == cache_ptr );
@@ -4725,7 +4725,7 @@ H5AC_rsp__p0_only__flush(H5F_t *f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_rsp__p0_only__flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
HDassert( f->shared->cache == cache_ptr );
@@ -4827,7 +4827,7 @@ H5AC_rsp__p0_only__flush_to_min_clean(H5F_t *f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_rsp__p0_only__flush_to_min_clean, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
HDassert( f->shared->cache == cache_ptr );
@@ -4939,7 +4939,7 @@ H5AC_run_sync_point(H5F_t *f,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_run_sync_point, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f != NULL );
@@ -5076,7 +5076,7 @@ H5AC_tidy_cache_0_lists(H5AC_t * cache_ptr,
H5AC_aux_t * aux_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_tidy_cache_0_lists, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -5169,7 +5169,7 @@ H5AC_flush_entries(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5AC_flush_entries)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(f->shared->cache);
@@ -5208,7 +5208,7 @@ H5AC_ignore_tags(H5F_t * f)
herr_t ret_value = SUCCEED;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5AC_ignore_tags, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -5245,7 +5245,7 @@ H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t * prev_tag)
herr_t ret_value = SUCCEED; /* return value */
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5AC_tag, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check Arguments */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST)))
@@ -5305,7 +5305,7 @@ H5AC_retag_copied_metadata(H5F_t * f, haddr_t metadata_tag)
herr_t ret_value = SUCCEED;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5AC_retag_copied_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -5339,7 +5339,7 @@ H5AC_flush_tagged_metadata(H5F_t * f, haddr_t metadata_tag, hid_t dxpl_id)
herr_t ret_value = SUCCEED;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5AC_flush_tagged_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -5375,7 +5375,7 @@ H5AC_evict_tagged_metadata(H5F_t * f, haddr_t metadata_tag, hid_t dxpl_id)
herr_t ret_value = SUCCEED;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5AC_evict_tagged_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -5413,7 +5413,7 @@ H5AC_verify_tag(hid_t dxpl_id, H5AC_class_t * type)
H5P_genplist_t * dxpl;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5AC_verify_tag, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the dataset transfer property list */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST)))
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 31dcb66..5a15c20 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -171,7 +171,7 @@ H5A_dense_fh_name_cmp(const void *obj, size_t UNUSED obj_len, void *_udata)
hbool_t took_ownership = FALSE; /* Whether the "found" operator took ownership of the attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_fh_name_cmp)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode attribute information */
if(NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_ATTR_ID, (const unsigned char *)obj)))
@@ -222,7 +222,7 @@ H5A_dense_btree2_name_store(void *_nrecord, const void *_udata)
const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_store)
+ FUNC_ENTER_NOAPI_NOINIT
/* Copy user information info native record */
nrecord->id = udata->id;
@@ -255,7 +255,7 @@ H5A_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec)
const H5A_dense_bt2_name_rec_t *bt2_rec = (const H5A_dense_bt2_name_rec_t *)_bt2_rec;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_compare)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(bt2_udata);
@@ -323,7 +323,7 @@ H5A_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void UNUSED *ct
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Encode the record's fields */
HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
@@ -354,7 +354,7 @@ H5A_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void UNUSED *ct
{
H5A_dense_bt2_name_rec_t *nrecord = (H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode the record's fields */
HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
@@ -386,7 +386,7 @@ H5A_dense_btree2_name_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dx
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_debug)
+ FUNC_ENTER_NOAPI_NOINIT
HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth,
"Record:",
@@ -415,7 +415,7 @@ H5A_dense_btree2_corder_store(void *_nrecord, const void *_udata)
const H5A_bt2_ud_ins_t *udata = (const H5A_bt2_ud_ins_t *)_udata;
H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_store)
+ FUNC_ENTER_NOAPI_NOINIT
/* Copy user information info native record */
nrecord->id = udata->id;
@@ -447,7 +447,7 @@ H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec)
const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_compare)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(bt2_udata);
@@ -483,7 +483,7 @@ H5A_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void UNUSED *
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Encode the record's fields */
HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
@@ -513,7 +513,7 @@ H5A_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void UNUSED *
{
H5A_dense_bt2_corder_rec_t *nrecord = (H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode the record's fields */
HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
@@ -544,7 +544,7 @@ H5A_dense_btree2_corder_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED
{
const H5A_dense_bt2_corder_rec_t *nrecord = (const H5A_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_corder_debug)
+ FUNC_ENTER_NOAPI_NOINIT
HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth,
"Record:",
diff --git a/src/H5Adense.c b/src/H5Adense.c
index 889889e..4c10255 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -192,7 +192,7 @@ H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -309,7 +309,7 @@ H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
{
H5A_t const **user_attr = (H5A_t const **)_user_attr; /* User data from v2 B-tree attribute lookup */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_fnd_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -349,7 +349,7 @@ H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *na
htri_t attr_exists; /* Attribute exists in v2 B-tree */
H5A_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -444,7 +444,7 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
htri_t attr_sharable; /* Flag indicating attributes are sharable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -470,7 +470,7 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
mesg_flags |= H5O_MSG_FLAG_SHARED;
else {
/* Should this attribute be written as a SOHM? */
- if(H5SM_try_share(f, dxpl_id, NULL, H5O_ATTR_ID, attr, &mesg_flags) < 0)
+ if(H5SM_try_share(f, dxpl_id, NULL, 0, H5O_ATTR_ID, attr, &mesg_flags) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Attributes can't be "unique be shareable" yet */
@@ -597,7 +597,7 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed)
H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */
H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_write_bt2_cb2)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -638,7 +638,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_write_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -754,7 +754,7 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
htri_t attr_sharable; /* Flag indicating attributes are sharable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -850,7 +850,7 @@ H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata)
H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_copy_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode attribute information & keep a copy */
/* (we make a copy instead of calling the user/library callback directly in
@@ -901,7 +901,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
htri_t attr_exists; /* Attribute exists in v2 B-tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_rename, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1049,7 +1049,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_iterate_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for skipping attributes */
if(bt2_udata->skip > 0)
@@ -1151,7 +1151,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainf
haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_iterate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1286,7 +1286,7 @@ H5A_dense_remove_bt2_cb(const void *_record, void *_udata)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_remove_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for removing the link from the creation order index */
if(H5F_addr_defined(udata->corder_bt2_addr)) {
@@ -1352,7 +1352,7 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
htri_t attr_sharable; /* Flag indicating attributes are sharable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1444,7 +1444,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_remove_by_idx_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set up the user data for fractal heap 'op' callback */
fh_udata.f = bt2_udata->f;
@@ -1571,7 +1571,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
haddr_t bt2_addr; /* Address of v2 B-tree to use for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_remove_by_idx, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1701,7 +1701,7 @@ H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
htri_t attr_sharable; /* Flag indicating attributes are sharable */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_exists, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -1788,7 +1788,7 @@ H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata)
H5A_t *attr = NULL; /* Attribute being removed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_delete_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for shared attribute */
if(record->flags & H5O_MSG_FLAG_SHARED) {
@@ -1852,7 +1852,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
H5HF_t *fheap = NULL; /* Fractal heap handle */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5A_dense_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 2b244fd..22faaa2 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -100,7 +100,7 @@ DESCRIPTION
static herr_t
H5A_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT
FUNC_LEAVE_NOAPI(H5A_init())
} /* H5A_init_deprec_interface() */
@@ -143,7 +143,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
H5S_t *space; /* Dataspace to use for attribute */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Acreate1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*siii", loc_id, name, type_id, space_id, plist_id);
/* check arguments */
@@ -198,7 +198,7 @@ H5Aopen_name(hid_t loc_id, const char *name)
H5A_t *attr = NULL; /* Attribute opened */
hid_t ret_value;
- FUNC_ENTER_API(H5Aopen_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* check arguments */
@@ -211,7 +211,7 @@ H5Aopen_name(hid_t loc_id, const char *name)
/* Open the attribute on the object header */
if(NULL == (attr = H5A_open_by_name(&loc, ".", name, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute: '%s'", name)
/* Register the attribute and get an ID for it */
if((ret_value = H5I_register(H5I_ATTR, attr, TRUE)) < 0)
@@ -256,7 +256,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
H5A_t *attr = NULL; /* Attribute opened */
hid_t ret_value;
- FUNC_ENTER_API(H5Aopen_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "iIu", loc_id, idx);
/* check arguments */
@@ -308,7 +308,7 @@ H5Aget_num_attrs(hid_t loc_id)
void *obj;
int ret_value;
- FUNC_ENTER_API(H5Aget_num_attrs, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", loc_id);
/* check arguments */
@@ -405,7 +405,7 @@ H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
hsize_t last_attr; /* Index of last attribute examined */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Aiterate1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*Iux*x", loc_id, attr_num, op, op_data);
/* check arguments */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 4e610e4..8475330 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -138,12 +138,12 @@ H5FL_SEQ_DEFINE(H5A_t_ptr);
*/
static herr_t
H5A_compact_build_table_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5A_compact_bt_ud_t *udata = (H5A_compact_bt_ud_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_compact_build_table_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -204,7 +204,7 @@ H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type,
H5O_mesg_operator_t op; /* Wrapper for operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_compact_build_table)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -265,7 +265,7 @@ H5A_dense_build_table_cb(const H5A_t *attr, void *_udata)
H5A_dense_bt_ud_t *udata = (H5A_dense_bt_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_build_table_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(attr);
@@ -314,7 +314,7 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
hsize_t nrec; /* # of records in v2 B-tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_build_table)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -395,7 +395,7 @@ done:
static int
H5A_attr_cmp_name_inc(const void *attr1, const void *attr2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_attr_cmp_name_inc)
+ FUNC_ENTER_NOAPI_NOINIT
FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr1)->shared->name,
(*(const H5A_t * const *)attr2)->shared->name))
@@ -423,7 +423,7 @@ H5A_attr_cmp_name_inc(const void *attr1, const void *attr2)
static int
H5A_attr_cmp_name_dec(const void *attr1, const void *attr2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_attr_cmp_name_dec)
+ FUNC_ENTER_NOAPI_NOINIT
FUNC_LEAVE_NOAPI(HDstrcmp((*(const H5A_t * const *)attr2)->shared->name,
(*(const H5A_t * const *)attr1)->shared->name))
@@ -452,7 +452,7 @@ H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_attr_cmp_corder_inc)
+ FUNC_ENTER_NOAPI_NOINIT
if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx)
ret_value = -1;
@@ -487,7 +487,7 @@ H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_attr_cmp_corder_dec)
+ FUNC_ENTER_NOAPI_NOINIT
if((*(const H5A_t * const *)attr1)->shared->crt_idx < (*(const H5A_t * const *)attr2)->shared->crt_idx)
ret_value = 1;
@@ -517,7 +517,7 @@ static herr_t
H5A_attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
H5_iter_order_t order)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_attr_sort_table)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(atable);
@@ -567,7 +567,7 @@ H5A_attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip,
size_t u; /* Local index variable */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI(H5A_attr_iterate_table, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(atable);
@@ -646,7 +646,7 @@ H5A_attr_release_table(H5A_attr_table_t *atable)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_attr_release_table)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(atable);
@@ -691,7 +691,7 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5A_get_ainfo, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* check arguments */
HDassert(f);
@@ -756,7 +756,7 @@ H5A_set_version(const H5F_t *f, H5A_t *attr)
hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
- FUNC_ENTER_NOAPI_NOFUNC(H5A_set_version)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -820,7 +820,7 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_attr_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(attr_src);
@@ -851,7 +851,8 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
HDassert(attr_dst->shared->name);
/* Copy attribute's datatype */
- /* (Start destination datatype as transient, even if source is named) */
+ /* If source is named, we will keep dst as named, but we will not actually
+ * copy the target and update the message until post copy */
if(NULL == (attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "cannot copy datatype")
@@ -859,37 +860,14 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
if(H5T_set_loc(attr_dst->shared->dt, file_dst, H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "cannot mark datatype on disk")
- /* Check for named datatype being copied */
- if(H5T_committed(attr_src->shared->dt)) {
- H5O_loc_t *src_oloc; /* Pointer to source datatype's object location */
- H5O_loc_t *dst_oloc; /* Pointer to dest. datatype's object location */
-
- /* Get group entries for source & destination */
- src_oloc = H5T_oloc(attr_src->shared->dt);
- HDassert(src_oloc);
- dst_oloc = H5T_oloc(attr_dst->shared->dt);
- HDassert(dst_oloc);
-
- /* Reset object location for new object */
- H5O_loc_reset(dst_oloc);
- dst_oloc->file = file_dst;
-
- /* Copy the shared object from source to destination */
- if(H5O_copy_header_map(src_oloc, dst_oloc, dxpl_id, cpy_info, FALSE,
- NULL, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy object")
-
- /* Update shared message info from named datatype info */
- H5T_update_shared(attr_dst->shared->dt);
- } /* end if */
- else {
+ if(!H5T_committed(attr_src->shared->dt)) {
/* If the datatype is not named, it may have been shared in the
* source file's heap. Un-share it for now. We'll try to shared
* it in the destination file below.
*/
if(H5O_msg_reset_share(H5O_DTYPE_ID, attr_dst->shared->dt) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing")
- } /* end else */
+ } /* end if */
/* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied.
* Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */
@@ -902,13 +880,13 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
if(H5O_msg_reset_share(H5O_SDSPACE_ID, attr_dst->shared->ds) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset dataspace sharing")
-
- /* Try to share both the datatype and dataset. This does nothing if the
- * datatype is committed or sharing is disabled.
+ /* Simulate trying to share both the datatype and dataset, to determine the
+ * final size of the messages. This does nothing if the datatype is
+ * committed or sharing is disabled.
*/
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
+ if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype")
- if(H5SM_try_share(file_dst, dxpl_id, NULL, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
+ if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace")
/* Compute the sizes of the datatype and dataspace. This is their raw
@@ -1029,6 +1007,10 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si
if(H5A_set_version(file_dst, attr_dst) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version")
+ /* Recompute the destination attribute's size, if it's a different version */
+ if(attr_src->shared->version != attr_dst->shared->version)
+ *recompute_size = TRUE;
+
/* Set return value */
ret_value = attr_dst;
@@ -1077,20 +1059,55 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t UNUSED *attr_src,
+H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
H5O_loc_t *dst_oloc, const H5A_t *attr_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- H5F_t *file_src = src_oloc->file;
- H5F_t *file_dst = dst_oloc->file;
+ H5F_t *file_src, *file_dst;
herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5A_attr_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
+ HDassert(src_oloc);
+ HDassert(dst_oloc);
HDassert(attr_dst);
+ HDassert(attr_src);
+
+ file_src = src_oloc->file;
+ file_dst = dst_oloc->file;
+
+ HDassert(file_src);
HDassert(file_dst);
+ if(H5T_committed(attr_src->shared->dt)) {
+ H5O_loc_t *src_oloc_dt; /* Pointer to source datatype's object location */
+ H5O_loc_t *dst_oloc_dt; /* Pointer to dest. datatype's object location */
+
+ /* Get group entries for source & destination */
+ src_oloc_dt = H5T_oloc(attr_src->shared->dt);
+ HDassert(src_oloc_dt);
+ dst_oloc_dt = H5T_oloc(attr_dst->shared->dt);
+ HDassert(dst_oloc_dt);
+
+ /* Reset object location for new object */
+ H5O_loc_reset(dst_oloc_dt);
+ dst_oloc_dt->file = file_dst;
+
+ /* Copy the shared object from source to destination */
+ if(H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, dxpl_id, cpy_info, FALSE, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
+
+ /* Update shared message info from named datatype info */
+ H5T_update_shared(attr_dst->shared->dt);
+ } /* end if */
+
+ /* Try to share both the datatype and dataset. This does nothing if the
+ * datatype is committed or sharing is disabled.
+ */
+ if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute datatype")
+ if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_WAS_DEFERRED, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute dataspace")
/* Only need to fix reference attribute with real data being copied to
* another file.
@@ -1124,7 +1141,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5A_dense_copy_file_cb
+ * Function: H5A_dense_post_copy_file_cb
*
* Purpose: Callback routine for copying a dense attribute from SRC to DST.
*
@@ -1138,13 +1155,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata)
+H5A_dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
{
H5A_dense_file_cp_ud_t *udata = (H5A_dense_file_cp_ud_t *)_udata;
H5A_t *attr_dst = NULL;
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_copy_file_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(attr_src);
@@ -1157,6 +1174,10 @@ H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata)
udata->recompute_size, udata->cpy_info, udata->dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
+ if(H5A_attr_post_copy_file(udata->oloc_src, attr_src, udata->oloc_dst, attr_dst,
+ udata->dxpl_id, udata->cpy_info) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
+
/* Reset shared location information */
if(H5O_msg_reset_share(H5O_ATTR_ID, attr_dst) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing")
@@ -1176,105 +1197,20 @@ done:
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close destination attribute")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5A_dense_copy_file_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5A_dense_copy_file_all
- *
- * Purpose: Copy all dense attributes from SRC to DST.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Peter Cao
- * xcao@hdfgroup.org
- * July 20, 2007
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst,
- const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id)
-{
- H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_copy_file_all)
-
- /* check arguments */
- HDassert(ainfo_src);
- HDassert(ainfo_dst);
-
- udata.ainfo = ainfo_dst; /* Destination dense information */
- udata.file = file_dst; /* Destination file */
- udata.recompute_size = recompute_size; /* Flag to indicate if size changed */
- udata.cpy_info = cpy_info; /* Information on copying options */
- udata.dxpl_id = dxpl_id; /* DXPL for operation */
-
- attr_op.op_type = H5A_ATTR_OP_LIB;
- attr_op.u.lib_op = H5A_dense_copy_file_cb;
-
- if(H5A_dense_iterate(file_src, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5A_dense_copy_file_all */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5A_dense_post_copy_file_cb
- *
- * Purpose: Callback routine to perfom post copy for a dense attribute.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Peter Cao
- * xcao@hdfgroup.org
- * July 25, 2007
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5A_dense_post_copy_file_cb(const H5A_t *attr_dst, void *_udata)
-{
- H5A_dense_file_cp_ud_t *udata = (H5A_dense_file_cp_ud_t *)_udata;
- herr_t ret_value = H5_ITER_CONT; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_post_copy_file_cb)
-
- /* check arguments */
- HDassert(attr_dst);
- HDassert(udata);
- HDassert(udata->ainfo);
- HDassert(udata->file);
- HDassert(udata->cpy_info);
-
- if ( H5A_attr_post_copy_file(udata->oloc_src, NULL,
- udata->oloc_dst, attr_dst, udata->dxpl_id, udata->cpy_info) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute")
-
-done:
-
- FUNC_LEAVE_NOAPI(ret_value)
} /* end H5A_dense_post_copy_file_cb() */
/*-------------------------------------------------------------------------
* Function: H5A_dense_post_copy_file_all
*
- * Purpose: Do post copy for all dense attributes.
+ * Purpose: Copy all dense attributes from SRC to DST.
*
* Return: Success: Non-negative
* Failure: Negative
*
* Programmer: Peter Cao
* xcao@hdfgroup.org
- * July 25, 2007
+ * July 20, 2007
*
*-------------------------------------------------------------------------
*/
@@ -1283,21 +1219,19 @@ H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
- H5A_attr_iter_op_t attr_op; /* Attribute operator */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5A_attr_iter_op_t attr_op; /* Attribute operator */
+ hbool_t recompute_size = FALSE; /* recompute the size */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_dense_post_copy_file_all)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(ainfo_src);
HDassert(ainfo_dst);
- HDassert(src_oloc);
- HDassert(dst_oloc);
- HDassert(src_oloc->file);
- HDassert(dst_oloc->file);
- udata.ainfo = ainfo_src;
- udata.file = src_oloc->file;
+ udata.ainfo = ainfo_dst; /* Destination dense information */
+ udata.file = dst_oloc->file; /* Destination file */
+ udata.recompute_size = &recompute_size; /* Flag to indicate if size changed */
udata.cpy_info = cpy_info; /* Information on copying options */
udata.dxpl_id = dxpl_id; /* DXPL for operation */
udata.oloc_src = src_oloc;
@@ -1306,11 +1240,12 @@ H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo
attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5A_dense_post_copy_file_cb;
- if(H5A_dense_iterate(dst_oloc->file, dxpl_id, (hid_t)0, ainfo_dst, H5_INDEX_NAME,
+
+ if(H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5A_dense_post_copy_file_all */
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index 27f500e..20aa5b9 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -283,8 +283,6 @@ H5_DLL H5A_t *H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t
H5O_copy_t *cpy_info, hid_t dxpl_id);
H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,
H5O_loc_t *dst_oloc, const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-H5_DLL herr_t H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst,
- const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id);
H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 845c6c8..19b5547 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -97,7 +97,7 @@ H5A_is_shared_test(hid_t attr_id)
H5A_t *attr; /* Attribute object for ID */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_is_shared_test)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
@@ -130,7 +130,7 @@ H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
H5A_t *attr; /* Attribute object for ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5A_get_shared_rc_test)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
diff --git a/src/H5B.c b/src/H5B.c
index 61c5856..cd50b36 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -224,7 +224,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
H5B_shared_t *shared=NULL; /* Pointer to shared B-tree info */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5B_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -315,7 +315,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
int cmp = 1; /* Key comparison value */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5B_find, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -407,7 +407,7 @@ H5B_find_node(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
htri_t found; /* Whether the correct node has been found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_find_node, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -516,7 +516,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
hbool_t bt_pinned = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_split)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -789,7 +789,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
hbool_t nrbt_pinned = FALSE; /* TRUE if new_root_bt is pinned */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5B_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -973,7 +973,7 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned *idx,
H5B_shared_t *shared; /* Pointer to shared B-tree info */
uint8_t *base; /* Base offset for move */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B_insert_child)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(bt);
HDassert(bt_flags);
@@ -1074,7 +1074,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
H5B_ins_t my_ins = H5B_INS_ERROR;
H5B_ins_t ret_value = H5B_INS_ERROR; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_insert_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments
@@ -1438,7 +1438,7 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add
unsigned i; /* Index */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_iterate_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1503,7 +1503,7 @@ H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOERR(H5B_iterate, -)
+ FUNC_ENTER_NOAPI_NOERR
/*
* Check arguments.
@@ -1562,7 +1562,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
int cmp = 1; /* Key comparison value */
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI(H5B_remove_helper, H5B_INS_ERROR)
+ FUNC_ENTER_NOAPI(H5B_INS_ERROR)
HDassert(f);
HDassert(type);
@@ -1886,7 +1886,7 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
hbool_t rt_key_changed = FALSE; /*right key changed?*/
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -1932,7 +1932,7 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -2006,7 +2006,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
size_t u; /* Local index variable */
H5B_shared_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5B_shared_new, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -2082,7 +2082,7 @@ H5B_shared_free(void *_shared)
{
H5B_shared_t *shared = (H5B_shared_t *)_shared;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B_shared_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the raw B-tree node buffer */
shared->page = H5FL_BLK_FREE(page, shared->page);
@@ -2119,7 +2119,7 @@ H5B_copy(const H5B_t *old_bt)
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_t *ret_value;
- FUNC_ENTER_NOAPI(H5B_copy, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -2192,7 +2192,7 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
haddr_t left_child; /* Address of left-most child in node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_get_info_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2292,7 +2292,7 @@ H5B_get_info(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
H5B_info_ud_t info_udata; /* User-data for B-tree size iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_get_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -2347,7 +2347,7 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
htri_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_valid, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -2400,7 +2400,7 @@ done:
herr_t
H5B_node_dest(H5B_t *bt)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B_node_dest)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(bt);
@@ -2439,7 +2439,7 @@ H5B_support(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
H5B_t *node = NULL; /* Node containing direct link to child */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5B_support, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -2498,7 +2498,7 @@ H5B_unsupport(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
H5B_t *node = NULL; /* Node containing direct link to child */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_unsupport, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5B2.c b/src/H5B2.c
index 9c3fd7b..003f83e 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -138,7 +138,7 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udat
haddr_t hdr_addr; /* B-tree header address */
H5B2_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -211,7 +211,7 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata)
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
H5B2_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(f);
@@ -276,7 +276,7 @@ H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata)
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -336,7 +336,7 @@ done:
herr_t
H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5B2_get_addr)
+ FUNC_ENTER_NOAPI_NOERR
/*
* Check arguments.
@@ -374,7 +374,7 @@ H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, void *op_data)
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOERR(H5B2_iterate, -)
+ FUNC_ENTER_NOAPI_NOERR
/* Check arguments. */
HDassert(bt2);
@@ -431,7 +431,7 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
unsigned idx; /* Location of record which matches key */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_find, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -566,7 +566,7 @@ H5B2_index(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order, hsize_t idx,
unsigned depth; /* Current depth of the tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_index, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -720,7 +720,7 @@ H5B2_remove(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_remove_t op,
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -794,7 +794,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_remove_by_idx, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -872,7 +872,7 @@ done:
herr_t
H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_get_nrec)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(bt2);
@@ -917,7 +917,7 @@ H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range, void *udata,
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_neighbor, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -979,7 +979,7 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_modify, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -1131,7 +1131,7 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
hbool_t pending_delete = FALSE; /* Whether the v2 B-tree is pending deletion */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(bt2);
@@ -1241,7 +1241,7 @@ H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index f47bb9f..2ee4ef7 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -165,7 +165,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
const uint8_t *p; /* Pointer into raw data buffer */
H5B2_hdr_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_hdr_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -280,7 +280,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_hdr_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -381,7 +381,7 @@ H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_hdr_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(hdr);
@@ -425,7 +425,7 @@ H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_hdr_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -462,7 +462,7 @@ done:
static herr_t
H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_cache_hdr_size)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -502,7 +502,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
unsigned u; /* Local index variable */
H5B2_internal_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_internal_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -625,7 +625,7 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_internal_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -722,7 +722,7 @@ H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_internal_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -767,7 +767,7 @@ H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_internal_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -804,7 +804,7 @@ done:
static herr_t
H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_cache_internal_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(internal);
@@ -844,7 +844,7 @@ H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata)
unsigned u; /* Local index variable */
H5B2_leaf_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_leaf_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -947,7 +947,7 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_leaf_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -1030,7 +1030,7 @@ H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_leaf_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -1075,7 +1075,7 @@ H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5B2_cache_leaf_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1112,7 +1112,7 @@ done:
static herr_t
H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_cache_leaf_size)
+ FUNC_ENTER_NOAPI_NOERR
/* check arguments */
HDassert(leaf);
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 5a0b341..3e5d55a 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -97,7 +97,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_hdr_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -213,7 +213,7 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_int_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -345,7 +345,7 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
char temp_str[128]; /* Temporary string, for formatting */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_leaf_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index e8d8b96..c90b296 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -115,7 +115,7 @@ H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_init)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -241,7 +241,7 @@ H5B2_hdr_alloc(H5F_t *f)
H5B2_hdr_t *hdr = NULL; /* v2 B-tree header */
H5B2_hdr_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_alloc)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -288,7 +288,7 @@ H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
H5B2_hdr_t *hdr = NULL; /* The new v2 B-tree header information */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -342,7 +342,7 @@ H5B2_hdr_incr(H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_incr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(hdr);
@@ -378,7 +378,7 @@ H5B2_hdr_decr(H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -413,7 +413,7 @@ done:
herr_t
H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_hdr_fuse_incr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -441,7 +441,7 @@ H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr)
size_t
H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_hdr_fuse_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -472,7 +472,7 @@ H5B2_hdr_dirty(H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_dirty)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -504,7 +504,7 @@ H5B2_hdr_free(H5B2_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_hdr_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -569,7 +569,7 @@ H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id)
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting v2 B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_hdr_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(hdr);
diff --git a/src/H5B2int.c b/src/H5B2int.c
index f6602737f..4355174 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -140,7 +140,7 @@ H5B2_locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off,
unsigned my_idx = 0; /* Final index value */
int cmp = -1; /* Key comparison value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_locate_record)
+ FUNC_ENTER_NOAPI_NOINIT
hi = nrec;
while(lo < hi && cmp) {
@@ -187,7 +187,7 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *cur
unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_split1)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -368,7 +368,7 @@ H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id)
unsigned u_max_nrec_size; /* Temporary variable for range checking */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_split_root)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -450,7 +450,7 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_redistribute2)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -684,7 +684,7 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_redistribute3)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1065,7 +1065,7 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_merge2)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1225,7 +1225,7 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_merge3)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1443,7 +1443,7 @@ H5B2_swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
uint8_t *child_native; /* Pointer to child's native records */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_swap_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1530,7 +1530,7 @@ H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_insert_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1606,7 +1606,7 @@ H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_insert_internal)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1736,7 +1736,7 @@ H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr)
H5B2_leaf_t *leaf = NULL; /* Pointer to new leaf node created */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_create_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1805,7 +1805,7 @@ H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, unsigned nrec,
H5B2_leaf_cache_ud_t udata; /* User-data for callback */
H5B2_leaf_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_protect_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1846,7 +1846,7 @@ H5B2_create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *node_ptr,
H5B2_internal_t *internal = NULL; /* Pointer to new internal node created */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_create_internal)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1924,7 +1924,7 @@ H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
H5B2_internal_cache_ud_t udata; /* User data to pass through to cache 'deserialize' callback */
H5B2_internal_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_protect_internal)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -1975,7 +1975,7 @@ H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
unsigned u; /* Local index */
herr_t ret_value = H5_ITER_CONT; /* Iterator return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_iterate_node)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2082,7 +2082,7 @@ H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_remove_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2167,7 +2167,7 @@ H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_remove_internal)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2363,7 +2363,7 @@ H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting leaf node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_remove_leaf_by_idx)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2447,7 +2447,7 @@ H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
hbool_t collapsed_root = FALSE; /* Whether the root was collapsed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_remove_internal_by_idx)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2710,7 +2710,7 @@ H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_pt
int cmp = 0; /* Comparison value of records */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_neighbor_leaf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2796,7 +2796,7 @@ H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
int cmp = 0; /* Comparison value of records */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_neighbor_internal)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2868,7 +2868,7 @@ H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
uint8_t *native; /* Pointers to node's native records */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_delete_node)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -2946,7 +2946,7 @@ H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
H5B2_internal_t *internal = NULL; /* Pointer to internal node */
herr_t ret_value = SUCCEED; /* Iterator return value */
- FUNC_ENTER_NOAPI(H5B2_node_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(hdr);
@@ -2999,7 +2999,7 @@ H5B2_internal_free(H5B2_internal_t *internal)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_internal_free)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -3044,7 +3044,7 @@ H5B2_leaf_free(H5B2_leaf_t *leaf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_leaf_free)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index afd1e33..a8f1fbd 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -86,7 +86,7 @@
herr_t
H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_stat_info)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(info);
@@ -118,7 +118,7 @@ H5B2_size(H5B2_t *bt2, hid_t dxpl_id, hsize_t *btree_size)
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 8076343..8507d6e 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -126,7 +126,7 @@ H5B2_test_crt_context(void *_f)
H5B2_test_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_test_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -164,7 +164,7 @@ H5B2_test_dst_context(void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -192,7 +192,7 @@ H5B2_test_dst_context(void *_ctx)
static herr_t
H5B2_test_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(hsize_t *)nrecord = *(const hsize_t *)udata;
@@ -217,7 +217,7 @@ H5B2_test_store(void *nrecord, const void *udata)
static herr_t
H5B2_test_compare(const void *rec1, const void *rec2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI((herr_t)(*(const hssize_t *)rec1 - *(const hssize_t *)rec2))
} /* H5B2_test_compare() */
@@ -241,7 +241,7 @@ H5B2_test_encode(uint8_t *raw, const void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -270,7 +270,7 @@ H5B2_test_decode(const uint8_t *raw, void *nrecord, void *_ctx)
{
H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -299,7 +299,7 @@ H5B2_test_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
int indent, int fwidth, const void *record,
const void UNUSED *_udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert (record);
@@ -329,7 +329,7 @@ H5B2_test_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr)
H5B2_test_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B2_test_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -365,7 +365,7 @@ done:
herr_t
H5B2_get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_get_root_addr_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(bt2);
@@ -402,7 +402,7 @@ H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id, void *udata,
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B2_get_node_info_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
@@ -516,7 +516,7 @@ H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata)
H5B2_node_info_test_t ninfo; /* Node information */
int ret_value; /* Return information */
- FUNC_ENTER_NOAPI(H5B2_get_node_depth_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(bt2);
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 64c8b56..191766c 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -109,7 +109,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
unsigned u; /* Local index variable */
H5B_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -215,7 +215,7 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns
H5B_shared_t *shared; /* Pointer to shared B-tree info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -305,7 +305,7 @@ H5B_dest(H5F_t *f, H5B_t *bt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5B_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -358,7 +358,7 @@ H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5B_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -396,7 +396,7 @@ H5B_notify(H5AC_notify_action_t action, H5B_t *bt)
H5B_shared_t *shared; /* Pointer to shared B-tree info */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5B_notify)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -454,7 +454,7 @@ H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr)
{
H5B_shared_t *shared; /* Pointer to shared B-tree info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B_compute_size)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 23ea9c8..3fb7dd8 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -65,7 +65,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5B_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -189,7 +189,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
struct child_t *next;
} *head = NULL, *tail = NULL, *prev = NULL, *cur = NULL, *tmp = NULL;
- FUNC_ENTER_NOAPI_NOINIT(H5B_assert)
+ FUNC_ENTER_NOAPI_NOINIT
if(0 == ncalls++) {
if(H5DEBUG(B))
diff --git a/src/H5C.c b/src/H5C.c
index ebc3272..3c792ba 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -239,7 +239,7 @@ H5C_epoch_marker_load(H5F_t UNUSED * f,
{
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_epoch_marker_load, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "called unreachable fcn.")
@@ -258,7 +258,7 @@ H5C_epoch_marker_flush(H5F_t UNUSED *f,
{
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_epoch_marker_flush, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.")
@@ -273,7 +273,7 @@ H5C_epoch_marker_dest(H5F_t UNUSED * f,
{
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_epoch_marker_dest, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.")
@@ -289,7 +289,7 @@ H5C_epoch_marker_clear(H5F_t UNUSED * f,
{
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_epoch_marker_clear, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.")
@@ -304,7 +304,7 @@ H5C_epoch_marker_notify(H5C_notify_action_t UNUSED action,
{
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_epoch_marker_notify)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.")
@@ -319,7 +319,7 @@ H5C_epoch_marker_size(const H5F_t UNUSED * f,
{
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_epoch_marker_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "called unreachable fcn.")
@@ -455,7 +455,7 @@ H5C_apply_candidate_list(H5F_t * f,
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_apply_candidate_list, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -771,7 +771,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t * cache_ptr)
size_t space_needed;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_construct_candidate_list__clean_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -882,7 +882,7 @@ H5C_construct_candidate_list__min_clean(H5C_t * cache_ptr)
size_t space_needed = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_construct_candidate_list__min_clean, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -985,7 +985,7 @@ H5C_create(size_t max_cache_size,
H5C_t * cache_ptr = NULL;
H5C_t * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5C_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert( max_cache_size >= H5C__MIN_MAX_CACHE_SIZE );
HDassert( max_cache_size <= H5C__MAX_MAX_CACHE_SIZE );
@@ -1009,7 +1009,7 @@ H5C_create(size_t max_cache_size,
"memory allocation failed")
}
- if ( (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR)) == NULL ) {
+ if ( (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list.")
}
@@ -1397,7 +1397,7 @@ H5C_dest(H5F_t * f,
H5C_t * cache_ptr = f->shared->cache;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_dest, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(cache_ptr);
@@ -1451,7 +1451,7 @@ H5C_expunge_entry(H5F_t * f,
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_expunge_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -1583,7 +1583,7 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign
size_t initial_slist_size;
#endif /* H5C_DO_SANITY_CHECKS */
- FUNC_ENTER_NOAPI(H5C_flush_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -1959,7 +1959,7 @@ H5C_flush_to_min_clean(H5F_t * f,
#endif /* JRM */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5C_flush_to_min_clean, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -2130,7 +2130,7 @@ H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_get_cache_auto_resize_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -2179,7 +2179,7 @@ H5C_get_cache_size(H5C_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_get_cache_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -2236,7 +2236,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_get_cache_hit_rate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -2305,7 +2305,7 @@ H5C_get_entry_status(const H5F_t *f,
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_get_entry_status, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -2395,7 +2395,7 @@ H5C_get_evictions_enabled(const H5C_t *cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_get_evictions_enabled, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -2436,7 +2436,7 @@ done:
herr_t
H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr)
+ FUNC_ENTER_NOAPI_NOERR
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
@@ -2468,7 +2468,7 @@ herr_t
H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
FILE **trace_file_ptr_ptr)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr_from_entry)
+ FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
HDassert(entry_ptr);
@@ -2528,7 +2528,7 @@ H5C_insert_entry(H5F_t * f,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_insert_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -2852,7 +2852,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_mark_entries_as_clean, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( f->shared );
@@ -3122,7 +3122,7 @@ H5C_mark_entry_dirty(void *thing)
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_mark_entry_dirty, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(entry_ptr);
@@ -3201,7 +3201,7 @@ H5C_move_entry(H5C_t * cache_ptr,
#endif /* H5C_DO_SANITY_CHECKS */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_move_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3365,7 +3365,7 @@ H5C_resize_entry(void *thing, size_t new_size)
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_resize_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(entry_ptr);
@@ -3472,7 +3472,7 @@ H5C_pin_entry_from_client(H5C_t UNUSED * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_pin_entry_from_client)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert( cache_ptr );
@@ -3518,7 +3518,7 @@ H5C_pin_protected_entry(void *thing)
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing; /* Pointer to entry to pin */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_pin_protected_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(entry_ptr);
@@ -3611,7 +3611,7 @@ H5C_protect(H5F_t * f,
H5C_cache_entry_t * entry_ptr;
void * ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5C_protect, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert( f );
@@ -3990,7 +3990,7 @@ H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_reset_cache_hit_rate_stats, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -4035,7 +4035,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
size_t new_min_clean_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_set_cache_auto_resize_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -4309,7 +4309,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_set_evictions_enabled, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
@@ -4363,7 +4363,7 @@ H5C_set_prefix(H5C_t * cache_ptr, char * prefix)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_set_prefix, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( ( cache_ptr == NULL ) ||
( cache_ptr->magic != H5C__H5C_T_MAGIC ) ||
@@ -4406,7 +4406,7 @@ H5C_set_trace_file_ptr(H5C_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_set_trace_file_ptr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* This would normally be an assert, but we need to use an HGOTO_ERROR
* call to shut up the compiler.
@@ -4493,7 +4493,7 @@ H5C_stats(H5C_t * cache_ptr,
double average_entries_scanned_per_calls_to_msic = 0.0;
#endif /* H5C_COLLECT_CACHE_STATS */
- FUNC_ENTER_NOAPI(H5C_stats, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* This would normally be an assert, but we need to use an HGOTO_ERROR
* call to shut up the compiler.
@@ -5020,14 +5020,14 @@ H5C_dump_cache(H5C_t * cache_ptr,
H5SL_t * slist_ptr = NULL;
H5SL_node_t * node_ptr = NULL;
- FUNC_ENTER_NOAPI(H5C_dump_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cache_ptr != NULL);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(cache_name != NULL );
/* First, create a skip list */
- slist_ptr = H5SL_create(H5SL_TYPE_HADDR);
+ slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL);
if ( slist_ptr == NULL ) {
@@ -5147,7 +5147,7 @@ H5C_unpin_entry_from_client(H5C_t * cache_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_unpin_entry_from_client)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert( cache_ptr );
@@ -5200,7 +5200,7 @@ H5C_unpin_entry(void *_entry_ptr)
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)_entry_ptr; /* Pointer to entry to unpin */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_unpin_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(entry_ptr);
@@ -5279,7 +5279,7 @@ H5C_unprotect(H5F_t * f,
H5C_cache_entry_t * test_entry_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_unprotect, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
deleted = ( (flags & H5C__DELETED_FLAG) != 0 );
dirtied = ( (flags & H5C__DIRTIED_FLAG) != 0 );
@@ -5592,7 +5592,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_validate_resize_config, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if ( config_ptr == NULL ) {
@@ -5850,7 +5850,7 @@ static void
H5C_adjust_flush_dependency_rc(H5C_cache_entry_t * cache_entry,
unsigned old_child_height, unsigned new_child_height)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5C_adjust_flush_dependency_rc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(cache_entry);
@@ -5963,7 +5963,7 @@ H5C_create_flush_dependency(void * parent_thing, void * child_thing)
#endif /* NDEBUG */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_create_flush_dependency, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(parent_entry);
@@ -6076,7 +6076,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void * child_thing)
#endif /* NDEBUG */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_destroy_flush_dependency, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(parent_entry);
@@ -6215,7 +6215,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
enum H5C_resize_status status = in_spec; /* will change if needed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C__auto_adjust_cache_size)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( f );
HDassert( cache_ptr );
@@ -6565,7 +6565,7 @@ H5C__autoadjust__ageout(H5F_t * f,
size_t test_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( f );
HDassert( cache_ptr );
@@ -6678,7 +6678,7 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr)
herr_t ret_value = SUCCEED; /* Return value */
int i;
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__cycle_epoch_marker)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -6816,7 +6816,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
H5C_cache_entry_t * prev_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__evict_aged_out_entries)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( f );
HDassert( cache_ptr );
@@ -7023,7 +7023,7 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr)
herr_t ret_value = SUCCEED; /* Return value */
int i;
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__insert_new_marker)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -7101,7 +7101,7 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr)
int i;
int ring_buf_index;
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__remove_all_markers)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -7182,7 +7182,7 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
int i;
int ring_buf_index;
- FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__remove_excess_markers)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -7278,7 +7278,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
double hit_rate;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C__flash_increase_cache_size)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -7475,7 +7475,7 @@ H5C_flush_invalidate_cache(H5F_t * f,
#endif /* H5C_DO_SANITY_CHECKS */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5C_flush_invalidate_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert( f );
HDassert( cache_ptr );
@@ -8025,7 +8025,7 @@ H5C_flush_single_entry(H5F_t * f,
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_flush_single_entry)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( f );
HDassert( cache_ptr );
@@ -8102,7 +8102,7 @@ H5C_flush_single_entry(H5F_t * f,
*/
if ( ( ! clear_only ) &&
( entry_ptr->is_dirty ) &&
- ( IS_H5FD_MPI(f) ) ) {
+ (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI) ) ) {
H5P_genplist_t *dxpl; /* Dataset transfer property list */
H5FD_mpio_xfer_t xfer_mode; /* I/O xfer mode property value */
@@ -8448,7 +8448,7 @@ H5C_load_entry(H5F_t * f,
unsigned u; /* Local index variable */
void * ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_load_entry)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(f->shared);
@@ -8618,7 +8618,7 @@ H5C_make_space_in_cache(H5F_t * f,
H5C_cache_entry_t * next_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5C_make_space_in_cache)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( f );
HDassert( cache_ptr );
@@ -8915,7 +8915,7 @@ H5C_validate_lru_list(H5C_t * cache_ptr)
size_t size = 0;
H5C_cache_entry_t * entry_ptr = NULL;
- FUNC_ENTER_NOAPI_NOINIT(H5C_validate_lru_list)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -9036,7 +9036,7 @@ H5C_verify_not_in_index(H5C_t * cache_ptr,
int32_t depth;
H5C_cache_entry_t * scan_ptr = NULL;
- FUNC_ENTER_NOAPI_NOINIT(H5C_verify_not_in_index)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -9098,7 +9098,7 @@ done:
herr_t
H5C_ignore_tags(H5C_t * cache_ptr)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5C_ignore_tags)
+ FUNC_ENTER_NOAPI_NOERR
/* Assertions */
HDassert(cache_ptr != NULL);
@@ -9136,7 +9136,7 @@ H5C_tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
H5C_tag_t tag; /* Tag structure */
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_tag_entry, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(cache_ptr != NULL);
@@ -9183,7 +9183,7 @@ H5C_flush_tagged_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_
herr_t result;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5C_flush_tagged_entries, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -9227,7 +9227,7 @@ H5C_evict_tagged_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_
herr_t ret_value = SUCCEED;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5C_evict_tagged_entries, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Assertions */
HDassert(f);
@@ -9278,7 +9278,7 @@ H5C_mark_tagged_entries(H5C_t * cache_ptr, haddr_t tag, hbool_t mark_clean)
int u; /* Iterator */
H5C_cache_entry_t *entry_ptr = NULL; /* entry pointer */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5C_mark_tagged_entries)
+ FUNC_ENTER_NOAPI_NOINIT
/* Assertions */
HDassert(cache_ptr != NULL);
@@ -9333,7 +9333,7 @@ H5C_flush_marked_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5C_flush_marked_entries, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Assertions */
HDassert(cache_ptr != NULL);
@@ -9376,7 +9376,7 @@ H5C_evict_marked_entries(H5F_t * f, hid_t primary_dxpl_id, hid_t secondary_dxpl_
hbool_t first_flush = TRUE;
/* Function Enter Macro */
- FUNC_ENTER_NOAPI(H5C_evict_marked_entries, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Assertions */
HDassert( cache_ptr != NULL );
@@ -9481,7 +9481,7 @@ H5C_retag_entries(H5C_t * cache_ptr, haddr_t src_tag, haddr_t dest_tag)
unsigned u; /* Local index variable */
H5C_cache_entry_t *entry_ptr = NULL; /* entry pointer */
- FUNC_ENTER_NOAPI_NOFUNC(H5C_retag_entries)
+ FUNC_ENTER_NOAPI_NOINIT
/* Iterate through entries, retagging those with the src_tag tag */
for(u = 0; u < H5C__HASH_TABLE_LEN; u++) {
diff --git a/src/H5CS.c b/src/H5CS.c
index c033e7e..c2ca49b 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -79,7 +79,7 @@ H5CS_get_stack(void)
{
H5CS_t *fstack;
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_get_stack);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
fstack = H5TS_get_thread_local_value(H5TS_funcstk_key_g);
if (!fstack) {
@@ -123,7 +123,7 @@ H5CS_print_stack(const H5CS_t *fstack, FILE *stream)
int i; /* Local index ariable */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_print_stack);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
HDassert(fstack);
@@ -170,7 +170,7 @@ H5CS_print(FILE *stream)
H5CS_t *fstack = H5CS_get_my_stack (); /* Get the correct function stack */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_print);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
assert(fstack);
@@ -202,7 +202,7 @@ H5CS_push(const char *func_name)
H5CS_t *fstack = H5CS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_push);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
assert (fstack);
@@ -239,7 +239,7 @@ H5CS_pop(void)
H5CS_t *fstack = H5CS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_pop);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
assert (fstack);
@@ -273,7 +273,7 @@ H5CS_copy_stack(H5CS_t *new_stack)
unsigned u; /* Local index variable */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_copy_stack);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
HDassert (old_stack);
@@ -307,7 +307,7 @@ H5CS_close_stack(H5CS_t *stack)
unsigned u; /* Local index variable */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5CS_close_stack);
+ FUNC_ENTER_NOAPI_NOERR_NOFS
/* Sanity check */
HDassert (stack);
diff --git a/src/H5D.c b/src/H5D.c
index 6e86e32..d0b0be3 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -88,7 +88,7 @@ DESCRIPTION
static herr_t
H5D_init_pub_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_init_pub_interface)
+ FUNC_ENTER_NOAPI_NOINIT
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D_init_pub_interface() */
@@ -132,7 +132,7 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
const H5S_t *space; /* Dataspace for dataset */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dcreate2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("i", "i*siiiii", loc_id, name, type_id, space_id, lcpl_id, dcpl_id,
dapl_id);
@@ -166,7 +166,7 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
/* Create the new dataset & get its ID */
- if(NULL == (dset = H5D_create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, H5AC_dxpl_id)))
+ if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
@@ -224,7 +224,7 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
const H5S_t *space; /* Dataspace for dataset */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dcreate_anon, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("i", "iiiii", loc_id, type_id, space_id, dcpl_id, dapl_id);
/* Check arguments */
@@ -308,7 +308,7 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
- FUNC_ENTER_API(H5Dopen2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, name, dapl_id);
/* Check args */
@@ -383,7 +383,7 @@ H5Dclose(hid_t dset_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
@@ -429,7 +429,7 @@ H5Dget_space(hid_t dset_id)
H5S_t *space = NULL;
hid_t ret_value;
- FUNC_ENTER_API(H5Dget_space, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dset_id);
/* Check args */
@@ -476,7 +476,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
H5D_t *dset = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Dget_space_status, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Ds", dset_id, allocation);
/* Check arguments */
@@ -516,13 +516,17 @@ H5Dget_type(hid_t dset_id)
H5T_t *dt = NULL; /* Datatype to return */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dget_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dset_id);
/* Check args */
if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ /* Patch the datatype's "top level" file pointer */
+ if(H5T_patch_file(dset->shared->type, dset->oloc.file) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer")
+
/* Copy the dataset's datatype */
if(NULL == (dt = H5T_copy(dset->shared->type, H5T_COPY_REOPEN)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype")
@@ -575,7 +579,7 @@ H5Dget_create_plist(hid_t dset_id)
hid_t new_dcpl_id = FAIL;
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dget_create_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dset_id);
/* Check args */
@@ -712,7 +716,7 @@ H5Dget_access_plist(hid_t dset_id)
hid_t new_dapl_id = FAIL;
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dget_access_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dset_id);
/* Check args */
@@ -774,7 +778,7 @@ H5Dget_storage_size(hid_t dset_id)
H5D_t *dset; /* Dataset to query */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dget_storage_size, 0)
+ FUNC_ENTER_API(0)
H5TRACE1("h", "i", dset_id);
/* Check args */
@@ -809,7 +813,7 @@ H5Dget_offset(hid_t dset_id)
H5D_t *dset; /* Dataset to query */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dget_offset, HADDR_UNDEF)
+ FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE1("a", "i", dset_id);
/* Check args */
@@ -890,7 +894,7 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op,
H5S_t *space; /* Dataspace for iteration */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Diterate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xiix*x", buf, type_id, space_id, op, operator_data);
/* Check args */
@@ -933,7 +937,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf)
H5S_t *space; /* Dataspace for iteration */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dvlen_reclaim, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iii*x", type_id, space_id, plist_id, buf);
/* Check args */
@@ -994,7 +998,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
H5P_genplist_t *plist; /* Property list */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dvlen_get_buf_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iii*h", dataset_id, type_id, space_id, size);
/* Check args */
@@ -1084,7 +1088,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[])
H5D_t *dset; /* Dataset for this operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dset_extent, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
@@ -1120,7 +1124,7 @@ H5Dflush(hid_t dset_id)
H5D_t *dset; /* Dataset for this operation */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Dflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
@@ -1158,7 +1162,7 @@ H5Drefresh(hid_t dset_id)
H5D_t * dset = NULL;
hid_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Drefresh, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 88fe4a5..af48329 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -237,7 +237,7 @@ 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;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_get_shared)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(udata);
HDassert(udata->storage);
@@ -278,7 +278,7 @@ H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_new_node)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -350,7 +350,7 @@ H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_cmp2)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -399,7 +399,7 @@ H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_cmp3)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -466,7 +466,7 @@ H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
unsigned u;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_found)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(f);
@@ -534,7 +534,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
unsigned u;
H5B_ins_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_insert)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -658,7 +658,7 @@ H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out *
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Remove raw data chunk from file */
if(!(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)) {
@@ -695,7 +695,7 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
size_t ndims;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_decode_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(shared);
@@ -733,7 +733,7 @@ H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
size_t ndims;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_encode_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(shared);
@@ -773,7 +773,7 @@ H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_debug_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(key);
@@ -807,7 +807,7 @@ H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndi
size_t sizeof_rkey; /* Size of raw (disk) key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_shared_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set the raw key size */
sizeof_rkey = 4 + /*storage size */
@@ -851,7 +851,7 @@ H5D_btree_create_flush_dep(void *_key, void *_udata, void *parent)
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_create_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(key);
HDassert(udata);
@@ -894,7 +894,7 @@ H5D_btree_update_flush_dep(void *_key, void *_udata, void *old_parent,
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_update_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(key);
HDassert(udata);
@@ -933,7 +933,7 @@ H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -980,7 +980,7 @@ H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1036,7 +1036,7 @@ H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_idx_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -1068,7 +1068,7 @@ H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1127,7 +1127,7 @@ H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_get_addr)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1189,7 +1189,7 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR(H5D_btree_idx_iterate_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check for memcpy() */
HDcompile_assert(offsetof(H5D_chunk_rec_t, nbytes) == offsetof(H5D_btree_key_t, nbytes));
@@ -1233,7 +1233,7 @@ H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5O_t *oh = NULL; /* Dataset's object header */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1295,7 +1295,7 @@ H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_remove)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1353,7 +1353,7 @@ H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(idx_info);
@@ -1429,7 +1429,7 @@ H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_btree_idx_copy_setup, idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
HDassert(idx_info_src);
HDassert(idx_info_src->f);
@@ -1478,7 +1478,7 @@ H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_copy_shutdown)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(storage_src);
HDassert(storage_dst);
@@ -1517,7 +1517,7 @@ H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_btree_idx_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1587,7 +1587,7 @@ done:
static herr_t
H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_idx_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(storage);
@@ -1621,7 +1621,7 @@ H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info,
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_support)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1677,7 +1677,7 @@ H5D_btree_idx_unsupport(const H5D_chk_idx_info_t *idx_info,
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_unsupport)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1727,7 +1727,7 @@ done:
static herr_t
H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_idx_dump)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(storage);
HDassert(stream);
@@ -1755,7 +1755,7 @@ H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_btree_idx_dest)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1795,7 +1795,7 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent
hbool_t shared_init = FALSE; /* Whether B-tree shared info is initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_btree_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Reset "fake" storage info */
HDmemset(&storage, 0, sizeof(storage));
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 4aec4be..e2a5ca1 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -260,7 +260,7 @@ H5D_bt2_crt_context(void *_udata)
H5D_bt2_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(udata);
@@ -308,7 +308,7 @@ H5D_bt2_dst_context(void *_ctx)
{
H5D_bt2_ctx_t *ctx = (H5D_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -336,7 +336,7 @@ H5D_bt2_dst_context(void *_ctx)
static herr_t
H5D_bt2_store(void *record, const void *_udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
const H5D_bt2_find_ud_t *udata = (const H5D_bt2_find_ud_t *)_udata; /* User data */
@@ -369,7 +369,7 @@ H5D_bt2_compare(const void *_udata, const void *_rec2)
const H5D_bt2_rec_t *rec2 = (const H5D_bt2_rec_t *)_rec2; /* The native record */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(rec1);
HDassert(rec2);
@@ -401,7 +401,7 @@ H5D_bt2_encode(uint8_t *raw, const void *_record, void *_ctx)
const H5D_bt2_rec_t *record = (const H5D_bt2_rec_t *)_record; /* The native record */
unsigned i; /* Local index varible */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -435,7 +435,7 @@ H5D_bt2_decode(const uint8_t *raw, void *_record, void *_ctx)
H5D_bt2_rec_t *record = (H5D_bt2_rec_t *)_record; /* The native record */
unsigned i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -469,7 +469,7 @@ H5D_bt2_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
const H5D_bt2_ctx_ud_t *u_ctx = (const H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(record);
@@ -499,7 +499,7 @@ H5D_bt2_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
static herr_t
H5D_bt2_filt_store(void *record, const void *_udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
const H5D_bt2_find_ud_t *udata = (const H5D_bt2_find_ud_t *)_udata; /* User data */
@@ -532,7 +532,7 @@ H5D_bt2_filt_compare(const void *_udata, const void *_rec2)
const H5D_bt2_filt_rec_t *rec2 = (const H5D_bt2_filt_rec_t *)_rec2; /* The native record */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(rec1);
HDassert(rec2);
@@ -564,7 +564,7 @@ H5D_bt2_filt_encode(uint8_t *raw, const void *_record, void *_ctx)
const H5D_bt2_filt_rec_t *record = (const H5D_bt2_filt_rec_t *)_record; /* The native record */
unsigned i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -600,7 +600,7 @@ H5D_bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
H5D_bt2_filt_rec_t *record = (H5D_bt2_filt_rec_t *)_record; /* The native record */
unsigned i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -636,7 +636,7 @@ H5D_bt2_filt_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
const H5D_bt2_ctx_ud_t *u_ctx = (const H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(record);
@@ -674,7 +674,7 @@ H5D_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t obj_addr)
H5O_layout_t layout; /* Layout message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -745,7 +745,7 @@ H5D_bt2_dst_dbg_context(void *_u_ctx)
{
H5D_bt2_ctx_ud_t *u_ctx = (H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_dst_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(u_ctx);
@@ -780,7 +780,7 @@ H5D_bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* user data for creating context */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -824,7 +824,7 @@ H5D_bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -892,7 +892,7 @@ H5D_bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_idx_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -922,7 +922,7 @@ H5D_bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
static herr_t
H5D_bt2_mod_filt_cb(void *_record, void *_op_data, hbool_t *changed)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_mod_filt_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5D_bt2_filt_rec_t *)_record = *(H5D_bt2_filt_rec_t *)_op_data;
@@ -958,7 +958,7 @@ H5D_bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1111,7 +1111,7 @@ done:
static herr_t
H5D_bt2_found_cb(const void *nrecord, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_found_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5D_bt2_rec_t *)op_data = *(const H5D_bt2_rec_t *)nrecord;
@@ -1137,7 +1137,7 @@ H5D_bt2_found_cb(const void *nrecord, void *op_data)
static herr_t
H5D_bt2_filt_found_cb(const void *nrecord, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_filt_found_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5D_bt2_filt_rec_t *)op_data = *(const H5D_bt2_filt_rec_t *)nrecord;
@@ -1166,7 +1166,7 @@ H5D_bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_get_addr)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1267,7 +1267,7 @@ H5D_bt2_idx_iterate_cb(const void *_record, void *_udata)
unsigned u; /* Local index variable */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOERR(H5D_bt2_idx_iterate_cb, -)
+ FUNC_ENTER_NOAPI_NOERR
/* Compose generic chunk record for callback */
if(udata->filtered) { /* filtered record */
@@ -1317,7 +1317,7 @@ H5D_bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5D_bt2_it_ud_t udata; /* User data for B-tree iterator callback */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1380,7 +1380,7 @@ H5D_bt2_remove_cb(const void *record, void *_udata)
H5D_bt2_remove_ud_t *udata = (H5D_bt2_remove_ud_t *)_udata; /* User data for removal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_remove_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
H5_CHECK_OVERFLOW(udata->unfilt_size, uint32_t, hsize_t);
@@ -1414,7 +1414,7 @@ H5D_bt2_filt_remove_cb(const void *_record, void *_udata)
const H5D_bt2_filt_rec_t *record = (const H5D_bt2_filt_rec_t *)_record; /* The native record */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_filt_remove_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
H5_CHECK_OVERFLOW(record->nbytes, uint32_t, hsize_t);
@@ -1446,7 +1446,7 @@ H5D_bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *ud
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_remove)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1534,7 +1534,7 @@ H5D_bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(idx_info);
@@ -1591,7 +1591,7 @@ H5D_bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_copy_setup)
+ FUNC_ENTER_NOAPI_NOINIT
/* Source file */
HDassert(idx_info_src);
@@ -1647,7 +1647,7 @@ H5D_bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_copy_shutdown)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(storage_src);
@@ -1688,7 +1688,7 @@ H5D_bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5B2_t *bt2_cdset = NULL; /* Pointer to v2 B-tree structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_bt2_idx_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(idx_info);
@@ -1733,7 +1733,7 @@ done:
static herr_t
H5D_bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_idx_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(storage);
@@ -1760,7 +1760,7 @@ H5D_bt2_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D_bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_bt2_idx_dump)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(storage);
HDassert(stream);
@@ -1787,7 +1787,7 @@ H5D_bt2_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_bt2_idx_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 304e235..b3b6ab5 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -301,7 +301,7 @@ H5D_chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize_
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_set_info_real, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(layout);
@@ -351,7 +351,7 @@ H5D_chunk_set_info(const H5D_t *dset)
unsigned ndims; /* Rank of dataspace */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_set_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(dset);
@@ -397,7 +397,7 @@ H5D_chunk_construct(H5F_t UNUSED *f, H5D_t *dset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_construct)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -486,7 +486,7 @@ H5D_chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *dapl; /* Data access property list object pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -570,7 +570,7 @@ H5D_chunk_is_space_alloc(const H5O_storage_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5D_chunk_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
HDassert(storage);
@@ -625,7 +625,7 @@ H5D_chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
hbool_t sel_hyper_flag;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_io_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get layout for dataset */
fm->layout = &(dataset->shared->layout);
@@ -722,7 +722,7 @@ H5D_chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
else {
/* Initialize skip list for chunk selections */
if(NULL == dataset->shared->cache.chunk.sel_chunks) {
- if(NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE)))
+ if(NULL == (dataset->shared->cache.chunk.sel_chunks = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create skip list for chunk selections")
} /* end if */
fm->sel_chunks = dataset->shared->cache.chunk.sel_chunks;
@@ -893,7 +893,7 @@ H5D_chunk_alloc(size_t size, const H5O_pline_t *pline)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(size);
@@ -923,7 +923,7 @@ H5D_chunk_alloc(size_t size, const H5O_pline_t *pline)
static void *
H5D_chunk_xfree(void *chk, const H5O_pline_t *pline)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_xfree)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(chk) {
if(pline && pline->nused)
@@ -955,7 +955,7 @@ H5D_chunk_realloc(void *chk, size_t size, const H5O_pline_t *pline)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_realloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(size);
HDassert(pline);
@@ -991,7 +991,7 @@ H5D_free_chunk_info(void *item, void UNUSED *key, void UNUSED *opdata)
{
H5D_chunk_info_t *chunk_info = (H5D_chunk_info_t *)item;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_free_chunk_info)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(chunk_info);
@@ -1037,7 +1037,7 @@ H5D_create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_create_chunk_map_single)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(fm->f_ndims > 0);
@@ -1123,7 +1123,7 @@ H5D_create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_create_chunk_file_map_hyper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
assert(fm->f_ndims>0);
@@ -1300,7 +1300,7 @@ H5D_create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_create_chunk_mem_map_hyper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
assert(fm->f_ndims>0);
@@ -1406,7 +1406,7 @@ H5D_chunk_file_cb(void UNUSED *elem, hid_t UNUSED type_id, unsigned ndims, const
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_file_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Calculate the index of this chunk */
if(H5V_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
@@ -1518,7 +1518,7 @@ H5D_chunk_mem_cb(void UNUSED *elem, hid_t UNUSED type_id, unsigned ndims, const
hsize_t chunk_index; /* Chunk index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_mem_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Calculate the index of this chunk */
if(H5V_chunk_index(ndims, coords, fm->layout->u.chunk.dim, fm->layout->u.chunk.down_chunks, &chunk_index) < 0)
@@ -1594,7 +1594,7 @@ H5D_chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_o
htri_t no_filters = TRUE;
htri_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_cacheable)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(io_info);
HDassert(dataset);
@@ -1691,7 +1691,7 @@ H5D_chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hbool_t skip_missing_chunks = FALSE; /* Whether to skip missing chunks */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -1844,7 +1844,7 @@ H5D_chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
uint32_t dst_accessed_bytes = 0; /* Total accessed size in a chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -1997,7 +1997,7 @@ H5D_chunk_flush(H5D_t *dset, hid_t dxpl_id)
unsigned nerrors = 0; /* Count of any errors encountered when flushing chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(dset);
@@ -2041,7 +2041,7 @@ H5D_chunk_io_term(const H5D_chunk_map_t *fm)
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_io_term)
+ FUNC_ENTER_NOAPI_NOINIT
/* Single element I/O vs. multiple element I/O cleanup */
if(fm->use_single) {
@@ -2092,7 +2092,7 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_idx_reset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(storage);
@@ -2132,7 +2132,7 @@ done:
herr_t
H5D_chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_cinfo_cache_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(last);
@@ -2161,7 +2161,7 @@ H5D_chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *uda
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_cinfo_cache_update)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(last);
@@ -2201,7 +2201,7 @@ H5D_chunk_cinfo_cache_found(const H5D_chunk_cached_t *last, H5D_chunk_ud_t *udat
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_cinfo_cache_found)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(last);
@@ -2254,7 +2254,7 @@ H5D_chunk_create(H5D_t *dset /*in,out*/, hid_t dxpl_id)
H5D_chk_idx_info_t idx_info; /* Chunked index info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(dset);
@@ -2317,7 +2317,7 @@ H5D_chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *chunk_offset,
unsigned u; /* Counter */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_lookup)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
HDassert(dset->shared->layout.u.chunk.ndims > 0);
@@ -2415,7 +2415,7 @@ H5D_chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *
hbool_t point_of_no_return = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_chunk_flush_entry, dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, FAIL)
HDassert(dset);
HDassert(dset->shared);
@@ -2608,7 +2608,7 @@ H5D_chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_cache_evict)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
HDassert(dxpl_cache);
@@ -2702,7 +2702,7 @@ H5D_chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id,
int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_cache_prune)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Preemption is accomplished by having multiple pointers (currently two)
@@ -2831,7 +2831,7 @@ H5D_chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
unsigned u; /*counters */
void *ret_value; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_lock)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(io_info);
HDassert(io_info->dxpl_cache);
@@ -3229,7 +3229,7 @@ H5D_chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
const H5D_rdcc_t *rdcc = &(io_info->dset->shared->cache.chunk);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_unlock)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(io_info);
HDassert(udata);
@@ -3336,7 +3336,7 @@ H5D_chunk_allocated_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
hsize_t *nbytes = (hsize_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_allocated_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(hsize_t *)nbytes += chunk_rec->nbytes;
@@ -3369,7 +3369,7 @@ H5D_chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes)
hsize_t chunk_bytes = 0; /* Number of bytes allocated for chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_allocated, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dset);
HDassert(dset->shared);
@@ -3471,7 +3471,7 @@ H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
hid_t data_dxpl_id; /* DXPL ID to use for raw data I/O operations */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5D_chunk_allocate, dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, dset->oloc.addr, FAIL)
/* Check args */
HDassert(dset && H5D_CHUNKED == layout->type);
@@ -3507,7 +3507,7 @@ H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
- if(IS_H5FD_MPI(dset->oloc.file)) {
+ if(H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* Get the MPI communicator */
if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator")
@@ -3924,7 +3924,7 @@ H5D_chunk_update_old_edge_chunks(H5D_t *dset, hid_t dxpl_id, hsize_t old_dim[])
hbool_t carry; /* Flag to indicate that chunk increment carrys to higher dimension (sorta) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_update_old_edge_chunks, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(dset && H5D_CHUNKED == layout->type);
@@ -4113,13 +4113,19 @@ H5D_chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
H5S_sel_iter_t chunk_iter; /* Memory selection iteration info */
hssize_t sel_nelmts; /* Number of elements in selection */
hsize_t count[H5O_LAYOUT_NDIMS]; /* Element count of hyperslab */
+ size_t chunk_size; /*size of a chunk */
void *chunk; /* The file chunk */
H5D_chunk_ud_t chk_udata; /* User data for locking chunk */
uint32_t bytes_accessed; /* Bytes accessed in chunk */
+ hbool_t chunk_iter_init = FALSE; /* Whether the chunk iterator has been initialized */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_prune_fill)
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Get the chunk's size */
+ HDassert(layout->u.chunk.size > 0);
+ H5_ASSIGN_OVERFLOW(chunk_size, layout->u.chunk.size, uint32_t, size_t);
/* Get the info for the chunk in the file */
if(H5D_chunk_lookup(dset, io_info->dxpl_id, chunk_offset,
@@ -4138,7 +4144,7 @@ H5D_chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
if(H5D_fill_init(&udata->fb_info, NULL, NULL, NULL, NULL, NULL,
&dset->shared->dcpl_cache.fill,
dset->shared->type, dset->shared->type_id, (size_t)udata->elmts_per_chunk,
- io_info->dxpl_cache->max_temp_buf, io_info->dxpl_id) < 0)
+ chunk_size, io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
udata->fb_info_init = TRUE;
} /* end if */
@@ -4182,16 +4188,11 @@ H5D_chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
/* Create a selection iterator for scattering the elements to memory buffer */
if(H5S_select_iter_init(&chunk_iter, udata->chunk_space, layout->u.chunk.dim[rank]) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunk selection information")
+ chunk_iter_init = TRUE;
/* Scatter the data into memory */
- if(H5D_scatter_mem(udata->fb_info.fill_buf, udata->chunk_space, &chunk_iter, (size_t)sel_nelmts, io_info->dxpl_cache, chunk/*out*/) < 0) {
- H5S_SELECT_ITER_RELEASE(&chunk_iter);
+ if(H5D_scatter_mem(udata->fb_info.fill_buf, udata->chunk_space, &chunk_iter, (size_t)sel_nelmts, io_info->dxpl_cache, chunk/*out*/) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed")
- } /* end if */
-
- /* Release the selection iterator */
- if(H5S_SELECT_ITER_RELEASE(&chunk_iter) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
/* The number of bytes accessed in the chunk */
@@ -4204,6 +4205,10 @@ H5D_chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk")
done:
+ /* Release the selection iterator */
+ if(chunk_iter_init && H5S_SELECT_ITER_RELEASE(&chunk_iter) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D_chunk_prune_fill */
@@ -4346,7 +4351,7 @@ H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_prune_by_extent, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(dset && H5D_CHUNKED == layout->type);
@@ -4701,7 +4706,7 @@ H5D_chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
hsize_t chunk_index;
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_addrmap_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Compute the index for this chunk */
if(H5V_chunk_index(rank, chunk_rec->offset, udata->common.layout->dim, udata->common.layout->down_chunks, &chunk_index) < 0)
@@ -4736,7 +4741,7 @@ H5D_chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
H5D_chunk_it_ud2_t udata; /* User data for iteration callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_addrmap, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dset);
HDassert(dset->shared);
@@ -4800,7 +4805,7 @@ H5D_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_storage_t *storage)
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -4890,7 +4895,7 @@ H5D_chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
unsigned rank; /*current # of dimensions */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_update_cache, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(dset && H5D_CHUNKED == dset->shared->layout.type);
@@ -5025,7 +5030,7 @@ H5D_chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_copy_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get 'size_t' local value for number of bytes in chunk */
H5_ASSIGN_OVERFLOW(nbytes, chunk_rec->nbytes, uint32_t, size_t);
@@ -5232,7 +5237,7 @@ H5D_chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
hbool_t copy_setup_done = FALSE; /* Indicate that 'copy setup' is done */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f_src);
@@ -5490,7 +5495,7 @@ H5D_chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
H5D_chk_idx_info_t idx_info; /* Chunked index info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_bh_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -5545,7 +5550,7 @@ H5D_chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
{
H5D_chunk_it_ud4_t *udata = (H5D_chunk_it_ud4_t *)_udata; /* User data from caller */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_dump_index_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(udata->stream) {
unsigned u; /* Local index variable */
@@ -5589,7 +5594,7 @@ H5D_chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_dump_index, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dset);
@@ -5659,7 +5664,7 @@ H5D_chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset)
int nerrors = 0; /* Accumulated count of errors */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5D_chunk_dest, dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, dset->oloc.addr, FAIL)
HDassert(f);
HDassert(dset);
@@ -5734,7 +5739,7 @@ H5D_chunk_stats(const H5D_t *dset, hbool_t headers)
char ascii[32];
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_stats, FAIL)
+ FUNC_ENTER_NOAPI_NOERR(FAIL)
if (!H5DEBUG(AC))
HGOTO_DONE(SUCCEED)
@@ -5802,7 +5807,7 @@ H5D_nonexistent_readvv_cb(hsize_t UNUSED dst_off, hsize_t src_off, size_t len,
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_nonexistent_readvv_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the fill value buffer */
if(H5D_fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL,
@@ -5852,7 +5857,7 @@ H5D_nonexistent_readvv(const H5D_io_info_t *io_info,
H5D_chunk_readvv_ud_t udata; /* User data for H5V_opvv() operator */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_nonexistent_readvv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(io_info);
@@ -5901,7 +5906,7 @@ H5D_chunk_is_partial_edge_chunk(const hsize_t offset[], const H5D_t *dset,
unsigned i; /* Local index variables */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_is_partial_edge_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(offset);
@@ -5958,7 +5963,7 @@ H5D_chunk_find_flush_dep(const H5D_rdcc_t *rdcc,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_find_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rdcc);
@@ -6027,7 +6032,7 @@ H5D_chunk_create_flush_dep(const H5D_rdcc_t *rdcc,
H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_create_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rdcc);
@@ -6071,7 +6076,7 @@ H5D_chunk_update_flush_dep(const H5D_rdcc_t *rdcc,
H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_update_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rdcc);
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 1e9c7ea..a2682d8 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -123,7 +123,7 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_compact_fill, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
@@ -180,7 +180,7 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_compact_construct)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -234,7 +234,7 @@ done:
static hbool_t
H5D_compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_compact_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(storage);
@@ -261,7 +261,7 @@ H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
H5D_chunk_map_t UNUSED *cm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_compact_io_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
@@ -295,7 +295,7 @@ H5D_compact_readvv(const H5D_io_info_t *io_info,
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_compact_readvv)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(io_info);
@@ -336,7 +336,7 @@ H5D_compact_writevv(const H5D_io_info_t *io_info,
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_compact_writevv)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(io_info);
@@ -369,7 +369,7 @@ H5D_compact_flush(H5D_t *dset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_compact_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(dset);
@@ -419,7 +419,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
hid_t buf_sid = -1; /* ID for buffer dataspace */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_compact_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f_src);
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 9a6e08f..674582d 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -164,7 +164,7 @@ H5D_contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_alloc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -213,7 +213,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
hid_t my_dxpl_id; /* DXPL ID to use for this operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_fill, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
@@ -225,7 +225,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
#ifdef H5_HAVE_PARALLEL
/* Retrieve MPI parameters */
- if(IS_H5FD_MPI(dset->oloc.file)) {
+ if(H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) {
/* Get the MPI communicator */
if(MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file)))
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator")
@@ -360,7 +360,7 @@ H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -390,7 +390,7 @@ done:
haddr_t
H5D_contig_get_addr(const H5D_t *dset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5D_contig_get_addr)
+ FUNC_ENTER_NOAPI_NOERR
/* check args */
HDassert(dset);
@@ -426,7 +426,7 @@ H5D_contig_construct(H5F_t *f, H5D_t *dset)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_construct)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -489,7 +489,7 @@ H5D_contig_is_space_alloc(const H5O_storage_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_contig_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(storage);
@@ -518,7 +518,7 @@ H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *t
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
H5D_chunk_map_t UNUSED *cm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_contig_io_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
io_info->store->contig.dset_addr = io_info->dset->shared->layout.storage.u.contig.addr;
io_info->store->contig.dset_size = io_info->dset->shared->layout.storage.u.contig.size;
@@ -546,7 +546,7 @@ H5D_contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -583,7 +583,7 @@ H5D_contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -626,7 +626,7 @@ H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
size_t mem_curr_seq = 0; /* "Current sequence" in memory */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_write_one)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(io_info);
@@ -668,7 +668,7 @@ H5D_contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
hsize_t max_data; /* Actual maximum size of data to cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv_sieve_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Stash local copies of these value */
if(dset_contig->sieve_buf != NULL) {
@@ -824,7 +824,7 @@ H5D_contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
H5D_contig_readvv_ud_t *udata = (H5D_contig_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Write data */
if(H5F_block_read(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off),
@@ -861,7 +861,7 @@ H5D_contig_readvv(const H5D_io_info_t *io_info,
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_readvv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(io_info);
@@ -939,7 +939,7 @@ H5D_contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
hsize_t max_data; /* Actual maximum size of data to cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv_sieve_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Stash local copies of these values */
if(dset_contig->sieve_buf != NULL) {
@@ -1145,7 +1145,7 @@ H5D_contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata
H5D_contig_writevv_ud_t *udata = (H5D_contig_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Write data */
if(H5F_block_write(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id, (udata->wbuf + src_off)) < 0)
@@ -1181,7 +1181,7 @@ H5D_contig_writevv(const H5D_io_info_t *io_info,
{
ssize_t ret_value; /* Return value (Size of sequence in bytes) */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_writevv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(io_info);
@@ -1247,7 +1247,7 @@ H5D_contig_flush(H5D_t *dset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_contig_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(dset);
@@ -1306,7 +1306,7 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f_src);
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index fa4c54c..9b27c9c 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -77,7 +77,7 @@ DESCRIPTION
static herr_t
H5D_init_dbg_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_init_dbg_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D_init_dbg_interface() */
@@ -104,7 +104,7 @@ H5Ddebug(hid_t dset_id)
H5D_t *dset; /* Dataset to debug */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Ddebug, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", dset_id);
/* Check args */
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index b31f23b..7e65149 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -101,7 +101,7 @@ DESCRIPTION
static herr_t
H5D_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5D_init())
} /* H5D_init_deprec_interface() */
@@ -146,7 +146,7 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
const H5S_t *space; /* Dataspace for dataset */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Dcreate1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*siii", loc_id, name, type_id, space_id, dcpl_id);
/* Check arguments */
@@ -165,7 +165,7 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
/* Build and open the new dataset */
- if(NULL == (dset = H5D_create_named(&loc, name, type_id, space, H5P_LINK_CREATE_DEFAULT, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
+ if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, H5P_LINK_CREATE_DEFAULT, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
/* Register the new dataset to get an ID for it */
@@ -212,7 +212,7 @@ H5Dopen1(hid_t loc_id, const char *name)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
- FUNC_ENTER_API(H5Dopen1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
@@ -283,7 +283,7 @@ H5Dextend(hid_t dset_id, const hsize_t size[])
H5D_t *dset;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dextend, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
@@ -323,7 +323,7 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_extend)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(dataset);
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index ba965a0..72e07e0 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -229,7 +229,7 @@ H5D_earray_crt_context(void *_udata)
H5D_earray_ctx_ud_t *udata = (H5D_earray_ctx_ud_t *)_udata; /* User data for extensible array context */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(udata);
@@ -276,7 +276,7 @@ H5D_earray_dst_context(void *_ctx)
{
H5D_earray_ctx_t *ctx = (H5D_earray_ctx_t *)_ctx; /* Extensible array callback context */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(ctx);
@@ -306,7 +306,7 @@ H5D_earray_fill(void *nat_blk, size_t nelmts)
{
haddr_t fill_val = H5D_EARRAY_FILL; /* Value to fill elements with */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -337,7 +337,7 @@ H5D_earray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
H5D_earray_ctx_t *ctx = (H5D_earray_ctx_t *)_ctx; /* Extensible array callback context */
const haddr_t *elmt = (const haddr_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -382,7 +382,7 @@ H5D_earray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
haddr_t *elmt = (haddr_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -425,7 +425,7 @@ H5D_earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(stream);
@@ -458,7 +458,7 @@ H5D_earray_filt_fill(void *nat_blk, size_t nelmts)
{
H5D_earray_filt_elmt_t fill_val = H5D_EARRAY_FILT_FILL; /* Value to fill elements with */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_filt_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -491,7 +491,7 @@ H5D_earray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx)
uint8_t *raw = (uint8_t *)_raw; /* Convenience pointer to raw elements */
const H5D_earray_filt_elmt_t *elmt = (const H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_filt_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -538,7 +538,7 @@ H5D_earray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
H5D_earray_filt_elmt_t *elmt = (H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_filt_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -584,7 +584,7 @@ H5D_earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
const H5D_earray_filt_elmt_t *elmt = (const H5D_earray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_filt_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(stream);
@@ -621,7 +621,7 @@ H5D_earray_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr)
H5O_layout_t layout; /* Layout message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(H5F_addr_defined(obj_addr));
@@ -691,7 +691,7 @@ H5D_earray_dst_dbg_context(void *_dbg_ctx)
{
H5D_earray_ctx_ud_t *dbg_ctx = (H5D_earray_ctx_ud_t *)_dbg_ctx; /* Context for extensible array callback */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_dst_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dbg_ctx);
@@ -723,7 +723,7 @@ H5D_earray_idx_depend(const H5D_chk_idx_info_t *idx_info)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_depend)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -780,7 +780,7 @@ H5D_earray_idx_undepend(const H5D_chk_idx_info_t *idx_info)
H5O_t *oh = NULL; /* Dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_undepend)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -840,7 +840,7 @@ H5D_earray_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_earray_ctx_ud_t udata; /* User data for extensible array open call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -895,7 +895,7 @@ H5D_earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -965,7 +965,7 @@ H5D_earray_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_earray_ctx_ud_t udata; /* User data for extensible array create call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1045,7 +1045,7 @@ H5D_earray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_idx_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -1077,7 +1077,7 @@ H5D_earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1243,7 +1243,7 @@ H5D_earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_get_addr)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1328,7 +1328,7 @@ H5D_earray_idx_resize(H5O_layout_chunk_t *layout)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_resize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(layout);
@@ -1375,7 +1375,7 @@ H5D_earray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5EA_stat_t ea_stat; /* Extensible array statistics */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1484,7 +1484,7 @@ H5D_earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_remove)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1591,7 +1591,7 @@ H5D_earray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5D_earray_ud_t *udata = (H5D_earray_ud_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_delete_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(chunk_rec);
@@ -1633,7 +1633,7 @@ H5D_earray_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(idx_info);
@@ -1695,7 +1695,7 @@ H5D_earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_copy_setup)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info_src);
@@ -1751,7 +1751,7 @@ H5D_earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_copy_shutdown)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(storage_src);
@@ -1792,7 +1792,7 @@ H5D_earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5EA_stat_t ea_stat; /* Extensible array statistics */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_earray_idx_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1848,7 +1848,7 @@ done:
static herr_t
H5D_earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_idx_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -1885,7 +1885,7 @@ H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info,
hsize_t idx; /* Array index of chunk */
herr_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_support)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1955,7 +1955,7 @@ H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info,
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_unsupport)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -2019,7 +2019,7 @@ done:
static herr_t
H5D_earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_idx_dump)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -2048,7 +2048,7 @@ H5D_earray_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Defl.c b/src/H5Defl.c
index bcb47a2..51e8813 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -136,7 +136,7 @@ H5D_efl_construct(H5F_t *f, H5D_t *dset)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_construct)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -200,7 +200,7 @@ done:
hbool_t
H5D_efl_is_space_alloc(const H5O_storage_t UNUSED *storage)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_efl_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(storage);
@@ -227,7 +227,7 @@ H5D_efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
H5D_chunk_map_t UNUSED *cm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_efl_io_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDmemcpy(&io_info->store->efl, &(io_info->dset->shared->dcpl_cache.efl), sizeof(H5O_efl_t));
@@ -267,7 +267,7 @@ H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(efl && efl->nused>0);
@@ -353,7 +353,7 @@ H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *bu
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(efl && efl->nused > 0);
@@ -428,7 +428,7 @@ H5D_efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_readvv_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Read data */
if(H5D_efl_read(udata->efl, dst_off, len, (udata->rbuf + src_off)) < 0)
@@ -462,7 +462,7 @@ H5D_efl_readvv(const H5D_io_info_t *io_info,
H5D_efl_readvv_ud_t udata; /* User data for H5V_opvv() operator */
ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_readvv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(io_info);
@@ -508,7 +508,7 @@ H5D_efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_writevv_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Write data */
if(H5D_efl_write(udata->efl, dst_off, len, (udata->wbuf + src_off)) < 0)
@@ -542,7 +542,7 @@ H5D_efl_writevv(const H5D_io_info_t *io_info,
H5D_efl_writevv_ud_t udata; /* User data for H5V_opvv() operator */
ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_NOAPI_NOINIT(H5D_efl_writevv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(io_info);
@@ -587,7 +587,7 @@ H5D_efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_efl_bh_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 196fc43..7786a76 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -239,7 +239,7 @@ H5D_farray_crt_context(void *_udata)
H5D_farray_ctx_ud_t *udata = (H5D_farray_ctx_ud_t *)_udata; /* User data for fixed array context */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(udata);
@@ -286,7 +286,7 @@ H5D_farray_dst_context(void *_ctx)
{
H5D_farray_ctx_t *ctx = (H5D_farray_ctx_t *)_ctx; /* Fixed array callback context */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(ctx);
@@ -316,7 +316,7 @@ H5D_farray_fill(void *nat_blk, size_t nelmts)
{
haddr_t fill_val = H5D_FARRAY_FILL; /* Value to fill elements with */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -347,7 +347,7 @@ H5D_farray_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)
H5D_farray_ctx_t *ctx = (H5D_farray_ctx_t *)_ctx; /* Fixed array callback context */
const haddr_t *elmt = (const haddr_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -392,7 +392,7 @@ H5D_farray_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
haddr_t *elmt = (haddr_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -435,7 +435,7 @@ H5D_farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
{
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(stream);
@@ -473,7 +473,7 @@ H5D_farray_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr)
H5O_layout_t layout; /* Layout message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(H5F_addr_defined(obj_addr));
@@ -544,7 +544,7 @@ H5D_farray_dst_dbg_context(void *_dbg_ctx)
{
H5D_farray_ctx_ud_t *dbg_ctx = (H5D_farray_ctx_ud_t *)_dbg_ctx; /* Context for fixed array callback */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_dst_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dbg_ctx);
@@ -573,7 +573,7 @@ H5D_farray_filt_fill(void *nat_blk, size_t nelmts)
{
H5D_farray_filt_elmt_t fill_val = H5D_FARRAY_FILT_FILL; /* Value to fill elements with */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_filt_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(nat_blk);
@@ -606,7 +606,7 @@ H5D_farray_filt_encode(void *_raw, const void *_elmt, size_t nelmts, void *_ctx)
uint8_t *raw = (uint8_t *)_raw; /* Convenience pointer to raw elements */
const H5D_farray_filt_elmt_t *elmt = (const H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_filt_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -653,7 +653,7 @@ H5D_farray_filt_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)
H5D_farray_filt_elmt_t *elmt = (H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_filt_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(raw);
@@ -699,7 +699,7 @@ H5D_farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx,
const H5D_farray_filt_elmt_t *elmt = (const H5D_farray_filt_elmt_t *)_elmt; /* Convenience pointer to native elements */
char temp_str[128]; /* Temporary string, for formatting */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_filt_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(stream);
@@ -734,7 +734,7 @@ H5D_farray_idx_open(const H5D_chk_idx_info_t *idx_info)
H5D_farray_ctx_ud_t udata; /* User data for fixed array open call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -790,7 +790,7 @@ H5D_farray_idx_create(const H5D_chk_idx_info_t *idx_info)
H5D_farray_ctx_ud_t udata; /* User data for fixed array create call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -858,7 +858,7 @@ H5D_farray_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_idx_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -895,7 +895,7 @@ H5D_farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1046,7 +1046,7 @@ H5D_farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_get_addr)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1123,7 +1123,7 @@ H5D_farray_idx_iterate_cb(hsize_t UNUSED idx, const void *_elmt, void *_udata)
int curr_dim; /* Current dimension */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_iterate_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Compose generic chunk record for callback */
if(udata->filtered) {
@@ -1187,7 +1187,7 @@ H5D_farray_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5FA_stat_t fa_stat; /* Fixed array statistics */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1265,7 +1265,7 @@ H5D_farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_remove)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1355,7 +1355,7 @@ H5D_farray_idx_delete_cb(hsize_t UNUSED idx, const void *_elmt, void *_udata)
uint32_t nbytes; /* Size of chunk */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_delete_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(_elmt);
@@ -1403,7 +1403,7 @@ H5D_farray_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(idx_info);
@@ -1487,7 +1487,7 @@ H5D_farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_copy_setup)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info_src);
@@ -1543,7 +1543,7 @@ H5D_farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_copy_shutdown)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(storage_src);
@@ -1584,7 +1584,7 @@ H5D_farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
H5FA_stat_t fa_stat; /* Fixed array statistics */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_farray_idx_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -1635,7 +1635,7 @@ done:
static herr_t
H5D_farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_idx_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -1664,7 +1664,7 @@ H5D_farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D_farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_farray_idx_dump)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -1693,7 +1693,7 @@ H5D_farray_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_farray_idx_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index a80dd83..c0a9766 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -117,7 +117,7 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_
H5T_t *buf_type; /* Buffer datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dfill, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xi*xii", fill, fill_type_id, buf, buf_type_id, space_id);
/* Check args */
@@ -181,7 +181,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
size_t dst_type_size; /* Size of destination type*/
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_fill)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(fill_type);
@@ -370,7 +370,7 @@ H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_fill_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(fb_info);
@@ -566,7 +566,7 @@ H5D_fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
herr_t ret_value = SUCCEED; /* Return value */
void * buf = NULL; /* Temporary fill buffer */
- FUNC_ENTER_NOAPI(H5D_fill_refill_vl, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(fb_info);
@@ -644,7 +644,7 @@ done:
herr_t
H5D_fill_release(H5D_fill_buf_info_t *fb_info)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5D_fill_release)
+ FUNC_ENTER_NOAPI_NOERR
/* Check args */
HDassert(fb_info);
@@ -682,7 +682,7 @@ H5D_fill_release(H5D_fill_buf_info_t *fb_info)
herr_t
H5D_fill_term(H5D_fill_buf_info_t *fb_info)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5D_fill_term)
+ FUNC_ENTER_NOAPI_NOERR
/* Check args */
HDassert(fb_info);
diff --git a/src/H5Dint.c b/src/H5Dint.c
index a4f5c8d..584626c 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -129,7 +129,7 @@ H5D_init(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -158,7 +158,7 @@ H5D_init_interface(void)
H5P_genplist_t *def_dcpl; /* Default Dataset Creation Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the dataset IDs */
if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS, (H5I_free_t)H5D_close)<H5I_FILE)
@@ -217,7 +217,7 @@ H5D_term_interface(void)
{
int n=0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
if((n=H5I_nmembers(H5I_DATASET))>0) {
@@ -279,7 +279,7 @@ H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
H5P_genplist_t *dx_plist; /* Data transfer property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_get_dxpl_cache_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(cache);
@@ -364,7 +364,7 @@ H5D_get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_get_dxpl_cache,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(cache);
@@ -382,7 +382,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_create_named
+ * Function: H5D__create_named
*
* Purpose: Internal routine to create a new dataset.
*
@@ -396,7 +396,7 @@ done:
*-------------------------------------------------------------------------
*/
H5D_t *
-H5D_create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
+H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id,
hid_t dxpl_id)
{
@@ -404,7 +404,7 @@ H5D_create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
H5D_obj_create_t dcrt_info; /* Information for dataset creation */
H5D_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5D_create_named, NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -437,7 +437,7 @@ H5D_create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_create_named() */
+} /* end H5D__create_named() */
/*-------------------------------------------------------------------------
@@ -465,7 +465,7 @@ H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
hsize_t full_size; /* The number of bytes in the dataset when fully populated */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_get_space_status)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
@@ -530,7 +530,7 @@ H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
H5P_genplist_t *plist; /* Property list created */
H5D_shared_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_new)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate new shared dataset structure */
if(NULL == (new_dset = H5FL_MALLOC(H5D_shared_t)))
@@ -592,7 +592,7 @@ H5D_init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_init_type)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(file);
@@ -664,7 +664,7 @@ H5D_init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_init_space)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(file);
@@ -710,7 +710,7 @@ H5D_swmr_setup(const H5D_t *dataset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_swmr_setup)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(dataset);
@@ -768,7 +768,7 @@ H5D_swmr_teardown(const H5D_t *dataset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_swmr_teardown)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(dataset);
@@ -819,7 +819,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_update_oh_info)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(file);
@@ -1018,7 +1018,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
H5G_loc_t dset_loc; /* Dataset location */
H5D_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5D_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(file);
@@ -1107,7 +1107,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "compact dataset must have early space allocation")
/* If MPI VFD is used, no filter support yet. */
- if(IS_H5FD_MPI(file) && pline->nused > 0)
+ if(H5F_HAS_FEATURE(file, H5FD_FEAT_HAS_MPI) && pline->nused > 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, NULL, "Parallel I/O does not support filters yet")
/* Get the dataset's external file list information */
@@ -1136,7 +1136,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
} /* end if */
/* Check if this dataset is going into a parallel file and set space allocation time */
- if(IS_H5FD_MPI(file))
+ if(H5F_HAS_FEATURE(file, H5FD_FEAT_ALLOCATE_EARLY))
new_dset->shared->dcpl_cache.fill.alloc_time = H5D_ALLOC_TIME_EARLY;
/* Set the dataset's I/O operations */
@@ -1219,7 +1219,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
H5D_t *dataset = NULL;
H5D_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5D_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(loc);
@@ -1318,7 +1318,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
htri_t msg_exists; /* Whether a particular type of message exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_open_oid, dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset);
@@ -1418,7 +1418,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
*/
if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR)
&& !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
- && IS_H5FD_MPI(dataset->oloc.file)) {
+ && H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_ALLOCATE_EARLY)) {
if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage")
} /* end if */
@@ -1471,7 +1471,7 @@ H5D_close(H5D_t *dataset)
unsigned free_failed = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(dataset && dataset->oloc.file && dataset->shared);
@@ -1579,9 +1579,14 @@ H5D_close(H5D_t *dataset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
/* Check reference count for this object in the top file */
- if(H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0)
+ if(H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) {
if(H5O_close(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to close")
+ } /* end if */
+ else
+ /* Free object location (i.e. "unhold" the file if appropriate) */
+ if(H5O_loc_free(&(dataset->oloc)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
} /* end else */
/* Release the dataset's path info */
@@ -1616,8 +1621,8 @@ done:
H5O_loc_t *
H5D_oloc(H5D_t *dataset)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_oloc)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(dataset ? &(dataset->oloc) : (H5O_loc_t *)NULL)
} /* end H5D_oloc() */
@@ -1639,8 +1644,8 @@ H5D_oloc(H5D_t *dataset)
H5G_name_t *
H5D_nameof(H5D_t *dataset)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_nameof)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(dataset ? &(dataset->path) : (H5G_name_t *)NULL)
} /* end H5D_nameof() */
@@ -1663,8 +1668,8 @@ H5D_nameof(H5D_t *dataset)
H5T_t *
H5D_typeof(const H5D_t *dset)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_typeof)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dset);
HDassert(dset->shared);
@@ -1696,7 +1701,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
hbool_t addr_set = FALSE; /* Flag to indicate that the dataset's storage address was set */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_alloc_storage)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(dset);
@@ -1713,15 +1718,20 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
switch(layout->type) {
case H5D_CONTIGUOUS:
if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
- /* Reserve space in the file for the entire array */
- if(H5D_contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
+ /* Check if we have a zero-sized dataset */
+ if(layout->storage.u.contig.size > 0) {
+ /* Reserve space in the file for the entire array */
+ if(H5D_contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
+
+ /* Indicate that we should initialize storage space */
+ must_init_space = TRUE;
+ } /* end if */
+ else
+ layout->storage.u.contig.addr = HADDR_UNDEF;
/* Indicate that we set the storage addr */
addr_set = TRUE;
-
- /* Indicate that we should initialize storage space */
- must_init_space = TRUE;
} /* end if */
break;
@@ -1850,7 +1860,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_init_storage)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
@@ -1923,7 +1933,7 @@ H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id)
{
hsize_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_get_storage_size, dxpl_id, dset->oloc.addr, 0)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, 0)
switch(dset->shared->layout.type) {
case H5D_CHUNKED:
@@ -1978,7 +1988,7 @@ H5D_get_offset(const H5D_t *dset)
{
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_NOAPI_NOINIT(H5D_get_offset)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
@@ -2026,7 +2036,7 @@ H5D_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op,
{
herr_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_iterate)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(buf);
@@ -2063,7 +2073,7 @@ H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, void *buf)
H5T_vlen_alloc_info_t *vl_alloc_info = &_vl_alloc_info; /* VL allocation info */
herr_t ret_value;
- FUNC_ENTER_NOAPI(H5D_vlen_reclaim, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -2104,7 +2114,7 @@ H5D_vlen_get_buf_size_alloc(size_t size, void *info)
H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)info;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_vlen_get_buf_size_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get a temporary pointer to space for the VL data */
if((vlen_bufsize->vl_tbuf = H5FL_BLK_REALLOC(vlen_vl_buf, vlen_bufsize->vl_tbuf, size)) != NULL)
@@ -2150,7 +2160,7 @@ H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, co
H5T_t *dt; /* Datatype for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_vlen_get_buf_size)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(op_data);
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -2194,7 +2204,7 @@ H5D_check_filters(H5D_t *dataset)
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_check_filters)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(dataset);
@@ -2252,7 +2262,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
htri_t changed; /* Whether the dataspace changed size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_set_extent, dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, FAIL)
/* Check args */
HDassert(dset);
@@ -2365,7 +2375,7 @@ H5D_flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_flush_sieve_buf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(dataset);
@@ -2407,7 +2417,7 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id)
H5O_t *oh = NULL; /* Pointer to dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_flush_real, dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* Check args */
HDassert(dataset);
@@ -2477,7 +2487,7 @@ H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_mark)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(dataset);
@@ -2489,7 +2499,6 @@ H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
if(flags & H5D_MARK_LAYOUT)
dataset->shared->layout_dirty = TRUE;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_mark() */
@@ -2514,7 +2523,7 @@ H5D_flush_cb(void *_dataset, hid_t UNUSED id, void *_udata)
H5D_flush_ud_t *udata = (H5D_flush_ud_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_flush_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(dataset);
@@ -2550,7 +2559,7 @@ H5D_flush(const H5F_t *f, hid_t dxpl_id)
H5D_flush_ud_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
diff --git a/src/H5Dio.c b/src/H5Dio.c
index b7c2ecb..248ea9e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -127,7 +127,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
char fake_char;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dread, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id,
plist_id, buf);
@@ -219,7 +219,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
char fake_char;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Dwrite, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id,
dxpl_id, buf);
@@ -315,7 +315,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_read, dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset && dataset->oloc.file);
@@ -339,7 +339,8 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
#ifdef H5_HAVE_PARALLEL
/* Collective access is not permissible without a MPI based VFD */
- if(dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE && !IS_H5FD_MPI(dataset->oloc.file))
+ if(dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE &&
+ !(H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based drivers only")
#endif /*H5_HAVE_PARALLEL*/
@@ -515,7 +516,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_write, dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset && dataset->oloc.file);
@@ -543,7 +544,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Various MPI based checks */
#ifdef H5_HAVE_PARALLEL
- if(IS_H5FD_MPI(dataset->oloc.file)) {
+ if H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_HAS_MPI) {
/* If MPI based VFD is used, no VL datatype support yet. */
/* This is because they use the global heap in the file and we don't */
/* support parallel access of that yet */
@@ -602,7 +603,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
HDassert(projected_mem_space);
HDassert(adj_buf);
-
+
/* Switch to using projected memory dataspace & adjusted buffer */
mem_space = projected_mem_space;
buf = adj_buf;
@@ -727,7 +728,7 @@ static herr_t
H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
const H5D_type_info_t *type_info, H5D_storage_t *store, H5D_io_info_t *io_info)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_ioinfo_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(dset);
@@ -768,7 +769,7 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
#ifdef H5_HAVE_PARALLEL
/* Determine if the file was opened with an MPI VFD */
- io_info->using_mpi_vfd = IS_H5FD_MPI(dset->oloc.file);
+ io_info->using_mpi_vfd = H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI);
#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -797,7 +798,7 @@ H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
const H5T_t *dst_type; /* Destination datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_typeinfo_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(type_info);
@@ -949,9 +950,12 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
const H5S_t *file_space, const H5S_t *mem_space,
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm)
{
+ H5P_genplist_t *dx_plist; /* Data transer property list */
+ H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode; /* performed chunk optimization */
+ H5D_mpio_actual_io_mode_t actual_io_mode; /* performed io mode */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_ioinfo_adjust)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(dset);
@@ -962,6 +966,20 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
HDassert(type_info->tpath);
HDassert(io_info);
+ /* Get the dataset transfer property list */
+ if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
+
+ /* Reset the actual io mode properties to the default values in case
+ * the dxpl was previously used in a collective I/O operation.
+ */
+ actual_chunk_opt_mode = H5D_MPIO_NO_CHUNK_OPTIMIZATION;
+ actual_io_mode = H5D_MPIO_NO_COLLECTIVE;
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
+
/* Make any parallel I/O adjustments */
if(io_info->using_mpi_vfd) {
htri_t opt; /* Flag whether a selection is optimizable */
@@ -994,12 +1012,6 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
* mark it so that we remember to revert the change.
*/
if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE) {
- H5P_genplist_t *dx_plist; /* Data transer property list */
-
- /* Get the dataset transfer property list */
- if(NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
-
/* Change the xfer_mode to independent for handling the I/O */
io_info->dxpl_cache->xfer_mode = H5FD_MPIO_INDEPENDENT;
if(H5P_set(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &io_info->dxpl_cache->xfer_mode) < 0)
@@ -1031,7 +1043,7 @@ H5D_ioinfo_term(H5D_io_info_t *io_info)
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_ioinfo_term)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if we used the MPI VFD for the I/O */
if(io_info->using_mpi_vfd) {
@@ -1084,7 +1096,7 @@ done:
static herr_t
H5D_typeinfo_term(const H5D_type_info_t *type_info)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_typeinfo_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check for releasing datatype conversion & background buffers */
if(type_info->tconv_buf_allocated) {
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 10fc9c9..c217283 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -78,7 +78,7 @@ H5D_layout_set_io_ops(const H5D_t *dataset)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_layout_set_io_ops, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(dataset);
@@ -158,7 +158,7 @@ H5D_layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include
{
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5D_layout_meta_size)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -273,7 +273,7 @@ H5D_layout_set_latest_version(H5O_layout_t *layout, const H5S_t *space,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_layout_set_latest_version, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(layout);
@@ -313,7 +313,7 @@ H5D_layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
unsigned ndims; /* Rank of dataspace */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_layout_set_latest_indexing, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(layout);
@@ -428,7 +428,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5D_layout_oh_create, dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, FAIL)
/* Sanity checking */
HDassert(file);
@@ -564,7 +564,7 @@ H5D_layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
htri_t msg_exists; /* Whether a particular type of message exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_layout_oh_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(dataset);
@@ -704,7 +704,7 @@ H5D_layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_fl
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_layout_oh_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checking */
HDassert(dataset);
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index c32536f..03a9a76 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -17,33 +17,33 @@
* Programmer: rky 980813
* KY 2005 revised the code and made the change to support and optimize
* collective IO support.
- * Purpose: Functions to read/write directly between app buffer and file.
+ * Purpose: Functions to read/write directly between app buffer and file.
*
- * Beware of the ifdef'ed print statements.
- * I didn't make them portable.
+ * Beware of the ifdef'ed print statements.
+ * I didn't make them portable.
*/
/****************/
/* Module Setup */
/****************/
-#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+#define H5D_PACKAGE /* suppress error about including H5Dpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Oprivate.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Sprivate.h" /* Dataspaces */
-#include "H5Vprivate.h" /* Vector */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Sprivate.h" /* Dataspaces */
+#include "H5Vprivate.h" /* Vector */
#ifdef H5_HAVE_PARALLEL
@@ -107,20 +107,16 @@ static herr_t H5D_multi_chunk_collective_io(H5D_io_info_t *io_info,
H5P_genplist_t *dx_plist);
static herr_t H5D_multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist);
-#ifdef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
static herr_t H5D_link_chunk_collective_io(H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int sum_chunk);
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
static herr_t H5D_inter_collective_io(H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, const H5S_t *file_space,
const H5S_t *mem_space);
static herr_t H5D_final_collective_io(H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts, MPI_Datatype *mpi_file_type,
MPI_Datatype *mpi_buf_type);
-#ifdef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
static herr_t H5D_sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
H5D_chunk_addr_info_t chunk_addr_info_array[], int many_chunk_opt);
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
static herr_t H5D_obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm,
H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[]);
static herr_t H5D_ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
@@ -145,15 +141,15 @@ static herr_t H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info,
/*-------------------------------------------------------------------------
- * Function: H5D_mpio_opt_possible
+ * Function: H5D_mpio_opt_possible
*
- * Purpose: Checks if an direct I/O transfer is possible between memory and
+ * Purpose: Checks if an direct I/O transfer is possible between memory and
* the file.
*
- * Return: Success: Non-negative: TRUE or FALSE
- * Failure: Negative
+ * Return: Sauccess: Non-negative: TRUE or FALSE
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, April 3, 2002
*
*-------------------------------------------------------------------------
@@ -168,7 +164,7 @@ H5D_mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
int mpi_code; /* MPI error code */
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI(H5D_mpio_opt_possible, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(io_info);
@@ -225,19 +221,8 @@ H5D_mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
* storage. For contiguous storage, mem_space and file_space won't change
* when it it is doing disk IO. For chunking storage, mem_space will
* change for different chunks. So for chunking storage, whether we can
- * use collective IO will defer until each chunk IO is reached. For
- * contiguous storage, if we find MPI-IO cannot support complicated MPI
- * derived data type and the shape of data space is not regular, we will
- * set use_par_opt_io = FALSE.
+ * use collective IO will defer until each chunk IO is reached.
*/
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- if(io_info->dset->shared->layout.type == H5D_CONTIGUOUS)
- if((H5S_SELECT_IS_REGULAR(file_space) != TRUE) ||
- (H5S_SELECT_IS_REGULAR(mem_space) != TRUE)) {
- local_opinion = FALSE;
- goto broadcast;
- } /* end if */
-#endif
/* Don't allow collective operations if filters need to be applied */
if(io_info->dset->shared->layout.type == H5D_CHUNKED) {
@@ -245,24 +230,6 @@ H5D_mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
local_opinion = FALSE;
goto broadcast;
} /* end if */
-
-/* If H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS and H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- * are defined, the HDF5 library will do collective IO if the application
- * asks for it.
- *
- * If H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS is not defined and one or more
- * processes are not participating in the IO, then collective IO is not
- * assured. The library will check each process for the number of chunks
- * it involves. If any process involves zero chunks, the library will use
- * independent IO mode instead.
- */
-#ifndef H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS
- /* Check the number of chunks to perform I/O on */
- if(0 == H5SL_count(fm->sel_chunks)) {
- local_opinion = FALSE;
- goto broadcast;
- } /* end if */
-#endif /* H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS */
} /* end if */
broadcast:
@@ -280,11 +247,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_mpio_select_read
+ * Function: H5D_mpio_select_read
*
- * Purpose: MPI-IO function to read directly from app buffer to file.
+ * Purpose: MPI-IO function to read directly from app buffer to file.
*
- * Return: non-negative on success, negative on failure.
+ * Return: non-negative on success, negative on failure.
*
* Programmer:
*
@@ -297,11 +264,11 @@ H5D_mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED
const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5D_mpio_select_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
if(H5F_block_read(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr, (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.rbuf) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't finish collective parallel read")
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't finish collective parallel read")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -309,11 +276,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_mpio_select_write
+ * Function: H5D_mpio_select_write
*
- * Purpose: MPI-IO function to write directly from app buffer to file.
+ * Purpose: MPI-IO function to write directly from app buffer to file.
*
- * Return: non-negative on success, negative on failure.
+ * Return: non-negative on success, negative on failure.
*
* Programmer:
*
@@ -326,7 +293,7 @@ H5D_mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED
const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5D_mpio_select_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
@@ -339,14 +306,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_ioinfo_xfer_mode
+ * Function: H5D_ioinfo_xfer_mode
*
- * Purpose: Switch to between collective & independent MPI I/O
+ * Purpose: Switch to between collective & independent MPI I/O
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Friday, August 12, 2005
+ * Programmer: Quincey Koziol
+ * Friday, August 12, 2005
*
*-------------------------------------------------------------------------
*/
@@ -354,9 +321,9 @@ static herr_t
H5D_ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
H5FD_mpio_xfer_t xfer_mode)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_ioinfo_xfer_mode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Change the xfer_mode */
io_info->dxpl_cache->xfer_mode = xfer_mode;
@@ -383,15 +350,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_ioinfo_coll_opt_mode
+ * Function: H5D_ioinfo_coll_opt_mode
*
- * Purpose: Switch between using collective & independent MPI I/O w/file
+ * Purpose: Switch between using collective & independent MPI I/O w/file
* set view
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: MuQun Yang
- * Oct. 5th, 2006
+ * Programmer: MuQun Yang
+ * Oct. 5th, 2006
*
*-------------------------------------------------------------------------
*/
@@ -399,9 +366,9 @@ static herr_t
H5D_ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
H5FD_mpio_collective_opt_t coll_opt_mode)
{
- herr_t ret_value = SUCCEED; /*return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_ioinfo_coll_opt_mode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Change the optimal xfer_mode */
io_info->dxpl_cache->coll_opt_mode = coll_opt_mode;
@@ -414,14 +381,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_mpio_get_min_chunk
+ * Function: H5D_mpio_get_min_chunk
*
- * Purpose: Routine for obtaining minimum number of chunks to cover
+ * Purpose: Routine for obtaining minimum number of chunks to cover
* hyperslab selection selected by all processors.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -434,7 +401,7 @@ H5D_mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_mpio_get_min_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the number of chunks to perform I/O on */
num_chunkf = H5SL_count(fm->sel_chunks);
@@ -449,14 +416,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_mpio_get_sum_chunk
+ * Function: H5D_mpio_get_sum_chunk
*
- * Purpose: Routine for obtaining total number of chunks to cover
+ * Purpose: Routine for obtaining total number of chunks to cover
* hyperslab selection selected by all processors.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -470,7 +437,7 @@ H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_mpio_get_sum_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the number of chunks to perform I/O on */
num_chunkf = 0;
@@ -487,14 +454,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_contig_collective_read
+ * Function: H5D_contig_collective_read
*
- * Purpose: Reads directly from contiguous data in file into application
+ * Purpose: Reads directly from contiguous data in file into application
* memory using collective I/O.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 4, 2008
*
*-------------------------------------------------------------------------
@@ -504,9 +471,11 @@ H5D_contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_i
hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t UNUSED *fm)
{
+ H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
+ H5P_genplist_t *dx_plist; /* Pointer to DXPL */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_collective_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(IS_H5FD_MPIO(io_info->dset->oloc.file));
@@ -514,7 +483,17 @@ H5D_contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_i
/* Call generic internal collective I/O routine */
if(H5D_inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "couldn't finish shared collective MPI-IO")
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "couldn't finish shared collective MPI-IO")
+
+ /* Obtain the data transfer properties */
+ if(NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
+
+ /* Set the actual I/O mode property. internal_collective_io will not break to
+ * independent I/O, so we set it here.
+ */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -522,14 +501,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_contig_collective_write
+ * Function: H5D_contig_collective_write
*
- * Purpose: Write directly to contiguous data in file from application
+ * Purpose: Write directly to contiguous data in file from application
* memory using collective I/O.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 4, 2008
*
*-------------------------------------------------------------------------
@@ -539,9 +518,11 @@ H5D_contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_
hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t UNUSED *fm)
{
+ H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
+ H5P_genplist_t *dx_plist; /* Pointer to DXPL */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_contig_collective_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(IS_H5FD_MPIO(io_info->dset->oloc.file));
@@ -549,7 +530,17 @@ H5D_contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_
/* Call generic internal collective I/O routine */
if(H5D_inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "couldn't finish shared collective MPI-IO")
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "couldn't finish shared collective MPI-IO")
+
+ /* Obtain the data transfer properties */
+ if(NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list")
+
+ /* Set the actual I/O mode property. internal_collective_io will not break to
+ * independent I/O, so we set it here.
+ */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -557,9 +548,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_chunk_collective_io
+ * Function: H5D_chunk_collective_io
*
- * Purpose: Routine for
+ * Purpose: Routine for
* 1) choose an IO option:
* a) One collective IO defined by one MPI derived datatype to link through all chunks
* or b) multiple chunk IOs,to do MPI-IO for each chunk, the IO mode may be adjusted
@@ -570,7 +561,7 @@ done:
* 3. Build up the final MPI derived datatype
* 4. Set up collective IO property list
* 5. Do IO
- * For option b)
+ * For option b)
* 1. Use MPI_gather and MPI_Bcast to obtain information of *collective/independent/none*
* IO mode for each chunk of the selection
* 2. Depending on whether the IO mode is collective or independent or none,
@@ -579,9 +570,9 @@ done:
* 3. Set up collective IO property list for collective mode
* 4. DO IO
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -592,6 +583,8 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
{
H5P_genplist_t *dx_plist; /* Pointer to DXPL */
H5FD_mpio_chunk_opt_t chunk_opt_mode;
+ H5D_mpio_actual_chunk_opt_mode_t actual_chunk_opt_mode;
+ H5D_mpio_actual_io_mode_t actual_io_mode;
int io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
int sum_chunk = -1;
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
@@ -599,7 +592,7 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
#endif
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_collective_io)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(io_info);
@@ -636,43 +629,9 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
else
temp_not_link_io = TRUE;
#endif
- } /* end else */
-
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- if(io_option == H5D_ONE_LINK_CHUNK_IO) {
- io_option = H5D_MULTI_CHUNK_IO; /* We can not do this with one chunk IO. */
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- { int new_value;
- htri_t check_prop;
- check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI);
- if(check_prop > 0) {
- new_value = 1;
- if(H5Pset(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
-
- }
- }/* add this property because the library changes the option from one link to multiple chunks.*/
-#endif
- }
- if(io_option == H5D_ONE_LINK_CHUNK_IO_MORE_OPT){
- io_option = H5D_MULTI_CHUNK_IO_MORE_OPT;
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- { int new_value;
- htri_t check_prop;
- check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI_OPT);
- if(check_prop > 0) {
- new_value = 1;
- if(H5Pset(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_LINK_TO_MULTI_OPT, &new_value) < 0)
- HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
-
- }
- }/* add this property because the library changes the option from one link to multiple chunks.*/
-#endif
- }
-#endif
+ } /* end else */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
-{
htri_t check_prop;
int new_value;
@@ -709,22 +668,42 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
HGOTO_ERROR(H5E_IO, H5E_CANTSET, FAIL, "unable to set property value")
} /* end if */
} /* end if */
-}
#endif
/* step 2: Go ahead to do IO.*/
-#ifdef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
if(io_option == H5D_ONE_LINK_CHUNK_IO || io_option == H5D_ONE_LINK_CHUNK_IO_MORE_OPT) {
+ /* set the actual io mode properties to the correct values for link chunk io.
+ * Link chunk I/O does not break to independent, so we can set the actual_io mode
+ * as well as the optimisation mode. */
+ actual_chunk_opt_mode = H5D_MPIO_LINK_CHUNK;
+ actual_io_mode = H5D_MPIO_CHUNK_COLLECTIVE;
+
+ /* Set the actual chunk opt mode property. */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
+
if(H5D_link_chunk_collective_io(io_info, type_info, fm, sum_chunk) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO")
+
+ /* Set the actual io mode property. */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
} /* end if */
else
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
if(io_option == H5D_MULTI_CHUNK_IO) {
+ /* Set the actual chunk opt mode property */
+ actual_chunk_opt_mode = H5D_MPIO_MULTI_CHUNK_NO_OPT;
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
+
if(H5D_multi_chunk_collective_io_no_opt(io_info, type_info, fm, dx_plist) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish multiple chunk MPI-IO")
} /* end if */
else { /*multiple chunk IOs with opt */
+ actual_chunk_opt_mode = H5D_MPIO_MULTI_CHUNK;
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
+
if(H5D_multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO")
} /* end else */
@@ -735,14 +714,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_chunk_collective_read
+ * Function: H5D_chunk_collective_read
*
- * Purpose: Reads directly from chunks in file into application memory
+ * Purpose: Reads directly from chunks in file into application memory
* using collective I/O.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 4, 2008
*
*-------------------------------------------------------------------------
@@ -754,7 +733,7 @@ H5D_chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_in
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_collective_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Call generic selection operation */
if(H5D_chunk_collective_io(io_info, type_info, fm) < 0)
@@ -766,14 +745,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_chunk_collective_write
+ * Function: H5D_chunk_collective_write
*
- * Purpose: Write directly to chunks in file from application memory
+ * Purpose: Write directly to chunks in file from application memory
* using collective I/O.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 4, 2008
*
*-------------------------------------------------------------------------
@@ -785,7 +764,7 @@ H5D_chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_i
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_chunk_collective_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Call generic selection operation */
if(H5D_chunk_collective_io(io_info, type_info, fm) < 0)
@@ -795,21 +774,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_chunk_collective_write() */
-#ifdef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
/*-------------------------------------------------------------------------
- * Function: H5D_link_chunk_collective_io
+ * Function: H5D_link_chunk_collective_io
*
- * Purpose: Routine for one collective IO with one MPI derived datatype to link with all chunks
+ * Purpose: Routine for one collective IO with one MPI derived datatype to link with all chunks
*
* 1. Sort the chunk address and chunk info
* 2. Build up MPI derived datatype for each chunk
* 3. Build up the final MPI derived datatype
* 4. Use common collective IO routine to do MPI-IO
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -833,11 +811,11 @@ H5D_link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type
hbool_t *chunk_mft_is_derived_array = NULL; /* Flags to indicate each chunk's MPI file datatype is derived */
hbool_t *chunk_mbt_is_derived_array = NULL; /* Flags to indicate each chunk's MPI memory datatype is derived */
int *chunk_mpi_file_counts = NULL; /* Count of MPI file datatype for each chunk */
- int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */
+ int *chunk_mpi_mem_counts = NULL; /* Count of MPI memory datatype for each chunk */
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_link_chunk_collective_io)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the sum # of chunks, if not already available */
if(sum_chunk < 0) {
@@ -871,21 +849,22 @@ H5D_link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type
/* Check for this process having selection in this chunk */
chunk_node = H5SL_first(fm->sel_chunks);
- if(chunk_node == NULL) {
- /* Set the dataspace info for I/O to NULL, this process doesn't have any I/O to perform */
- fspace = mspace = NULL;
- } /* end if */
- else {
- H5D_chunk_info_t *chunk_info;
-
- /* Get the chunk info, for the selection in the chunk */
- if(NULL == (chunk_info = H5SL_item(chunk_node)))
- HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
- /* Set the dataspace info for I/O */
- fspace = chunk_info->fspace;
- mspace = chunk_info->mspace;
- } /* end else */
+ if(chunk_node == NULL) {
+ /* Set the dataspace info for I/O to NULL, this process doesn't have any I/O to perform */
+ fspace = mspace = NULL;
+ } /* end if */
+ else {
+ H5D_chunk_info_t *chunk_info;
+
+ /* Get the chunk info, for the selection in the chunk */
+ if(NULL == (chunk_info = H5SL_item(chunk_node)))
+ HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
+
+ /* Set the dataspace info for I/O */
+ fspace = chunk_info->fspace;
+ mspace = chunk_info->mspace;
+ } /* end else */
/* Set up the base storage address for this chunk */
io_info->store = &ctg_store;
@@ -943,6 +922,7 @@ if(H5DEBUG(D))
if(H5D_sort_chunk(io_info, fm, chunk_addr_info_array, sum_chunk) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to sort chunk address")
ctg_store.contig.dset_addr = chunk_addr_info_array[0].chunk_addr;
+
#ifdef H5D_DEBUG
if(H5DEBUG(D))
HDfprintf(H5DEBUG(D),"after sorting the chunk address \n");
@@ -1055,7 +1035,7 @@ if(H5DEBUG(D))
if(chunk_mpi_file_counts)
H5MM_xfree(chunk_mpi_file_counts);
if(chunk_mbt_is_derived_array)
- H5MM_xfree(chunk_mbt_is_derived_array);
+ H5MM_xfree(chunk_mbt_is_derived_array);
if(chunk_mft_is_derived_array)
H5MM_xfree(chunk_mft_is_derived_array);
@@ -1067,22 +1047,21 @@ if(H5DEBUG(D))
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_link_chunk_collective_io */
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
/*-------------------------------------------------------------------------
- * Function: H5D_multi_chunk_collective_io
+ * Function: H5D_multi_chunk_collective_io
*
- * Purpose: To do IO per chunk according to IO mode(collective/independent/none)
+ * Purpose: To do IO per chunk according to IO mode(collective/independent/none)
*
* 1. Use MPI_gather and MPI_Bcast to obtain IO mode in each chunk(collective/independent/none)
* 2. Depending on whether the IO mode is collective or independent or none,
* Create either MPI derived datatype for each chunk or just do independent IO
* 3. Use common collective IO routine to do MPI-IO
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1106,9 +1085,10 @@ H5D_multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
int mpi_rank;
#endif
size_t u; /* Local index variable */
+ H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_NO_COLLECTIVE; /* Local variable for tracking the I/O mode used. */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_multi_chunk_collective_io)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5Dmpio_DEBUG
mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file);
@@ -1169,7 +1149,7 @@ if(H5DEBUG(D))
/* Pass in chunk's coordinates in a union. */
store.chunk.offset = chunk_info->coords;
store.chunk.index = chunk_info->index;
- } /* end if */
+ } /* end if */
/* Collective IO for this chunk,
* Note: even there is no selection for this process, the process still
@@ -1185,10 +1165,19 @@ if(H5DEBUG(D))
if(chunk_info) {
fspace = chunk_info->fspace;
mspace = chunk_info->mspace;
- } /* end if */
- else {
+
+ /* Update the local variable tracking the dxpl's actual io mode property.
+ *
+ * Note: H5D_MPIO_COLLECTIVE_MULTI | H5D_MPIO_INDEPENDENT = H5D_MPIO_MIXED
+ * to ease switching between to mixed I/O without checking the current
+ * value of the property. You can see the definition in H5Ppublic.h
+ */
+ actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_COLLECTIVE;
+
+ } /* end if */
+ else {
fspace = mspace = NULL;
- } /* end else */
+ } /* end else */
/* Switch back to collective I/O */
if(last_xfer_mode != H5FD_MPIO_COLLECTIVE) {
@@ -1208,8 +1197,8 @@ if(H5DEBUG(D))
/* Perform the I/O */
if(H5D_inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
- } /* end if */
- else { /* possible independent IO for this chunk */
+ } /* end if */
+ else { /* possible independent IO for this chunk */
#ifdef H5D_DEBUG
if(H5DEBUG(D))
HDfprintf(H5DEBUG(D),"inside independent IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u);
@@ -1217,85 +1206,13 @@ if(H5DEBUG(D))
HDassert(chunk_io_option[u] == 0);
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- /* Check if this process has something to do with this chunk */
- if(chunk_info) {
- H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
- H5D_chunk_ud_t udata; /* B-tree pass-through */
- void *chunk; /* Pointer to the data chunk in cache */
- uint32_t accessed_bytes; /* Total accessed size in a chunk */
- htri_t cacheable; /* Whether the chunk is cacheable */
-
- /* Switch to independent I/O */
- if(last_xfer_mode != H5FD_MPIO_INDEPENDENT) {
- if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O")
- last_xfer_mode = H5FD_MPIO_INDEPENDENT;
- } /* end if */
-
- /* Load the chunk into cache. But if the whole chunk is written,
- * simply allocate space instead of load the chunk.
- */
- if(H5D_chunk_lookup(io_info->dset, io_info->dxpl_id,
- chunk_info->coords, chunk_info->index, &udata) < 0)
- HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
-
- /* Load the chunk into cache and lock it. */
- if((cacheable = H5D_chunk_cacheable(io_info, udata.addr,
- io_info->op_type == H5D_IO_OP_WRITE)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
- if(cacheable) {
- hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
-
- /* Compute # of bytes accessed in chunk */
- accessed_bytes = chunk_info->chunk_points * type_info->src_type_size;
-
- /* Determine if we will access all the data in the chunk */
- if(((io_info->op_type == H5D_IO_OP_WRITE) && (accessed_bytes != ctg_store.contig.dset_size))
- || (io_info->op_type != H5D_IO_OP_WRITE))
- entire_chunk = FALSE;
-
- /* Lock the chunk into the cache */
- if(NULL == (chunk = H5D_chunk_lock(io_info, &udata, entire_chunk, FALSE)))
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
-
- /* Set up the storage buffer information for this chunk */
- cpt_store.compact.buf = chunk;
-
- /* Point I/O info at contiguous I/O info for this chunk */
- chk_io_info = &cpt_io_info;
- } /* end if */
- else {
- /* Set up the storage address information for this chunk */
- ctg_store.contig.dset_addr = udata.addr;
-
- /* No chunk cached */
- chunk = NULL;
-
- /* Point I/O info at temporary I/O info for this chunk */
- chk_io_info = &ctg_io_info;
- } /* end else */
-
- if(io_info->op_type == H5D_IO_OP_WRITE) {
- if((io_info->io_ops.single_write)(chk_io_info, type_info,
- (hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed")
- } /* end if */
- else {
- if((io_info->io_ops.single_read)(chk_io_info, type_info,
- (hsize_t)chunk_info->chunk_points, chunk_info->fspace, chunk_info->mspace) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "optimized read failed")
- } /* end else */
-
- /* Release the cache lock on the chunk. */
- if(chunk && H5D_chunk_unlock(io_info, &udata, (io_info->op_type == H5D_IO_OP_WRITE), chunk, accessed_bytes) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
- } /* end if */
-#else /* !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS) */
/* Set the file & memory dataspaces */
if(chunk_info) {
fspace = chunk_info->fspace;
mspace = chunk_info->mspace;
+
+ /* Update the local variable tracking the dxpl's actual io mode. */
+ actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_INDEPENDENT;
} /* end if */
else {
fspace = mspace = NULL;
@@ -1318,10 +1235,13 @@ if(H5DEBUG(D))
if(H5DEBUG(D))
HDfprintf(H5DEBUG(D),"after inter collective IO\n");
#endif
-#endif /* !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS) */
} /* end else */
} /* end for */
+ /* Write the local value of actual io mode to the DXPL. */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
+
done:
if(chunk_io_option)
H5MM_xfree(chunk_io_option);
@@ -1333,9 +1253,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_multi_chunk_collective_io_no_opt
+ * Function: H5D_multi_chunk_collective_io_no_opt
*
- * Purpose: To do collective IO without any optimization per chunk base
+ * Purpose: To do collective IO without any optimization per chunk base
* The internal independent IO inside HDF5 cannot handle
* non-contiguous(or with holes) storage efficiently.
* Under this case, the one independent IO call may consist of
@@ -1352,9 +1272,9 @@ done:
* The HDF5 library won't do any IO management but leave it to MPI-IO to figure
* out.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1372,9 +1292,10 @@ H5D_multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
int min_chunk = -1; /* Minimum # of chunks all processes will operate on */
int count_chunk; /* How many chunks have we operated on? */
H5D_storage_t store; /* union of EFL and chunk pointer in file space */
+ H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_NO_COLLECTIVE; /*Local variable for tracking the I/O modes used. */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_multi_chunk_collective_io_no_opt)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5D_DEBUG
if(H5DEBUG(D)) {
@@ -1416,7 +1337,7 @@ if(H5DEBUG(D)) {
/* Iterate through chunks to be operated on */
while(chunk_node) {
H5D_chunk_info_t *chunk_info; /* chunk information */
- H5D_chunk_ud_t udata; /* B-tree pass-through */
+ H5D_chunk_ud_t udata; /* B-tree pass-through */
hbool_t make_ind, make_coll; /* Flags to indicate that the MPI mode should change */
/* Get the actual chunk information from the skip list node */
@@ -1437,20 +1358,6 @@ if(H5DEBUG(D)) {
if(count_chunk > min_chunk)
/* Switch to independent I/O (permanently) */
make_ind = TRUE;
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
-/* This case needs to be improved to check if the selected space
- is regular. If all selections are regular, collective IO can still be done.
- However, since we find an MPI-IO bug at a DOE machine(mcr) that cannot
- handle collective I/O selection for this case correctly,
- we turn off this optimization but leave the following code
- for future optimization. Otherwise, the following else {} doesn't make sense.
- KY 2006/8/4/ */
- else {
- /* Switch to independent I/O (temporarily) */
- make_ind = TRUE;
- make_coll = TRUE;
- } /* end else */
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
/* Retrieve the chunk's address */
if(H5D_chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords,
@@ -1468,6 +1375,9 @@ if(H5DEBUG(D)) {
if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O")
+ /* Update the local variable tracking the dxpl's actual io mode */
+ actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_INDEPENDENT;
+
/* Load the chunk into cache and lock it. */
if((cacheable = H5D_chunk_cacheable(io_info, udata.addr,
io_info->op_type == H5D_IO_OP_WRITE)) < 0)
@@ -1524,6 +1434,9 @@ if(H5DEBUG(D)) {
/* Set up the storage address information for this chunk */
ctg_store.contig.dset_addr = udata.addr;
+ /* Update the local variable tracking the dxpl's actual io Mode. */
+ actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_COLLECTIVE;
+
if(H5D_inter_collective_io(&ctg_io_info, type_info, chunk_info->fspace, chunk_info->mspace) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,"couldn't finish shared collective MPI-IO")
} /* end else */
@@ -1536,20 +1449,24 @@ if(H5DEBUG(D)) {
chunk_node = H5SL_next(chunk_node);
} /* end while */
+ /* Write the local value of actual io mode to the DXPL. */
+ if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, &actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual io mode property")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_multi_chunk_collective_io_no_opt */
/*-------------------------------------------------------------------------
- * Function: H5D_inter_collective_io
+ * Function: H5D_inter_collective_io
*
- * Purpose: Routine for the shared part of collective IO between multiple chunk
+ * Purpose: Routine for the shared part of collective IO between multiple chunk
* collective IO and contiguous collective IO
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1565,7 +1482,7 @@ H5D_inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_inter_collective_io)
+ FUNC_ENTER_NOAPI_NOINIT
if((file_space != NULL) && (mem_space != NULL)) {
int mpi_file_count; /* Number of file "objects" to transfer */
@@ -1611,13 +1528,13 @@ if(H5DEBUG(D))
/*-------------------------------------------------------------------------
- * Function: H5D_final_collective_io
+ * Function: H5D_final_collective_io
*
- * Purpose: Routine for the common part of collective IO with different storages.
+ * Purpose: Routine for the common part of collective IO with different storages.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1626,10 +1543,10 @@ static herr_t
H5D_final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t mpi_buf_count, MPI_Datatype *mpi_file_type, MPI_Datatype *mpi_buf_type)
{
- hbool_t plist_is_setup = FALSE; /* Whether the dxpl has been customized */
+ hbool_t plist_is_setup = FALSE; /* Whether the dxpl has been customized */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_final_collective_io)
+ FUNC_ENTER_NOAPI_NOINIT
/* Pass buf type, file type to the file driver. */
if(H5FD_mpi_setup_collective(io_info->dxpl_id, *mpi_buf_type, *mpi_file_type) < 0)
@@ -1638,7 +1555,7 @@ H5D_final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
if(io_info->op_type == H5D_IO_OP_WRITE) {
if((io_info->io_ops.single_write)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed")
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed")
} /* end if */
else {
if((io_info->io_ops.single_read)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0)
@@ -1658,12 +1575,11 @@ if(H5DEBUG(D))
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_final_collective_io */
-#ifdef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
/*-------------------------------------------------------------------------
- * Function: H5D_sort_chunk
+ * Function: H5D_sort_chunk
*
- * Purpose: Routine to sort chunks in increasing order of chunk address
+ * Purpose: Routine to sort chunks in increasing order of chunk address
* Each chunk address is also obtained.
*
* Description:
@@ -1678,9 +1594,9 @@ if(H5DEBUG(D))
* many_chunk_opt : flag to optimize the way to obtain chunk addresses
* for many chunks
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1699,9 +1615,9 @@ H5D_sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int mpi_size; /* Number of MPI processes */
int mpi_code; /* MPI return code */
int i; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_sort_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* Retrieve # of MPI processes */
if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
@@ -1740,14 +1656,15 @@ if(H5DEBUG(D))
/* Retrieve all the chunk addresses with process 0 */
if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
- if(mpi_rank == 0) {
+
+ if(mpi_rank == 0) {
if(H5D_chunk_addrmap(io_info, total_chunk_addr_array) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
- } /* end if */
+ } /* end if */
- /* Broadcasting the MPI_IO option info. and chunk address info. */
- if(MPI_SUCCESS != (mpi_code = MPI_Bcast(total_chunk_addr_array, (int)(sizeof(haddr_t) * fm->layout->u.chunk.nchunks), MPI_BYTE, (int)0, io_info->comm)))
- HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
+ /* Broadcasting the MPI_IO option info. and chunk address info. */
+ if(MPI_SUCCESS != (mpi_code = MPI_Bcast(total_chunk_addr_array, (int)(sizeof(haddr_t) * fm->layout->u.chunk.nchunks), MPI_BYTE, (int)0, io_info->comm)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
} /* end if */
/* Start at first node in chunk skip list */
@@ -1801,13 +1718,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_sort_chunk() */
-#endif /* H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS */
/*-------------------------------------------------------------------------
- * Function: H5D_obtain_mpio_mode
+ * Function: H5D_obtain_mpio_mode
*
- * Purpose: Routine to obtain each io mode(collective,independent or none) for each chunk;
+ * Purpose: Routine to obtain each io mode(collective,independent or none) for each chunk;
* Each chunk address is also obtained.
*
* Description:
@@ -1833,9 +1749,9 @@ done:
* Output: uint8_t assign_io_mode[], : IO mode, collective, independent or none
* haddr_t chunk_addr[], : chunk address array for each chunk
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Muqun Yang
+ * Programmer: Muqun Yang
* Monday, Feb. 13th, 2006
*
*-------------------------------------------------------------------------
@@ -1846,9 +1762,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
{
int total_chunks;
unsigned percent_nproc_per_chunk, threshold_nproc_per_chunk;
-#if defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) && defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
H5FD_mpio_chunk_opt_t chunk_opt_mode;
-#endif
uint8_t* io_mode_info = NULL;
uint8_t* recv_io_mode_info = NULL;
uint8_t* mergebuf = NULL;
@@ -1866,7 +1780,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
#endif
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5D_obtain_mpio_mode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Assign the rank 0 to the root */
root = 0;
@@ -1881,7 +1795,6 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
/* Setup parameters */
H5_ASSIGN_OVERFLOW(total_chunks, fm->layout->u.chunk.nchunks, hsize_t, int);
percent_nproc_per_chunk = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME);
-#if defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) && defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
chunk_opt_mode = (H5FD_mpio_chunk_opt_t)H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME);
if((chunk_opt_mode == H5FD_MPIO_CHUNK_MULTI_IO) || (percent_nproc_per_chunk == 0)) {
if(H5D_chunk_addrmap(io_info, chunk_addr) < 0)
@@ -1891,7 +1804,6 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
HGOTO_DONE(SUCCEED)
} /* end if */
-#endif
threshold_nproc_per_chunk = mpi_size * percent_nproc_per_chunk/100;
/* Allocate memory */
@@ -1907,16 +1819,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
while(chunk_node) {
chunk_info = H5SL_item(chunk_node);
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- /* regularity information: 1, selection information: 2 */
- if(H5S_SELECT_IS_REGULAR(chunk_info->fspace) == TRUE &&
- H5S_SELECT_IS_REGULAR(chunk_info->mspace) == TRUE)
-#endif
- io_mode_info[chunk_info->index] = H5D_CHUNK_SELECT_REG; /* this chunk is selected and is "regular" without defining H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS. */
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- else
- io_mode_info[chunk_info->index] = H5D_CHUNK_SELECT_IRREG; /* this chunk is selected and is irregular*/
-#endif
+ io_mode_info[chunk_info->index] = H5D_CHUNK_SELECT_REG; /* this chunk is selected and is "regular" */
chunk_node = H5SL_next(chunk_node);
} /* end while */
@@ -1928,23 +1831,14 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
if(mpi_rank == root) {
int nproc;
int* nproc_per_chunk;
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- int* ind_this_chunk;
-#endif
/* pre-computing: calculate number of processes and
regularity of the selection occupied in each chunk */
nproc_per_chunk = (int*)H5MM_calloc(total_chunks * sizeof(int));
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- ind_this_chunk = (int*)H5MM_calloc(total_chunks * sizeof(int));
-#endif
/* calculating the chunk address */
if(H5D_chunk_addrmap(io_info, chunk_addr) < 0) {
HDfree(nproc_per_chunk);
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- HDfree(ind_this_chunk);
-#endif
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
} /* end if */
@@ -1956,29 +1850,14 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
for(ic = 0; ic < total_chunks; ic++, tmp_recv_io_mode_info++) {
if(*tmp_recv_io_mode_info != 0) {
nproc_per_chunk[ic]++;
-#ifndef H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS
- if(*tmp_recv_io_mode_info == H5D_CHUNK_SELECT_IRREG)
- ind_this_chunk[ic] = 1;
-#endif
} /* end if */
-#ifndef H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS
- else {
- /*checking whether we have a selection in this chunk */
- ind_this_chunk[ic] = 1;
- } /* end else */
-#endif
} /* end for */
} /* end for */
/* Calculating MPIO mode for each chunk (collective, independent, none) */
for(ic = 0; ic < total_chunks; ic++) {
if(nproc_per_chunk[ic] > MAX(1, threshold_nproc_per_chunk)) {
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- if(!ind_this_chunk[ic])
- assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
-#else
assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
-#endif
} /* end if */
} /* end for */
@@ -1988,9 +1867,6 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
HDmemcpy(tempbuf, chunk_addr, sizeof(haddr_t) * total_chunks);
HDfree(nproc_per_chunk);
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- HDfree(ind_this_chunk);
-#endif
} /* end if */
/* Broadcasting the MPI_IO option info. and chunk address info. */
@@ -2003,11 +1879,6 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME);
if(check_prop > 0) {
-#if !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS)
- new_value = 0;
- if(H5Pset(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, &new_value) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value")
-#else
for(ic = 0; ic < total_chunks; ic++) {
if(assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) {
new_value = 0;
@@ -2016,7 +1887,6 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
break;
} /* end if */
} /* end for */
-#endif
} /* end if */
check_prop = H5Pexist(io_info->dxpl_id, H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME);
@@ -2053,7 +1923,7 @@ H5D_cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
{
haddr_t addr1, addr2;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_cmp_chunk_addr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 723ab45..3c4c761 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -130,7 +130,7 @@ H5D_none_create(const H5D_chk_idx_info_t *idx_info)
haddr_t addr; /* The address of dataset chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info);
@@ -172,7 +172,7 @@ done:
static hbool_t
H5D_none_is_space_alloc(const H5O_storage_chunk_t *storage)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_none_is_space_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -198,7 +198,7 @@ H5D_none_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -245,7 +245,7 @@ H5D_none_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
hsize_t idx; /* Array index of chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_get_addr)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -296,7 +296,7 @@ H5D_none_iterate(const H5D_chk_idx_info_t *idx_info,
hsize_t idx; /* Array index of chunk */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -373,7 +373,7 @@ done:
static herr_t
H5D_none_remove(const H5D_chk_idx_info_t UNUSED *idx_info, H5D_chunk_common_ud_t UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_none_remove)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* NO OP */
@@ -399,7 +399,7 @@ H5D_none_delete(const H5D_chk_idx_info_t *idx_info)
hsize_t nbytes; /* Size of all chunks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_delete)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx_info);
HDassert(idx_info->f);
@@ -438,7 +438,7 @@ H5D_none_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_none_copy_setup)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(idx_info_src);
@@ -486,7 +486,7 @@ done:
static herr_t
H5D_none_size(const H5D_chk_idx_info_t UNUSED *idx_info, hsize_t *index_size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_none_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(index_size);
@@ -511,7 +511,7 @@ H5D_none_size(const H5D_chk_idx_info_t UNUSED *idx_info, hsize_t *index_size)
static herr_t
H5D_none_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_none_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
@@ -538,7 +538,7 @@ H5D_none_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
static herr_t
H5D_none_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_none_dump)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(storage);
diff --git a/src/H5Doh.c b/src/H5Doh.c
index bbf2cb2..db7cae1 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -108,7 +108,7 @@ H5O_dset_get_copy_file_udata(void)
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dset_get_copy_file_udata)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for the 'copy file' user data for copying datasets */
if(NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t)))
@@ -141,7 +141,7 @@ H5O_dset_free_copy_file_udata(void *_udata)
{
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dset_free_copy_file_udata)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(udata);
@@ -186,13 +186,13 @@ H5O_dset_free_copy_file_udata(void *_udata)
*
*-------------------------------------------------------------------------
*/
-htri_t
+static htri_t
H5O_dset_isa(H5O_t *oh)
{
htri_t exists; /* Flag if header message of interest exists */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dset_isa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oh);
@@ -234,7 +234,7 @@ H5O_dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t ap
hid_t dapl_id; /* dapl to use to open this dataset */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dset_open)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_loc);
@@ -287,7 +287,7 @@ H5O_dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
H5D_t *dset = NULL; /* New dataset created */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dset_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -335,7 +335,7 @@ H5O_dset_get_oloc(hid_t obj_id)
H5D_t *dset; /* Dataset opened */
H5O_loc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dset_get_oloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the dataset */
if(NULL == (dset = (H5D_t *)H5I_object(obj_id)))
@@ -376,7 +376,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dset_bh_info)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 7fe7e3e..faafd4d 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -590,7 +590,7 @@ H5_DLLVAR const H5B2_class_t H5D_BT2_FILT[1];
H5_DLL H5D_t *H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space,
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id);
-H5_DLL H5D_t *H5D_create_named(const H5G_loc_t *loc, const char *name,
+H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name,
hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id,
hid_t dapl_id, hid_t dxpl_id);
H5_DLL herr_t H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation,
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 666f969..66b6e56 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -72,6 +72,8 @@
#define H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME "mpio_chunk_opt_hard"
#define H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME "mpio_chunk_opt_num"
#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio"
+#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME "actual_chunk_opt_mode"
+#define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode"
#endif /* H5_HAVE_PARALLEL */
#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
diff --git a/src/H5Dproxy.c b/src/H5Dproxy.c
index 9124dac..7f3a566 100644
--- a/src/H5Dproxy.c
+++ b/src/H5Dproxy.c
@@ -132,7 +132,7 @@ H5D_cache_proxy_load(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr,
{
H5D_chunk_proxy_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_cache_proxy_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* This routine should never be invoked! */
HDassert(0 && "H5D_cache_proxy_load called!?!");
@@ -163,7 +163,7 @@ H5D_cache_proxy_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_cache_proxy_flush)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: Flushing chunk proxy, addr = %a, destroy = %u\n", FUNC, addr, (unsigned)destroy);
#endif /* QAK */
@@ -219,7 +219,7 @@ H5D_cache_proxy_dest(H5F_t UNUSED *f, H5D_chunk_proxy_t *proxy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_cache_proxy_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -253,7 +253,7 @@ H5D_cache_proxy_clear(H5F_t *f, H5D_chunk_proxy_t *proxy, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_cache_proxy_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -291,7 +291,7 @@ static herr_t
H5D_cache_proxy_size(const H5F_t UNUSED *f, const H5D_chunk_proxy_t UNUSED *proxy,
size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_cache_proxy_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(f);
@@ -327,7 +327,7 @@ H5D_chunk_proxy_create(H5D_t *dset, hid_t dxpl_id, H5D_chunk_ud_t *udata,
htri_t supported; /* Return value from "support" callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_proxy_create)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
HDassert(ent);
@@ -401,7 +401,7 @@ H5D_chunk_proxy_remove(const H5D_t *dset, hid_t dxpl_id, H5D_rdcc_ent_t *ent)
H5D_chunk_proxy_t *proxy = NULL; /* Chunk proxy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_proxy_remove)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dset);
HDassert(ent);
@@ -485,7 +485,7 @@ H5D_chunk_proxy_mark(H5D_rdcc_ent_t *ent, hbool_t dirty)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_proxy_mark)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(ent);
#ifdef QAK
@@ -518,7 +518,7 @@ done:
static herr_t
H5D_chunk_proxy_destroy(H5D_chunk_proxy_t *proxy)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_chunk_proxy_destroy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(proxy);
@@ -549,7 +549,7 @@ H5D_chunk_proxy_create_flush_dep(H5D_rdcc_ent_t *ent, void *parent)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_proxy_create_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(ent);
HDassert(parent);
@@ -586,7 +586,7 @@ H5D_chunk_proxy_update_flush_dep(H5D_rdcc_ent_t *ent, void *old_parent,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_proxy_update_flush_dep)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(ent);
HDassert(old_parent);
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index ed73f3c..7758619 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -108,7 +108,7 @@ H5D_scatter_file(const H5D_io_info_t *_io_info,
size_t nelem; /* Number of elements used in sequences */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_scatter_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(_io_info);
@@ -207,7 +207,7 @@ H5D_gather_file(const H5D_io_info_t *_io_info,
size_t nelem; /* Number of elements used in sequences */
size_t ret_value = nelmts; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_gather_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(_io_info);
@@ -301,7 +301,7 @@ H5D_scatter_mem (const void *_tscat_buf, const H5S_t *space,
size_t nelem; /* Number of elements used in sequences */
herr_t ret_value = SUCCEED; /* Number of elements scattered */
- FUNC_ENTER_NOAPI(H5D_scatter_mem, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(tscat_buf);
@@ -388,7 +388,7 @@ H5D_gather_mem(const void *_buf, const H5S_t *space,
size_t nelem; /* Number of elements used in sequences */
size_t ret_value = nelmts; /* Number of elements gathered */
- FUNC_ENTER_NOAPI_NOINIT(H5D_gather_mem)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(buf);
@@ -469,7 +469,7 @@ H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
size_t smine_nelmts; /*elements per strip */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_scatgath_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -601,7 +601,7 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
size_t smine_nelmts; /*elements per strip */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_scatgath_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(io_info);
@@ -750,7 +750,7 @@ H5D_compound_opt_read(size_t nelmts, const H5S_t *space,
size_t src_stride, dst_stride, copy_size;
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_compound_opt_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(nelmts > 0);
@@ -875,7 +875,7 @@ H5D_compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
size_t src_stride, dst_stride; /* Strides through source & destination datatypes */
size_t i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_compound_opt_write)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(nelmts > 0);
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 6dade5c..d75b7ed 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -102,7 +102,7 @@ H5D_select_io(const H5D_io_info_t *io_info, size_t elmt_size,
ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_select_io, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(io_info);
@@ -266,7 +266,7 @@ H5D_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_select_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Call generic selection operation */
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
@@ -297,7 +297,7 @@ H5D_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_select_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Call generic selection operation */
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 68208b3..8136dd7 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -87,7 +87,7 @@ H5D_layout_version_test(hid_t did, unsigned *version)
H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5D_layout_version_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
@@ -126,7 +126,7 @@ H5D_layout_contig_size_test(hid_t did, hsize_t *size)
H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5D_layout_contig_size_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
@@ -167,7 +167,7 @@ H5D_layout_idx_type_test(hid_t did, H5D_chunk_index_t *idx_type)
H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5D_layout_idx_type_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
@@ -208,7 +208,7 @@ H5D_current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
H5D_t *dset; /* Pointer to dataset to query */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5D_current_cache_size_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
diff --git a/src/H5E.c b/src/H5E.c
index 7a81d32..4e14887 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -144,7 +144,7 @@ H5E_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5E_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -168,7 +168,7 @@ done:
static herr_t
H5E_set_default_auto(H5E_t *stk)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_set_default_auto)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifndef H5_NO_DEPRECATED_SYMBOLS
#ifdef H5_USE_16_API_DEFAULT
@@ -210,7 +210,7 @@ H5E_init_interface(void)
char lib_vers[128]; /* Buffer to constructu library version within */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the error class IDs */
if(H5I_register_type(H5I_ERROR_CLASS, (size_t)H5I_ERRCLS_HASHSIZE, H5E_RESERVED_ATOMS,
@@ -268,7 +268,7 @@ H5E_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
int ncls, nmsg, nstk;
@@ -341,7 +341,7 @@ H5E_get_stack(void)
{
H5E_t *estack;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_get_stack)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
estack = (H5E_t *)H5TS_get_thread_local_value(H5TS_errstk_key_g);
@@ -382,7 +382,7 @@ H5E_get_stack(void)
static herr_t
H5E_free_class(H5E_cls_t *cls)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_free_class)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(cls);
@@ -415,7 +415,7 @@ H5Eregister_class(const char *cls_name, const char *lib_name, const char *versio
H5E_cls_t *cls; /* Pointer to error class */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Eregister_class, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "*s*s*s", cls_name, lib_name, version);
/* Check arguments */
@@ -453,7 +453,7 @@ H5E_register_class(const char *cls_name, const char *lib_name, const char *versi
H5E_cls_t *cls = NULL; /* Pointer to error class */
H5E_cls_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_register_class)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(cls_name);
@@ -501,7 +501,7 @@ H5Eunregister_class(hid_t class_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eunregister_class, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", class_id);
/* Check arguments */
@@ -537,7 +537,7 @@ H5E_unregister_class(H5E_cls_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_unregister_class)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(cls);
@@ -574,7 +574,7 @@ H5Eget_class_name(hid_t class_id, char *name, size_t size)
H5E_cls_t *cls; /* Pointer to error class */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Eget_class_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "i*sz", class_id, name, size);
/* Get the error class */
@@ -608,7 +608,7 @@ H5E_get_class_name(const H5E_cls_t *cls, char *name, size_t size)
{
ssize_t len; /* Length of error class's name */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_get_class_name)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(cls);
@@ -648,7 +648,7 @@ H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *key)
H5E_cls_t *cls = (H5E_cls_t*)key;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_close_msg_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(err_msg);
@@ -683,7 +683,7 @@ H5Eclose_msg(hid_t err_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eclose_msg, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", err_id);
/* Check arguments */
@@ -714,7 +714,7 @@ done:
static herr_t
H5E_close_msg(H5E_msg_t *err)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_close_msg)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(err);
@@ -747,7 +747,7 @@ H5Ecreate_msg(hid_t class_id, H5E_type_t msg_type, const char *msg_str)
H5E_msg_t *msg; /* Pointer to new error message */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Ecreate_msg, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "iEt*s", class_id, msg_type, msg_str);
/* Check arguments */
@@ -790,7 +790,7 @@ H5E_create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str)
H5E_msg_t *msg = NULL; /* Pointer to new error message */
H5E_msg_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_create_msg)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(cls);
@@ -838,7 +838,7 @@ H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg_str, size_t size)
H5E_msg_t *msg; /* Pointer to error message */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Eget_msg, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Zs", "i*Et*sz", msg_id, type, msg_str, size);
/* Get the message object */
@@ -872,7 +872,7 @@ H5Ecreate_stack(void)
H5E_t *stk; /* Error stack */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Ecreate_stack, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE0("i","");
/* Allocate a new error stack */
@@ -911,7 +911,7 @@ H5Eget_current_stack(void)
hid_t ret_value; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eget_current_stack, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE0("i","");
/* Get the current stack */
@@ -947,7 +947,7 @@ H5E_get_current_stack(void)
unsigned u; /* Local index variable */
H5E_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_get_current_stack)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get a pointer to the current error stack */
if(NULL == (current_stack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
@@ -1028,7 +1028,7 @@ H5Eset_current_stack(hid_t err_stack)
H5E_t *estack;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eset_current_stack, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", err_stack);
if(err_stack != H5E_DEFAULT) {
@@ -1071,7 +1071,7 @@ H5E_set_current_stack(H5E_t *estack)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_set_current_stack)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(estack);
@@ -1133,7 +1133,7 @@ H5Eclose_stack(hid_t stack_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eclose_stack, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", stack_id);
if(H5E_DEFAULT != stack_id) {
@@ -1169,7 +1169,7 @@ done:
static herr_t
H5E_close_stack(H5E_t *estack)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_close_stack)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(estack);
@@ -1203,7 +1203,7 @@ H5Eget_num(hid_t error_stack_id)
ssize_t ret_value; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eget_num, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE1("Zs", "i", error_stack_id);
/* Need to check for errors */
@@ -1244,7 +1244,7 @@ done:
static ssize_t
H5E_get_num(const H5E_t *estack)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_get_num)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(estack);
@@ -1271,7 +1271,7 @@ H5Epop(hid_t err_stack, size_t count)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Epop, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE2("e", "iz", err_stack, count);
/* Need to check for errors */
@@ -1333,11 +1333,13 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
int desc_len; /* Actual length of description when formatted */
#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
+ hbool_t va_started = FALSE; /* Whether the variable argument list is open */
herr_t ret_value=SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Epush2, FAIL)
- H5TRACE7("e","issIuiis",err_stack,file,func,line,maj_id,min_id,fmt);
+ FUNC_ENTER_API_NOCLEAR(FAIL)
+ H5TRACE8("e", "i*s*sIuiii*s", err_stack, file, func, line, cls_id, maj_id,
+ min_id, fmt);
if(err_stack == H5E_DEFAULT)
estack = NULL;
@@ -1357,6 +1359,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
/* Format the description */
va_start(ap, fmt);
+ va_started = TRUE;
#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -1398,13 +1401,13 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line,
} /* end while */
#endif /* H5_HAVE_VASPRINTF */
- va_end(ap);
-
/* Push the error on the stack */
if(H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack")
done:
+ if(va_started)
+ va_end(ap);
if(tmp)
H5MM_xfree(tmp);
@@ -1431,7 +1434,7 @@ H5Eclear2(hid_t err_stack)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eclear2, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE1("e", "i", err_stack);
/* Need to check for errors */
@@ -1476,7 +1479,7 @@ H5Eprint2(hid_t err_stack, FILE *stream)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eprint2, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
/* Need to check for errors */
@@ -1522,7 +1525,7 @@ H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t stack_func, voi
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Ewalk2, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
/* Need to check for errors */
@@ -1576,7 +1579,7 @@ H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data)
H5E_auto_op_t op; /* Error stack function */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eget_auto2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x**x", estack_id, func, client_data);
if(estack_id == H5E_DEFAULT) {
@@ -1638,7 +1641,7 @@ H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eset_auto2, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE3("e", "ix*x", estack_id, func, client_data);
if(estack_id == H5E_DEFAULT) {
@@ -1695,7 +1698,7 @@ H5Eauto_is_v2(hid_t estack_id, unsigned *is_stack)
H5E_t *estack; /* Error stack to operate on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eauto_is_v2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", estack_id, is_stack);
if(estack_id == H5E_DEFAULT) {
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 0a028d9..0d3083b 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -99,7 +99,7 @@ DESCRIPTION
static herr_t
H5E_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5E_init())
} /* H5E_init_deprec_interface() */
@@ -127,7 +127,7 @@ H5Eget_major(H5E_major_t maj)
char *msg_str = NULL;
char *ret_value; /* Return value */
- FUNC_ENTER_API_NOCLEAR(H5Eget_major, NULL)
+ FUNC_ENTER_API_NOCLEAR(NULL)
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
@@ -179,7 +179,7 @@ H5Eget_minor(H5E_minor_t min)
char *msg_str = NULL;
char *ret_value; /* Return value */
- FUNC_ENTER_API_NOCLEAR(H5Eget_minor, NULL)
+ FUNC_ENTER_API_NOCLEAR(NULL)
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
@@ -236,7 +236,7 @@ H5Epush1(const char *file, const char *func, unsigned line,
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Epush1, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE6("e", "*s*sIuii*s", file, func, line, maj, min, str);
/* Push the error on the default error stack */
@@ -267,7 +267,7 @@ H5Eclear1(void)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eclear1, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE0("e","");
/* Clear the default error stack */
@@ -302,7 +302,7 @@ H5Eprint1(FILE *stream)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eprint1, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
@@ -339,7 +339,7 @@ H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Ewalk1, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
@@ -384,7 +384,7 @@ H5Eget_auto1(H5E_auto1_t *func, void **client_data)
H5E_auto_op_t auto_op; /* Error stack operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eget_auto1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "*x**x", func, client_data);
/* Retrieve default error stack */
@@ -441,7 +441,7 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data)
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eset_auto1, FAIL)
+ FUNC_ENTER_API_NOCLEAR(FAIL)
H5TRACE2("e", "x*x", func, client_data);
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
diff --git a/src/H5Eint.c b/src/H5Eint.c
index f650581..594a69a 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -132,7 +132,7 @@ DESCRIPTION
static herr_t
H5E_init_int_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_init_int_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5E_init())
} /* H5E_init_int_interface() */
@@ -156,7 +156,7 @@ H5E_get_msg(const H5E_msg_t *msg, H5E_type_t *type, char *msg_str, size_t size)
{
ssize_t len; /* Length of error message */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_get_msg)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(msg);
@@ -227,7 +227,7 @@ H5E_walk1_cb(int n, H5E_error1_t *err_desc, void *client_data)
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_walk1_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(err_desc);
@@ -349,7 +349,7 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
unsigned have_desc = 1; /* Flag to indicate whether the error has a "real" description */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_walk2_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(err_desc);
@@ -450,8 +450,7 @@ H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible)
H5E_walk_op_t walk_op; /* Error stack walking callback */
herr_t ret_value = SUCCEED;
- /* Don't clear the error stack! :-) */
- FUNC_ENTER_NOAPI_NOINIT(H5E_print)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(estack);
@@ -526,7 +525,7 @@ H5E_walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *op
herr_t status; /* Status from callback function */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_walk)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(estack);
@@ -620,7 +619,7 @@ done:
herr_t
H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_get_auto)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(estack);
@@ -660,7 +659,7 @@ H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **client_data)
herr_t
H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_set_auto)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(estack);
@@ -694,6 +693,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
int desc_len; /* Actual length of description when formatted */
#endif /* H5_HAVE_VASPRINTF */
char *tmp = NULL; /* Buffer to place formatted description in */
+ hbool_t va_started = FALSE; /* Whether the variable argument list is open */
herr_t ret_value = SUCCEED; /* Return value */
/*
@@ -703,7 +703,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
* HERROR(). HERROR() is called by HRETURN_ERROR() which could
* be called by FUNC_ENTER().
*/
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_printf_stack)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(cls_id > 0);
@@ -718,6 +718,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
/* Start the variable-argument parsing */
va_start(ap, fmt);
+ va_started = TRUE;
#ifdef H5_HAVE_VASPRINTF
/* Use the vasprintf() routine, since it does what we're trying to do below */
@@ -759,13 +760,13 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
} /* end while */
#endif /* H5_HAVE_VASPRINTF */
- va_end(ap);
-
/* Push the error on the stack */
if(H5E_push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0)
HGOTO_DONE(FAIL)
done:
+ if(va_started)
+ va_end(ap);
if(tmp)
H5MM_xfree(tmp);
@@ -806,7 +807,7 @@ H5E_push_stack(H5E_t *estack, const char *file, const char *func, unsigned line,
* HERROR(). HERROR() is called by HRETURN_ERROR() which could
* be called by FUNC_ENTER().
*/
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_push_stack)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(cls_id > 0);
@@ -880,7 +881,7 @@ H5E_clear_entries(H5E_t *estack, size_t nentries)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_clear_entries)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(estack);
@@ -934,7 +935,7 @@ H5E_clear_stack(H5E_t *estack)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5E_clear_stack, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check for 'default' error stack */
if(estack == NULL)
@@ -970,7 +971,7 @@ H5E_pop(H5E_t *estack, size_t count)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5E_pop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(estack);
@@ -1004,7 +1005,7 @@ H5E_dump_api_stack(hbool_t is_api)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5E_dump_api_stack, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Only dump the error stack during an API call */
if(is_api) {
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index 1e5ada1..2ca48d2 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -126,7 +126,7 @@ extern int H5E_mpi_error_str_len;
* error number, a description of the error (as a printf-like format string),
* and an optional set of arguments for the printf format arguments.
*/
-#define H5E_PRINTF(...) H5E_printf_stack(NULL, __FILE__, FUNCNAME, __LINE__, H5E_ERR_CLS_g, H5_MY_PKG_ERR, __VA_ARGS__)
+#define H5E_PRINTF(...) H5E_printf_stack(NULL, __FILE__, FUNC, __LINE__, H5E_ERR_CLS_g, H5_MY_PKG_ERR, __VA_ARGS__)
/*
* H5_LEAVE macro, used to facilitate control flow between a
diff --git a/src/H5F.c b/src/H5F.c
index 8bc1b9d..d152448 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -35,19 +35,6 @@
#include "H5SMprivate.h" /* Shared Object Header Messages */
#include "H5Tprivate.h" /* Datatypes */
-/* Predefined file drivers */
-#include "H5FDcore.h" /*temporary in-memory files */
-#include "H5FDfamily.h" /*family of files */
-#include "H5FDlog.h" /* sec2 driver with logging, for debugging */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5FDmulti.h" /*multiple files partitioned by mem usage */
-#include "H5FDsec2.h" /*Posix unbuffered I/O */
-#include "H5FDstdio.h" /* Standard C buffered I/O */
-#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
-#endif
-#include "H5FDdirect.h" /*Linux direct I/O */
-
/* Struct only used by functions H5F_get_objects and H5F_get_objects_cb */
typedef struct H5F_olist_t {
H5I_type_t obj_type; /* Type of object to look for */
@@ -99,7 +86,7 @@ H5F_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -125,7 +112,7 @@ H5F_init_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Initialize the atom group for the file IDs.
@@ -161,7 +148,7 @@ H5F_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
if((n = H5I_nmembers(H5I_FILE)) != 0) {
@@ -202,7 +189,7 @@ H5Fget_create_plist(hid_t file_id)
H5P_genplist_t *plist; /* Property list */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_create_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", file_id);
/* check args */
@@ -247,7 +234,7 @@ H5Fget_access_plist(hid_t file_id)
H5F_t *f; /* File info */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_access_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", file_id);
/* Check args */
@@ -295,7 +282,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
unsigned efc_size = 0;
hid_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5F_get_access_plist, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -390,7 +377,7 @@ H5Fget_obj_count(hid_t file_id, unsigned types)
H5F_t *f = NULL; /* File to query */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_obj_count, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("Zs", "iIu", file_id, types);
if(file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
@@ -430,7 +417,7 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref)
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_obj_count)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* H5F_get_objects doesn't fail */
ret_value = H5F_get_objects(f, types, 0, NULL, app_ref);
@@ -463,7 +450,7 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list)
H5F_t *f = NULL; /* File to query */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_obj_ids, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Zs", "iIuz*i", file_id, types, max_objs, oid_list);
if(file_id != (hid_t)H5F_OBJ_ALL && (NULL == (f = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))))
@@ -503,7 +490,7 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_obj_ids)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* H5F_get_objects doesn't fail */
ret_value = H5F_get_objects(f, types, max_objs, oid_list, app_ref);
@@ -532,7 +519,7 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_
H5F_olist_t olist; /* Structure to hold search results */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_objects)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set up search information */
olist.obj_id_list = (max_index==0 ? NULL : obj_id_list);
@@ -616,7 +603,7 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
H5F_olist_t *olist = (H5F_olist_t *)key; /* Alias for search info */
int ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_get_objects_cb)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_ptr);
HDassert(olist);
@@ -736,7 +723,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle)
H5F_t *file; /* File to query */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_vfd_handle, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii**x", file_id, fapl, file_handle);
/* Check args */
@@ -782,7 +769,7 @@ H5Fis_hdf5(const char *name)
H5FD_t *file = NULL; /* Low-level file struct */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fis_hdf5, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "*s", name);
/* Check args and all the boring stuff. */
@@ -833,7 +820,7 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
{
H5F_t *f = NULL, *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5F_new)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (f = H5FL_CALLOC(H5F_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure")
@@ -934,7 +921,7 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
* merged into the trunk and journaling is enabled, at least until
* we make it work. - QAK)
*/
- f->shared->use_tmp_space = !(IS_H5FD_MPI(f));
+ f->shared->use_tmp_space = !H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI);
/*
* Create a metadata cache with the specified number of elements.
@@ -994,7 +981,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -1180,7 +1167,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
H5F_close_degree_t fc_degree; /*file close degree */
H5F_t *ret_value; /*actual return value */
- FUNC_ENTER_NOAPI(H5F_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* If the driver has a `cmp' method then the driver is capable of
@@ -1408,7 +1395,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
H5F_t *new_file = NULL; /*file struct for new file */
hid_t ret_value; /*return value */
- FUNC_ENTER_API(H5Fcreate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id);
/* Check/fix arguments */
@@ -1514,7 +1501,7 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
H5F_t *new_file = NULL; /*file struct for new file */
hid_t ret_value; /*return value */
- FUNC_ENTER_API(H5Fopen, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "*sIui", filename, flags, fapl_id);
/* Check/fix arguments. */
@@ -1576,7 +1563,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
H5O_loc_t *oloc = NULL; /* Object location for ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iFs", object_id, scope);
switch(H5I_get_type(object_id)) {
@@ -1693,7 +1680,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check arguments */
HDassert(f);
@@ -1762,7 +1749,7 @@ H5F_close(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -1822,7 +1809,7 @@ H5F_try_close(H5F_t *f)
unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_try_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -1981,7 +1968,7 @@ H5Fclose(hid_t file_id)
int nref;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Fclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
/* Check/fix arguments. */
@@ -2043,7 +2030,7 @@ H5Freopen(hid_t file_id)
H5F_t *new_file = NULL;
hid_t ret_value;
- FUNC_ENTER_API(H5Freopen, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", file_id);
/* Check arguments */
@@ -2094,7 +2081,7 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Fget_intent, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", file_id, intent_flags);
/* If no intent flags were passed in, exit quietly */
@@ -2148,7 +2135,7 @@ H5F_get_id(H5F_t *file, hbool_t app_ref)
{
hid_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5F_get_id)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
@@ -2187,8 +2174,8 @@ done:
unsigned
H5F_incr_nopen_objs(H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_incr_nopen_objs)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -2214,8 +2201,8 @@ H5F_incr_nopen_objs(H5F_t *f)
unsigned
H5F_decr_nopen_objs(H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_decr_nopen_objs)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -2245,7 +2232,7 @@ H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *na
hid_t new_fapl_id = -1; /* ID for duplicated FAPL */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_build_actual_name)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -2355,8 +2342,8 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr)
{
unsigned u; /* Local index variable */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_addr_encode_len)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(addr_len);
HDassert(pp && *pp);
@@ -2394,8 +2381,8 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr)
void
H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_addr_encode)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -2428,8 +2415,8 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr
hbool_t all_zero = TRUE; /* True if address was all zeroes */
unsigned u; /* Local index variable */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_addr_decode_len)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(addr_len);
HDassert(pp && *pp);
@@ -2493,8 +2480,8 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr
void
H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*out*/)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_addr_decode)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -2525,7 +2512,7 @@ H5Fget_freespace(hid_t file_id)
hsize_t tot_space; /* Amount of free space in the file */
hssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_freespace, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", file_id);
/* Check args */
@@ -2568,7 +2555,7 @@ H5Fget_filesize(hid_t file_id, hsize_t *size)
haddr_t eof; /* End of file address */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_filesize, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", file_id, size);
/* Check args */
@@ -2610,7 +2597,7 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
H5F_t *file; /* File object for file ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_mdc_config, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
/* Check args */
@@ -2649,7 +2636,7 @@ H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
H5F_t *file; /* File object for file ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fset_mdc_config, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", file_id, config_ptr);
/* Check args */
@@ -2687,7 +2674,7 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
H5F_t *file; /* File object for file ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_mdc_hit_rate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*d", file_id, hit_rate_ptr);
/* Check args */
@@ -2731,7 +2718,7 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
int32_t cur_num_entries;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_mdc_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*z*z*z*Is", file_id, max_size_ptr, min_clean_size_ptr,
cur_size_ptr, cur_num_entries_ptr);
@@ -2778,7 +2765,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id)
H5F_t *file; /* File object for file ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Freset_mdc_hit_rate_stats, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
/* Check args */
@@ -2823,7 +2810,7 @@ H5Fget_name(hid_t obj_id, char *name/*out*/, size_t size)
size_t len;
ssize_t ret_value;
- FUNC_ENTER_API (H5Fget_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "ixz", obj_id, name, size);
/* For file IDs, get the file object directly */
@@ -2882,7 +2869,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
H5F_t *f; /* Top file in mount hierarchy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_info2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", obj_id, finfo);
/* Check args */
@@ -2955,7 +2942,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
H5F_t *file; /* Top file in mount hierarchy */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Fget_free_sections, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Zs", "iFmzx", file_id, type, nsects, sect_info);
/* Check args */
@@ -2993,7 +2980,7 @@ H5Fclear_elink_file_cache(hid_t file_id)
H5F_t *file; /* File */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fclear_elink_file_cache, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", file_id);
/* Check args */
@@ -3009,3 +2996,149 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fclear_elink_file_cache() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_set_grp_btree_shared
+ *
+ * Purpose: Set the grp_btree_shared field with a valid ref-count pointer.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * 7/19/11
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_set_grp_btree_shared(H5F_t *f, H5RC_t *rc)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(rc);
+
+ f->shared->grp_btree_shared = rc;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_set_grp_btree_shared() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_set_sohm_addr
+ *
+ * Purpose: Set the sohm_addr field with a new value.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * 7/20/11
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_set_sohm_addr(H5F_t *f, haddr_t addr)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+
+ f->shared->sohm_addr = addr;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_set_sohm_addr() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_set_sohm_vers
+ *
+ * Purpose: Set the sohm_vers field with a new value.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * 7/20/11
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_set_sohm_vers(H5F_t *f, unsigned vers)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+
+ f->shared->sohm_vers = vers;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_set_sohm_vers() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_set_sohm_nindexes
+ *
+ * Purpose: Set the sohm_nindexes field with a new value.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * 7/20/11
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+
+ f->shared->sohm_nindexes = nindexes;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_set_sohm_nindexes() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_set_store_msg_crt_idx
+ *
+ * Purpose: Set the store_msg_crt_idx field with a new value.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * 7/20/11
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+
+ f->shared->store_msg_crt_idx = flag;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_set_store_msg_crt_idx() */
+
diff --git a/src/H5FD.c b/src/H5FD.c
index d0683e1..66fa3b9 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -43,17 +43,6 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FDpkg.h" /* File Drivers */
-#include "H5FDcore.h" /* Files stored entirely in memory */
-#include "H5FDfamily.h" /* File families */
-#include "H5FDlog.h" /* sec2 driver with I/O logging (for debugging) */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5FDmulti.h" /* Usage-partitioned file family */
-#include "H5FDsec2.h" /* POSIX unbuffered file I/O */
-#include "H5FDstdio.h" /* Standard C buffered I/O */
-#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
-#endif
-#include "H5FDdirect.h" /* Direct file I/O */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
@@ -108,7 +97,7 @@ static herr_t H5FD_free_cls(H5FD_class_t *cls);
* object and the file is closed and re-opened, the 'fileno' value will
* be different.
*/
-static unsigned long file_serial_no;
+static unsigned long H5FD_file_serial_no_g;
/*-------------------------------------------------------------------------
@@ -129,7 +118,7 @@ H5FD_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -158,13 +147,13 @@ H5FD_init_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
if(H5I_register_type(H5I_VFL, (size_t)H5I_VFL_HASHSIZE, 0, (H5I_free_t)H5FD_free_cls)<H5I_FILE)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the file serial numbers */
- file_serial_no = 0;
+ H5FD_file_serial_no_g = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -196,31 +185,11 @@ H5FD_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
if((n=H5I_nmembers(H5I_VFL))!=0) {
H5I_clear_type(H5I_VFL, FALSE, FALSE);
-
- /* Reset the VFL drivers, if they've been closed */
- if(H5I_nmembers(H5I_VFL)==0) {
- H5FD_sec2_term();
-#ifdef H5_HAVE_DIRECT
- H5FD_direct_term();
-#endif
- H5FD_log_term();
- H5FD_stdio_term();
-#ifdef H5_HAVE_WINDOWS
- H5FD_windows_term();
-#endif
- H5FD_family_term();
- H5FD_core_term();
- H5FD_multi_term();
-#ifdef H5_HAVE_PARALLEL
- H5FD_mpio_term();
- H5FD_mpiposix_term();
-#endif /* H5_HAVE_PARALLEL */
- } /* end if */
} else {
H5I_dec_type_ref(H5I_VFL);
H5_interface_initialize_g = 0;
@@ -252,11 +221,24 @@ H5FD_term_interface(void)
static herr_t
H5FD_free_cls(H5FD_class_t *cls)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_free_cls)
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Sanity check */
+ HDassert(cls);
+
+ /* If the file driver has a terminate callback, call it to give the file
+ * driver a chance to free singletons or other resources which will become
+ * invalid once the class structure is freed.
+ */
+ if(cls->terminate && cls->terminate() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEOBJ, FAIL, "virtual file driver '%s' did not terminate cleanly", cls->name)
H5MM_xfree(cls);
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_free_cls() */
@@ -290,7 +272,7 @@ H5FDregister(const H5FD_class_t *cls)
hid_t ret_value;
H5FD_mem_t type;
- FUNC_ENTER_API(H5FDregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "*x", cls);
/* Check arguments */
@@ -352,7 +334,7 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
H5FD_mem_t type;
hid_t ret_value;
- FUNC_ENTER_NOAPI(H5FD_register, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
HDassert(cls);
@@ -403,7 +385,7 @@ H5FDunregister(hid_t driver_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDunregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", driver_id);
/* Check arguments */
@@ -444,7 +426,7 @@ H5FD_get_class(hid_t id)
{
H5FD_class_t *ret_value = NULL;
- FUNC_ENTER_NOAPI(H5FD_get_class, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(H5I_VFL == H5I_get_type(id))
ret_value = (H5FD_class_t *)H5I_object(id);
@@ -497,7 +479,7 @@ H5FD_sb_size(H5FD_t *file)
{
hsize_t ret_value=0;
- FUNC_ENTER_NOAPI(H5FD_sb_size, 0)
+ FUNC_ENTER_NOAPI(0)
assert(file && file->cls);
@@ -535,7 +517,7 @@ H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_sb_encode, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(file && file->cls);
if(file->cls->sb_encode &&
@@ -565,7 +547,7 @@ H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_sb_decode, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
if(file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
@@ -602,7 +584,7 @@ H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size, const void *old_p
void *new_pl = NULL; /* Copy of property list */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_pl_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Copy old pl, if one exists */
if(old_pl) {
@@ -647,7 +629,7 @@ H5FD_pl_close(hid_t driver_id, herr_t (*free_func)(void *), void *pl)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_pl_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allow driver to free or do it ourselves */
if(pl && free_func) {
@@ -697,7 +679,7 @@ H5FD_fapl_get(H5FD_t *file)
{
void *ret_value=NULL;
- FUNC_ENTER_NOAPI(H5FD_fapl_get, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(file);
@@ -731,7 +713,7 @@ H5FD_fapl_open(H5P_genplist_t *plist, hid_t driver_id, const void *driver_info)
void *copied_driver_info = NULL; /* Temporary VFL driver info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_fapl_open, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Increment the reference count on driver and copy driver info */
if(H5I_inc_ref(driver_id, FALSE) < 0)
@@ -778,7 +760,7 @@ H5FD_fapl_copy(hid_t driver_id, const void *old_fapl, void **copied_fapl)
H5FD_class_t *driver;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_fapl_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
@@ -814,7 +796,7 @@ H5FD_fapl_close(hid_t driver_id, void *fapl)
H5FD_class_t *driver = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_fapl_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(driver_id > 0) {
@@ -853,7 +835,7 @@ H5FD_dxpl_open(H5P_genplist_t *plist, hid_t driver_id, const void *driver_info)
void *copied_driver_info = NULL; /* Temporary VFL driver info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_dxpl_open, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Increment the reference count on the driver and copy the driver info */
if(H5I_inc_ref(driver_id, FALSE) < 0)
@@ -899,7 +881,7 @@ H5FD_dxpl_copy(hid_t driver_id, const void *old_dxpl, void **copied_dxpl)
H5FD_class_t *driver;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_dxpl_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(NULL == (driver = (H5FD_class_t *)H5I_object(driver_id)))
@@ -935,7 +917,7 @@ H5FD_dxpl_close(hid_t driver_id, void *dxpl)
H5FD_class_t *driver;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_dxpl_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(driver_id > 0) {
@@ -1012,7 +994,7 @@ H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_t *ret_value=NULL;
- FUNC_ENTER_API(H5FDopen, NULL)
+ FUNC_ENTER_API(NULL)
/* Check arguments */
if(H5P_DEFAULT == fapl_id)
@@ -1059,7 +1041,7 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5P_genplist_t *plist; /* Property list pointer */
H5FD_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
if(0 == maxaddr)
@@ -1104,11 +1086,11 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to query file driver")
/* Increment the global serial number & assign it to this H5FD_t object */
- if(++file_serial_no == 0) {
+ if(++H5FD_file_serial_no_g == 0) {
/* (Just error out if we wrap around for now...) */
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to get file serial number")
} /* end if */
- file->fileno = file_serial_no;
+ file->fileno = H5FD_file_serial_no_g;
/* Start with base address set to 0 */
/* (This will be changed later, when the superblock is located) */
@@ -1145,7 +1127,7 @@ H5FDclose(H5FD_t *file)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", file);
if(!file || !file->cls)
@@ -1178,7 +1160,7 @@ H5FD_close(H5FD_t *file)
const H5FD_class_t *driver;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(file && file->cls);
@@ -1230,7 +1212,7 @@ H5FDcmp(const H5FD_t *f1, const H5FD_t *f2)
{
int ret_value;
- FUNC_ENTER_API(H5FDcmp, -1) /*return value is arbitrary*/
+ FUNC_ENTER_API(-1) /*return value is arbitrary*/
H5TRACE2("Is", "*x*x", f1, f2);
ret_value = H5FD_cmp(f1, f2);
@@ -1261,7 +1243,7 @@ H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2)
{
int ret_value;
- FUNC_ENTER_NOAPI(H5FD_cmp, -1) /*return value is arbitrary*/
+ FUNC_ENTER_NOAPI(-1) /*return value is arbitrary*/
if((!f1 || !f1->cls) && (!f2 || !f2->cls))
HGOTO_DONE(0)
@@ -1311,7 +1293,7 @@ H5FDquery(const H5FD_t *f, unsigned long *flags/*out*/)
{
int ret_value;
- FUNC_ENTER_API(H5FDquery, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("Is", "*xx", f, flags);
assert(f);
@@ -1345,7 +1327,7 @@ H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/)
{
int ret_value=0;
- FUNC_ENTER_NOAPI(H5FD_query, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(f);
assert(flags);
@@ -1405,7 +1387,7 @@ H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_API(H5FDalloc, HADDR_UNDEF)
+ FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE4("a", "*xMtih", file, type, dxpl_id, size);
/* Check args */
@@ -1459,7 +1441,7 @@ H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t siz
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDfree, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xMtiah", file, type, dxpl_id, addr, size);
/* Check args */
@@ -1502,7 +1484,7 @@ H5FDget_eoa(H5FD_t *file, H5FD_mem_t type)
{
haddr_t ret_value;
- FUNC_ENTER_API(H5FDget_eoa, HADDR_UNDEF)
+ FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE2("a", "*xMt", file, type);
/* Check args */
@@ -1552,7 +1534,7 @@ H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDset_eoa, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xMta", file, type, addr);
/* Check args */
@@ -1604,7 +1586,7 @@ H5FDget_eof(H5FD_t *file)
{
haddr_t ret_value;
- FUNC_ENTER_API(H5FDget_eof, HADDR_UNDEF)
+ FUNC_ENTER_API(HADDR_UNDEF)
H5TRACE1("a", "*x", file);
/* Check arguments */
@@ -1641,7 +1623,7 @@ H5FD_get_maxaddr(const H5FD_t *file)
{
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_get_maxaddr, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(file);
@@ -1669,7 +1651,7 @@ done:
herr_t
H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_get_feature_flags)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
HDassert(feature_flags);
@@ -1699,7 +1681,7 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_get_fs_type_map, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(file && file->cls);
@@ -1747,7 +1729,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDread, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiazx", file, type, dxpl_id, addr, size, buf);
/* Check args */
@@ -1798,7 +1780,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDwrite, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiaz*x", file, type, dxpl_id, addr, size, buf);
/* Check args */
@@ -1847,7 +1829,7 @@ H5FDflush(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xiIu", file, dxpl_id, closing);
/* Check args */
@@ -1886,7 +1868,7 @@ H5FD_flush(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
@@ -1916,7 +1898,7 @@ H5FDtruncate(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5FDtruncate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xiIu", file, dxpl_id, closing);
/* Check args */
@@ -1955,7 +1937,7 @@ H5FD_truncate(H5FD_t *file, hid_t dxpl_id, unsigned closing)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_truncate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
@@ -1984,9 +1966,7 @@ done:
herr_t
H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_get_fileno, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
HDassert(filenum);
@@ -1994,8 +1974,7 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
/* Retrieve the file's serial number */
*filenum = file->fileno;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_get_fileno() */
@@ -2019,7 +1998,7 @@ H5FDget_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle)
{
herr_t ret_value;
- FUNC_ENTER_API(H5FDget_vfd_handle, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "*xi**x", file, fapl, file_handle);
/* Check arguments */
@@ -2050,7 +2029,7 @@ H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void **file_handle)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_get_vfd_handle, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(file);
@@ -2081,9 +2060,7 @@ done:
herr_t
H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_set_base_addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
HDassert(H5F_addr_defined(base_addr));
@@ -2091,8 +2068,7 @@ H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr)
/* Set the file's base address */
file->base_addr = base_addr;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_set_base_addr() */
@@ -2112,16 +2088,11 @@ done:
haddr_t
H5FD_get_base_addr(const H5FD_t *file)
{
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_get_base_addr, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
/* Return the file's base address */
- ret_value = file->base_addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->base_addr)
} /* end H5FD_get_base_addr() */
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index a4ba64a..7fa0e7c 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -53,7 +53,7 @@ typedef struct H5FD_core_t {
hbool_t backing_store; /*write to file name on flush */
int fd; /*backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
-#ifndef _WIN32
+#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -66,7 +66,7 @@ typedef struct H5FD_core_t {
#endif /*H5_VMS*/
#else
/*
- * On _WIN32 the low-order word of a unique identifier associated with the
+ * On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -114,6 +114,7 @@ typedef struct H5FD_core_fapl_t {
(size_t)((A)+(Z))<(size_t)(A))
/* Prototypes */
+static herr_t H5FD_core_term(void);
static void *H5FD_core_fapl_get(H5FD_t *_file);
static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
@@ -135,6 +136,7 @@ static const H5FD_class_t H5FD_core_g = {
"core", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /*fc_degree */
+ H5FD_core_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -182,7 +184,7 @@ DESCRIPTION
static herr_t
H5FD_core_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_core_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_core_init())
} /* H5FD_core_init_interface() */
@@ -210,7 +212,7 @@ H5FD_core_init(void)
{
hid_t ret_value=H5FD_CORE_g; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if (H5I_VFL!=H5Iget_type(H5FD_CORE_g))
H5FD_CORE_g = H5FD_register(&H5FD_core_g,sizeof(H5FD_class_t),FALSE);
@@ -228,24 +230,22 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_core_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_core_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_CORE_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_core_term() */
@@ -279,7 +279,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_core, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "izb", fapl_id, increment, backing_store);
/* Check argument */
@@ -326,7 +326,7 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fapl_core, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, increment, backing_store);
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -369,7 +369,7 @@ H5FD_core_fapl_get(H5FD_t *_file)
H5FD_core_fapl_t *fa;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_fapl_get, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (fa = (H5FD_core_fapl_t *)H5MM_calloc(sizeof(H5FD_core_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -419,7 +419,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
H5FD_core_t *file=NULL;
H5FD_core_fapl_t *fa=NULL;
H5P_genplist_t *plist; /* Property list pointer */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -427,7 +427,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
int fd=-1;
H5FD_t *ret_value;
- FUNC_ENTER_NOAPI(H5FD_core_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(!name || !*name)
@@ -476,12 +476,12 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
if(fd >= 0) {
/* Retrieve information for determining uniqueness of file */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
file->fileindexlo = fileinfo.nFileIndexLow;
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
#ifdef H5_VMS
file->inode[0] = sb.st_ino[0];
@@ -491,7 +491,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
file->inode = sb.st_ino;
#endif /* H5_VMS */
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
} /* end if */
/* If an existing file is opened, load the whole file into memory. */
@@ -548,7 +548,7 @@ H5FD_core_close(H5FD_t *_file)
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Flush any changed buffers */
if(H5FD_core_flush(_file, (hid_t)-1, TRUE) < 0)
@@ -601,11 +601,11 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_core_t *f2 = (const H5FD_core_t*)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI(H5FD_core_cmp, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(f1->fd >= 0 && f2->fd >= 0) {
/* Compare low level file information for backing store */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -633,7 +633,7 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1)
#endif /* H5_VMS */
-#endif /*_WIN32*/
+#endif /*H5_HAVE_WIN32_API*/
} /* end if */
else {
if (NULL==f1->name && NULL==f2->name) {
@@ -676,7 +676,7 @@ H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
const H5FD_core_t *file = (const H5FD_core_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_core_query)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -720,15 +720,10 @@ static haddr_t
H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_core_t *file = (const H5FD_core_t*)_file;
- haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* Set return value */
- ret_value=file->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eoa)
}
@@ -759,7 +754,7 @@ H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(ADDR_OVERFLOW(addr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow")
@@ -794,17 +789,11 @@ done:
static haddr_t
H5FD_core_get_eof(const H5FD_t *_file)
{
- haddr_t ret_value; /* Return value */
-
const H5FD_core_t *file = (const H5FD_core_t*)_file;
- FUNC_ENTER_NOAPI(H5FD_core_get_eof, HADDR_UNDEF)
-
- /* Set return value */
- ret_value=MAX(file->eof, file->eoa);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
}
@@ -828,7 +817,7 @@ H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
H5FD_core_t *file = (H5FD_core_t *)_file; /* core VFD info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_get_handle, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
if(!file_handle)
@@ -897,7 +886,7 @@ H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_read, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file && file->pub.cls);
assert(buf);
@@ -970,7 +959,7 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_write, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -998,7 +987,7 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
/* (Re)allocate memory for the file buffer */
if(NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
#ifdef H5_CLEAR_MEMORY
HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
#endif /* H5_CLEAR_MEMORY */
@@ -1042,7 +1031,7 @@ H5FD_core_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_flush, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Write to backing store */
if (file->dirty && file->fd>=0 && file->backing_store) {
@@ -1094,7 +1083,7 @@ H5FD_core_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
size_t new_eof; /* New size of memory buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_core_truncate, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
diff --git a/src/H5FDcore.h b/src/H5FDcore.h
index dca110e..16cce89 100644
--- a/src/H5FDcore.h
+++ b/src/H5FDcore.h
@@ -17,20 +17,17 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Monday, August 2, 1999
*
- * Purpose: The public header file for the sec2 driver.
+ * Purpose: The public header file for the core driver.
*/
#ifndef H5FDcore_H
#define H5FDcore_H
-#include "H5Ipublic.h"
-
#define H5FD_CORE (H5FD_core_init())
#ifdef __cplusplus
extern "C" {
#endif
H5_DLL hid_t H5FD_core_init(void);
-H5_DLL void H5FD_core_term(void);
H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment,
hbool_t backing_store);
H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
@@ -40,3 +37,4 @@ H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
#endif
#endif
+
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 214dd8d..8bb613c 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -17,27 +17,27 @@
* Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
* Wednesday, 20 September 2006
*
- * Purpose: The Direct I/O file driver forces the data to be written to
- * the file directly without being copied into system kernel
- * buffer. The main system support this feature is Linux.
+ * Purpose: The Direct I/O file driver forces the data to be written to
+ * the file directly without being copied into system kernel
+ * buffer. The main system support this feature is Linux.
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_direct_init_interface
+#define H5_INTERFACE_INIT_FUNC H5FD_direct_init_interface
/* For system function posix_memalign - Commented it out because copper isn't able to compile
* this file. */
/* #define _XOPEN_SOURCE 600 */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDdirect.h" /* Direct file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDdirect.h" /* Direct file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_DIRECT
@@ -45,15 +45,15 @@
static hid_t H5FD_DIRECT_g = 0;
/* File operations */
-#define OP_UNKNOWN 0
-#define OP_READ 1
-#define OP_WRITE 2
+#define OP_UNKNOWN 0
+#define OP_READ 1
+#define OP_WRITE 2
/* Driver-specific file access properties */
typedef struct H5FD_direct_fapl_t {
- size_t mboundary; /* Memory boundary for alignment */
- size_t fbsize; /* File system block size */
- size_t cbsize; /* Maximal buffer size for copying user data */
+ size_t mboundary; /* Memory boundary for alignment */
+ size_t fbsize; /* File system block size */
+ size_t cbsize; /* Maximal buffer size for copying user data */
hbool_t must_align; /* Decides if data alignment is required */
} H5FD_direct_fapl_t;
@@ -70,27 +70,27 @@ typedef struct H5FD_direct_fapl_t {
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_direct_t {
- H5FD_t pub; /*public stuff, must be first */
- int fd; /*the unix file */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- int op; /*last operation */
- H5FD_direct_fapl_t fa; /*file access properties */
-#ifndef _WIN32
+ H5FD_t pub; /*public stuff, must be first */
+ int fd; /*the unix file */
+ haddr_t eoa; /*end of allocated region */
+ haddr_t eof; /*end of file; current file size*/
+ haddr_t pos; /*current file I/O position */
+ int op; /*last operation */
+ H5FD_direct_fapl_t fa; /*file access properties */
+#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
*/
- dev_t device; /*file device number */
+ dev_t device; /*file device number */
#ifdef H5_VMS
- ino_t inode[3]; /*file i-node number */
+ ino_t inode[3]; /*file i-node number */
#else
- ino_t inode; /*file i-node number */
+ ino_t inode; /*file i-node number */
#endif /*H5_VMS*/
#else
/*
- * On _WIN32 the low-order word of a unique identifier associated with the
+ * On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -111,57 +111,58 @@ typedef struct H5FD_direct_t {
* some macros here so we don't have to have conditional compilations later
* throughout the code.
*
- * file_offset_t: The datatype for file offsets, the second argument of
- * the lseek() or lseek64() call.
+ * file_offset_t: The datatype for file offsets, the second argument of
+ * the lseek() or lseek64() call.
*
- * file_seek: The function which adjusts the current file position,
- * either lseek() or lseek64().
+ * file_seek: The function which adjusts the current file position,
+ * either lseek() or lseek64().
*/
/* adding for windows NT file system support. */
#ifdef H5_HAVE_LSEEK64
-# define file_offset_t off64_t
-# define file_seek lseek64
-# define file_truncate ftruncate64
-#elif defined (_WIN32)
+# define file_offset_t off64_t
+# define file_seek lseek64
+# define file_truncate ftruncate64
+#elif defined (H5_HAVE_WIN32_API)
# /*MSVC*/
# define file_offset_t __int64
# define file_seek _lseeki64
-# define file_truncate _chsize
+# define file_truncate _chsize
#else
-# define file_offset_t off_t
-# define file_seek lseek
-# define file_truncate HDftruncate
+# define file_offset_t off_t
+# define file_seek lseek
+# define file_truncate HDftruncate
#endif
/*
* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely by the second
+ * argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (file_offset_t)((A)+(Z))<(file_offset_t)(A))
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
+ ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ HADDR_UNDEF==(A)+(Z) || \
+ (file_offset_t)((A)+(Z))<(file_offset_t)(A))
/* Prototypes */
+static herr_t H5FD_direct_term(void);
static void *H5FD_direct_fapl_get(H5FD_t *file);
static void *H5FD_direct_fapl_copy(const void *_old_fa);
static H5FD_t *H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_direct_close(H5FD_t *_file);
static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags);
@@ -170,43 +171,44 @@ static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_direct_get_eof(const H5FD_t *_file);
static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
+ size_t size, void *buf);
static herr_t H5FD_direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
+ size_t size, const void *buf);
static herr_t H5FD_direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_direct_g = {
- "direct", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_direct_fapl_t), /*fapl_size */
- H5FD_direct_fapl_get, /*fapl_get */
- H5FD_direct_fapl_copy, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_direct_open, /*open */
- H5FD_direct_close, /*close */
- H5FD_direct_cmp, /*cmp */
- H5FD_direct_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_direct_get_eoa, /*get_eoa */
- H5FD_direct_set_eoa, /*set_eoa */
- H5FD_direct_get_eof, /*get_eof */
+ "direct", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_direct_term, /*terminate */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_direct_fapl_t), /*fapl_size */
+ H5FD_direct_fapl_get, /*fapl_get */
+ H5FD_direct_fapl_copy, /*fapl_copy */
+ NULL, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_direct_open, /*open */
+ H5FD_direct_close, /*close */
+ H5FD_direct_cmp, /*cmp */
+ H5FD_direct_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_direct_get_eoa, /*get_eoa */
+ H5FD_direct_set_eoa, /*set_eoa */
+ H5FD_direct_get_eof, /*get_eof */
H5FD_direct_get_handle, /*get_handle */
- H5FD_direct_read, /*read */
- H5FD_direct_write, /*write */
- NULL, /*flush */
- H5FD_direct_truncate, /*truncate */
+ H5FD_direct_read, /*read */
+ H5FD_direct_write, /*write */
+ NULL, /*flush */
+ H5FD_direct_truncate, /*truncate */
NULL, /*lock */
NULL, /*unlock */
- H5FD_FLMAP_SINGLE /*fl_map */
+ H5FD_FLMAP_SINGLE /*fl_map */
};
/* Declare a free list to manage the H5FD_direct_t struct */
@@ -229,23 +231,23 @@ DESCRIPTION
static herr_t
H5FD_direct_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_direct_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_direct_init())
} /* H5FD_direct_init_interface() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_init
+ * Function: H5FD_direct_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the direct driver.
+ * Return: Success: The driver ID for the direct driver.
*
- * Failure: Negative.
+ * Failure: Negative.
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -257,7 +259,7 @@ H5FD_direct_init(void)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_direct_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if (H5I_VFL!=H5I_get_type(H5FD_DIRECT_g))
H5FD_DIRECT_g = H5FD_register(&H5FD_direct_g,sizeof(H5FD_class_t),FALSE);
@@ -271,42 +273,40 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_direct_term
+ * Function: H5FD_direct_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_direct_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_direct_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_DIRECT_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_direct_term() */
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_direct
+ * Function: H5Pset_fapl_direct
*
- * Purpose: Modify the file access property list to use the H5FD_DIRECT
- * driver defined in this source file. There are no driver
- * specific properties.
+ * Purpose: Modify the file access property list to use the H5FD_DIRECT
+ * driver defined in this source file. There are no driver
+ * specific properties.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, 20 September 2006
+ * Programmer: Raymond Lu
+ * Wednesday, 20 September 2006
*
* Modifications:
*
@@ -315,28 +315,28 @@ H5FD_direct_term(void)
herr_t
H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbuf_size)
{
- H5P_genplist_t *plist; /* Property list pointer */
- H5FD_direct_fapl_t fa;
- herr_t ret_value;
+ H5P_genplist_t *plist; /* Property list pointer */
+ H5FD_direct_fapl_t fa;
+ herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_direct, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "izzz", fapl_id, boundary, block_size, cbuf_size);
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
if(boundary != 0)
- fa.mboundary = boundary;
+ fa.mboundary = boundary;
else
- fa.mboundary = MBOUNDARY_DEF;
+ fa.mboundary = MBOUNDARY_DEF;
if(block_size != 0)
- fa.fbsize = block_size;
+ fa.fbsize = block_size;
else
- fa.fbsize = FBSIZE_DEF;
+ fa.fbsize = FBSIZE_DEF;
if(cbuf_size != 0)
- fa.cbsize = cbuf_size;
+ fa.cbsize = cbuf_size;
else
- fa.cbsize = CBSIZE_DEF;
+ fa.cbsize = CBSIZE_DEF;
/* Set the default to be true for data alignment */
fa.must_align = TRUE;
@@ -353,16 +353,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_direct
+ * Function: H5Pget_fapl_direct
*
- * Purpose: Returns information about the direct file access property
- * list though the function arguments.
+ * Purpose: Returns information about the direct file access property
+ * list though the function arguments.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, October 18, 2006
*
* Modifications:
@@ -371,13 +371,13 @@ done:
*/
herr_t
H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/, size_t *block_size/*out*/,
- size_t *cbuf_size/*out*/)
+ size_t *cbuf_size/*out*/)
{
- H5FD_direct_fapl_t *fa;
+ H5FD_direct_fapl_t *fa;
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fapl_direct, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "ixxx", fapl_id, boundary, block_size, cbuf_size);
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
@@ -389,9 +389,9 @@ H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/, size_t *block_size/*o
if (boundary)
*boundary = fa->mboundary;
if (block_size)
- *block_size = fa->fbsize;
+ *block_size = fa->fbsize;
if (cbuf_size)
- *cbuf_size = fa->cbsize;
+ *cbuf_size = fa->cbsize;
done:
FUNC_LEAVE_API(ret_value)
@@ -399,18 +399,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_fapl_get
+ * Function: H5FD_direct_fapl_get
*
- * Purpose: Returns a file access property list which indicates how the
- * specified file is being accessed. The return list could be
- * used to access another file the same way.
+ * Purpose: Returns a file access property list which indicates how the
+ * specified file is being accessed. The return list could be
+ * used to access another file the same way.
*
- * Return: Success: Ptr to new file access property list with all
- * members copied from the file struct.
+ * Return: Success: Ptr to new file access property list with all
+ * members copied from the file struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
* Modifications:
@@ -420,10 +420,10 @@ done:
static void *
H5FD_direct_fapl_get(H5FD_t *_file)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_direct_fapl_get, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set return value */
ret_value= H5FD_direct_fapl_copy(&(file->fa));
@@ -434,15 +434,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_fapl_copy
+ * Function: H5FD_direct_fapl_copy
*
- * Purpose: Copies the direct-specific file access properties.
+ * Purpose: Copies the direct-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
* Modifications:
@@ -454,35 +454,30 @@ H5FD_direct_fapl_copy(const void *_old_fa)
{
const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t*)_old_fa;
H5FD_direct_fapl_t *new_fa = H5MM_malloc(sizeof(H5FD_direct_fapl_t));
- void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_direct_fapl_copy, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(new_fa);
/* Copy the general information */
HDmemcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
- /* Set return value */
- ret_value=new_fa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(new_fa)
} /* end H5FD_direct_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_open
+ * Function: H5FD_direct_open
*
- * Purpose: Create and/or opens a Unix file for direct I/O as an HDF5 file.
+ * Purpose: Create and/or opens a Unix file for direct I/O as an HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -492,20 +487,20 @@ done:
static H5FD_t *
H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- int o_flags;
- int fd=(-1);
- H5FD_direct_t *file=NULL;
- H5FD_direct_fapl_t *fa;
-#ifdef _WIN32
- HFILE filehandle;
+ int o_flags;
+ int fd=(-1);
+ H5FD_direct_t *file=NULL;
+ H5FD_direct_fapl_t *fa;
+#ifdef H5_HAVE_WIN32_API
+ HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- H5P_genplist_t *plist; /* Property list */
+ h5_stat_t sb;
+ H5P_genplist_t *plist; /* Property list */
int *buf1, *buf2;
- H5FD_t *ret_value;
+ H5FD_t *ret_value;
- FUNC_ENTER_NOAPI(H5FD_direct_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check on file offsets */
assert(sizeof(file_offset_t)>=sizeof(size_t));
@@ -547,7 +542,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -561,7 +556,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
#else
file->inode = sb.st_ino;
#endif /*H5_VMS*/
-#endif /*_WIN32*/
+#endif /*H5_HAVE_WIN32_API*/
file->fa.mboundary = fa->mboundary;
file->fa.fbsize = fa->fbsize;
file->fa.cbsize = fa->cbsize;
@@ -572,7 +567,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
*/
buf1 = (int*)HDmalloc(sizeof(int));
if (HDposix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "HDposix_memalign failed")
if(o_flags & O_CREAT) {
if(write(file->fd, (void*)buf1, sizeof(int))<0) {
@@ -626,15 +621,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_close
+ * Function: H5FD_direct_close
*
- * Purpose: Closes the file.
+ * Purpose: Closes the file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, file not closed.
+ * Failure: -1, file not closed.
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -644,10 +639,10 @@ done:
static herr_t
H5FD_direct_close(H5FD_t *_file)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_direct_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if (HDclose(file->fd)<0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
@@ -660,17 +655,17 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_cmp
+ * Function: H5FD_direct_cmp
*
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
+ * Purpose: Compares two files belonging to this driver using an
+ * arbitrary (but consistent) ordering.
*
- * Return: Success: A value like strcmp()
+ * Return: Success: A value like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
@@ -680,13 +675,13 @@ done:
static int
H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_direct_t *f1 = (const H5FD_direct_t*)_f1;
- const H5FD_direct_t *f2 = (const H5FD_direct_t*)_f2;
+ const H5FD_direct_t *f1 = (const H5FD_direct_t*)_f1;
+ const H5FD_direct_t *f2 = (const H5FD_direct_t*)_f2;
int ret_value=0;
- FUNC_ENTER_NOAPI(H5FD_direct_cmp, H5FD_VFD_DEFAULT)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -722,16 +717,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_query
+ * Function: H5FD_direct_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
@@ -741,9 +736,7 @@ done:
static herr_t
H5FD_direct_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
- herr_t ret_value=SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_direct_query, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -754,23 +747,22 @@ H5FD_direct_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_get_eoa
+ * Function: H5FD_direct_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -783,31 +775,26 @@ done:
static haddr_t
H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
- const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- haddr_t ret_value; /* Return value */
+ const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- FUNC_ENTER_NOAPI(H5FD_direct_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* Set return value */
- ret_value=file->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_set_eoa
+ * Function: H5FD_direct_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -820,32 +807,30 @@ done:
static herr_t
H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
- FUNC_ENTER_NOAPI(H5FD_direct_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
file->eoa = addr;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_get_eof
+ * Function: H5FD_direct_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the Unix end-of-file or the HDF5 end-of-address
- * markers.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the Unix end-of-file or the HDF5 end-of-address
+ * markers.
*
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the Unix file
- * or the HDF5 file.
+ * Return: Success: End of file address, the first address past
+ * the end of the "file", either the Unix file
+ * or the HDF5 file.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
@@ -855,16 +840,11 @@ done:
static haddr_t
H5FD_direct_get_eof(const H5FD_t *_file)
{
- const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_direct_get_eof, HADDR_UNDEF)
+ const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- /* Set return value */
- ret_value=MAX(file->eof, file->eoa);
+ FUNC_ENTER_NOAPI_NOINIT
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
}
@@ -888,7 +868,7 @@ H5FD_direct_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_direct_get_handle, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -900,18 +880,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_read
+ * Function: H5FD_direct_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Failure: -1, Contents of buffer BUF are undefined.
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
@@ -920,22 +900,22 @@ done:
*/
static herr_t
H5FD_direct_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+ size_t size, void *buf/*out*/)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- ssize_t nbytes;
- hbool_t _must_align = TRUE;
- herr_t ret_value=SUCCEED; /* Return value */
- size_t alloc_size;
- void *copy_buf = NULL, *p2;
- size_t _boundary;
- size_t _fbsize;
- size_t _cbsize;
- haddr_t read_size; /* Size to read into copy buffer */
- size_t copy_size = size; /* Size remaining to read when using copy buffer */
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ ssize_t nbytes;
+ hbool_t _must_align = TRUE;
+ herr_t ret_value=SUCCEED; /* Return value */
+ size_t alloc_size;
+ void *copy_buf = NULL, *p2;
+ size_t _boundary;
+ size_t _fbsize;
+ size_t _cbsize;
+ haddr_t read_size; /* Size to read into copy buffer */
+ size_t copy_size = size; /* Size remaining to read when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the requested data */
- FUNC_ENTER_NOAPI(H5FD_direct_read, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file && file->pub.cls);
assert(buf);
@@ -971,44 +951,44 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, ha
* and aligned data first, then copy the data into memory buffer.
*/
if(!_must_align || ((addr%_fbsize==0) && (size%_fbsize==0) && ((size_t)buf%_boundary==0))) {
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_READ!=file->op) &&
- file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- /* Read the aligned data in file first, being careful of interrupted
- * system calls and partial results. */
- while (size>0) {
- do {
- nbytes = HDread(file->fd, buf, size);
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- if (0==nbytes) {
- /* end of file but not end of format address space */
- HDmemset(buf, 0, size);
- break;
- }
- assert(nbytes>=0);
- assert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (char*)buf + nbytes;
- }
+ /* Seek to the correct location */
+ if ((addr!=file->pos || OP_READ!=file->op) &&
+ file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+ /* Read the aligned data in file first, being careful of interrupted
+ * system calls and partial results. */
+ while (size>0) {
+ do {
+ nbytes = HDread(file->fd, buf, size);
+ } while (-1==nbytes && EINTR==errno);
+ if (-1==nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
+ if (0==nbytes) {
+ /* end of file but not end of format address space */
+ HDmemset(buf, 0, size);
+ break;
+ }
+ assert(nbytes>=0);
+ assert((size_t)nbytes<=size);
+ H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
+ size -= (size_t)nbytes;
+ H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
+ addr += (haddr_t)nbytes;
+ buf = (char*)buf + nbytes;
+ }
} else {
/* Calculate where we will begin copying from the copy buffer */
copy_offset = (size_t)(addr % _fbsize);
- /* allocate memory needed for the Direct IO option up to the maximal
- * copy buffer size. Make a bigger buffer for aligned I/O if size is
- * smaller than maximal copy buffer. */
- alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
- if(alloc_size > _cbsize)
- alloc_size = _cbsize;
- HDassert(!(alloc_size % _fbsize));
- if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
+ /* allocate memory needed for the Direct IO option up to the maximal
+ * copy buffer size. Make a bigger buffer for aligned I/O if size is
+ * smaller than maximal copy buffer. */
+ alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
+ if(alloc_size > _cbsize)
+ alloc_size = _cbsize;
+ HDassert(!(alloc_size % _fbsize));
+ if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
/* look for the aligned position for reading the data */
HDassert(!(((addr / _fbsize) * _fbsize) % _fbsize));
@@ -1016,18 +996,18 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, ha
SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- /*
- * Read the aligned data in file into aligned buffer first, then copy the data
- * into the final buffer. If the data size is bigger than maximal copy buffer
- * size, do the reading by segment (the outer while loop). If not, do one step
- * reading.
- */
- do {
- /* Read the aligned data in file first. Not able to handle interrupted
- * system calls and partial results like sec2 driver does because the
- * data may no longer be aligned. It's expecially true when the data in
- * file is smaller than ALLOC_SIZE. */
- HDmemset(copy_buf, 0, alloc_size);
+ /*
+ * Read the aligned data in file into aligned buffer first, then copy the data
+ * into the final buffer. If the data size is bigger than maximal copy buffer
+ * size, do the reading by segment (the outer while loop). If not, do one step
+ * reading.
+ */
+ do {
+ /* Read the aligned data in file first. Not able to handle interrupted
+ * system calls and partial results like sec2 driver does because the
+ * data may no longer be aligned. It's expecially true when the data in
+ * file is smaller than ALLOC_SIZE. */
+ HDmemset(copy_buf, 0, alloc_size);
/* Calculate how much data we have to read in this iteration
* (including unused parts of blocks) */
@@ -1038,23 +1018,23 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, ha
read_size = alloc_size;
HDassert(!(read_size % _fbsize));
- do {
- nbytes = HDread(file->fd, copy_buf, read_size);
- } while(-1==nbytes && EINTR==errno);
+ do {
+ nbytes = HDread(file->fd, copy_buf, read_size);
+ } while(-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
+ if (-1==nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- /* Copy the needed data from the copy buffer to the output
- * buffer, and update copy_size. If the copy buffer does not
+ /* Copy the needed data from the copy buffer to the output
+ * buffer, and update copy_size. If the copy buffer does not
* contain the rest of the data, just copy what's in the copy
* buffer and also update read_addr and copy_offset to read the
* next section of data. */
- p2 = (unsigned char*)copy_buf + copy_offset;
- if((copy_size + copy_offset) <= alloc_size) {
- HDmemcpy(buf, p2, copy_size);
- buf = (unsigned char *)buf + copy_size;
- copy_size = 0;
+ p2 = (unsigned char*)copy_buf + copy_offset;
+ if((copy_size + copy_offset) <= alloc_size) {
+ HDmemcpy(buf, p2, copy_size);
+ buf = (unsigned char *)buf + copy_size;
+ copy_size = 0;
} /* end if */
else {
HDmemcpy(buf, p2, alloc_size - copy_offset);
@@ -1062,12 +1042,12 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, ha
copy_size -= alloc_size - copy_offset;
copy_offset = 0;
} /* end else */
- } while (copy_size > 0);
+ } while (copy_size > 0);
- /*Final step: update address*/
- addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
+ /*Final step: update address*/
+ addr = (haddr_t)(((addr + size - 1) / _fbsize + 1) * _fbsize);
- if(copy_buf) {
+ if(copy_buf) {
HDfree(copy_buf);
copy_buf = NULL;
} /* end if */
@@ -1092,17 +1072,17 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_write
+ * Function: H5FD_direct_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
@@ -1111,25 +1091,25 @@ done:
*/
static herr_t
H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- ssize_t nbytes;
- hbool_t _must_align = TRUE;
- herr_t ret_value=SUCCEED; /* Return value */
- size_t alloc_size;
- void *copy_buf = NULL, *p1;
- const void *p3;
- size_t _boundary;
- size_t _fbsize;
- size_t _cbsize;
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ ssize_t nbytes;
+ hbool_t _must_align = TRUE;
+ herr_t ret_value=SUCCEED; /* Return value */
+ size_t alloc_size;
+ void *copy_buf = NULL, *p1;
+ const void *p3;
+ size_t _boundary;
+ size_t _fbsize;
+ size_t _cbsize;
haddr_t write_addr; /* Address to write copy buffer */
haddr_t write_size; /* Size to write from copy buffer */
haddr_t read_size; /* Size to read into copy buffer */
size_t copy_size = size; /* Size remaining to write when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the data to write */
- FUNC_ENTER_NOAPI(H5FD_direct_write, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file && file->pub.cls);
assert(buf);
@@ -1159,49 +1139,49 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, h
* first, update buffer with user data, then write the data out.
*/
if(!_must_align || ((addr%_fbsize==0) && (size%_fbsize==0) && ((size_t)buf%_boundary==0))) {
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_WRITE!=file->op) &&
- file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-
- while (size>0) {
- do {
- nbytes = HDwrite(file->fd, buf, size);
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- assert(nbytes>0);
- assert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (const char*)buf + nbytes;
- }
+ /* Seek to the correct location */
+ if ((addr!=file->pos || OP_WRITE!=file->op) &&
+ file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+
+ while (size>0) {
+ do {
+ nbytes = HDwrite(file->fd, buf, size);
+ } while (-1==nbytes && EINTR==errno);
+ if (-1==nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
+ assert(nbytes>0);
+ assert((size_t)nbytes<=size);
+ H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
+ size -= (size_t)nbytes;
+ H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
+ addr += (haddr_t)nbytes;
+ buf = (const char*)buf + nbytes;
+ }
} else {
/* Calculate where we will begin reading from (on disk) and where we
* will begin copying from the copy buffer */
write_addr = (addr / _fbsize) * _fbsize;
copy_offset = (size_t)(addr % _fbsize);
- /* allocate memory needed for the Direct IO option up to the maximal
- * copy buffer size. Make a bigger buffer for aligned I/O if size is
- * smaller than maximal copy buffer.
- */
- alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
+ /* allocate memory needed for the Direct IO option up to the maximal
+ * copy buffer size. Make a bigger buffer for aligned I/O if size is
+ * smaller than maximal copy buffer.
+ */
+ alloc_size = ((copy_offset + size - 1) / _fbsize + 1) * _fbsize;
if(alloc_size > _cbsize)
alloc_size = _cbsize;
HDassert(!(alloc_size % _fbsize));
- if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
+ if (HDposix_memalign(&copy_buf, _boundary, alloc_size) != 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "HDposix_memalign failed")
/* look for the right position for reading or writing the data */
if(file_seek(file->fd, (file_offset_t)write_addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- p3 = buf;
- do {
+ p3 = buf;
+ do {
/* Calculate how much data we have to write in this iteration
* (including unused parts of blocks) */
if((copy_size + copy_offset) < alloc_size)
@@ -1210,16 +1190,16 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, h
else
write_size = alloc_size;
- /*
- * Read the aligned data first if the aligned region doesn't fall
- * entirely in the range to be writen. Not able to handle interrupted
- * system calls and partial results like sec2 driver does because the
- * data may no longer be aligned. It's expecially true when the data in
- * file is smaller than ALLOC_SIZE. Only read the entire section if
+ /*
+ * Read the aligned data first if the aligned region doesn't fall
+ * entirely in the range to be writen. Not able to handle interrupted
+ * system calls and partial results like sec2 driver does because the
+ * data may no longer be aligned. It's expecially true when the data in
+ * file is smaller than ALLOC_SIZE. Only read the entire section if
* both ends are misaligned, otherwise only read the block on the
* misaligned end.
- */
- HDmemset(copy_buf, 0, _fbsize);
+ */
+ HDmemset(copy_buf, 0, _fbsize);
if(copy_offset > 0) {
if((write_addr + write_size) > (addr + size)) {
@@ -1257,14 +1237,14 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, h
HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
} /* end if */
- /* look for the right position and append or copy the data to be written to
- * the aligned buffer.
- * Consider all possible situations here: file address is not aligned on
- * file block size; the end of data address is not aligned; the end of data
- * address is aligned; data size is smaller or bigger than maximal copy size.
- */
- p1 = (unsigned char *)copy_buf + copy_offset;
- if((copy_size + copy_offset) <= alloc_size) {
+ /* look for the right position and append or copy the data to be written to
+ * the aligned buffer.
+ * Consider all possible situations here: file address is not aligned on
+ * file block size; the end of data address is not aligned; the end of data
+ * address is aligned; data size is smaller or bigger than maximal copy size.
+ */
+ p1 = (unsigned char *)copy_buf + copy_offset;
+ if((copy_size + copy_offset) <= alloc_size) {
HDmemcpy(p1, p3, copy_size);
copy_size = 0;
} /* end if */
@@ -1275,34 +1255,34 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, h
copy_offset = 0;
} /* end else */
- /*look for the aligned position for writing the data*/
- HDassert(!(write_addr % _fbsize));
- if(file_seek(file->fd, (file_offset_t)write_addr, SEEK_SET) < 0)
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
-
- /*
- * Write the data. It doesn't truncate the extra data introduced by
- * alignment because that step is done in H5FD_direct_flush.
- */
- HDassert(!(write_size % _fbsize));
- do {
- nbytes = HDwrite(file->fd, copy_buf, write_size);
- } while (-1==nbytes && EINTR==errno);
-
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
-
- /* update the write address */
- write_addr += write_size;
- } while (copy_size > 0);
-
- /*Update the address and size*/
- addr = write_addr;
- buf = (const char*)buf + size;
-
- if(copy_buf) {
- HDfree(copy_buf);
- copy_buf = NULL;
+ /*look for the aligned position for writing the data*/
+ HDassert(!(write_addr % _fbsize));
+ if(file_seek(file->fd, (file_offset_t)write_addr, SEEK_SET) < 0)
+ HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
+
+ /*
+ * Write the data. It doesn't truncate the extra data introduced by
+ * alignment because that step is done in H5FD_direct_flush.
+ */
+ HDassert(!(write_size % _fbsize));
+ do {
+ nbytes = HDwrite(file->fd, copy_buf, write_size);
+ } while (-1==nbytes && EINTR==errno);
+
+ if (-1==nbytes) /* error */
+ HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
+
+ /* update the write address */
+ write_addr += write_size;
+ } while (copy_size > 0);
+
+ /*Update the address and size*/
+ addr = write_addr;
+ buf = (const char*)buf + size;
+
+ if(copy_buf) {
+ HDfree(copy_buf);
+ copy_buf = NULL;
} /* end if */
}
@@ -1327,16 +1307,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_truncate
+ * Function: H5FD_direct_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Thursday, 21 September 2006
*
*-------------------------------------------------------------------------
@@ -1344,16 +1324,16 @@ done:
static herr_t
H5FD_direct_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
{
- H5FD_direct_t *file = (H5FD_direct_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_direct_t *file = (H5FD_direct_t*)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_direct_truncate, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file);
/* Extend the file to make sure it's large enough */
if (file->eoa!=file->eof) {
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
@@ -1366,10 +1346,10 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing
(void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle)==0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
if (-1==file_truncate(file->fd, (file_offset_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Update the eof value */
file->eof = file->eoa;
@@ -1379,9 +1359,9 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing
file->op = OP_UNKNOWN;
}
else if (file->fa.must_align){
- /*Even though eof is equal to eoa, file is still truncated because Direct I/O
- *write introduces some extra data for alignment.
- */
+ /*Even though eof is equal to eoa, file is still truncated because Direct I/O
+ *write introduces some extra data for alignment.
+ */
if (-1==file_truncate(file->fd, (file_offset_t)file->eof))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
}
diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h
index 26c70f3..5ceb91f 100644
--- a/src/H5FDdirect.h
+++ b/src/H5FDdirect.h
@@ -22,8 +22,6 @@
#ifndef H5FDdirect_H
#define H5FDdirect_H
-#include "H5Ipublic.h"
-
#ifdef H5_HAVE_DIRECT
# define H5FD_DIRECT (H5FD_direct_init())
#else
@@ -42,7 +40,6 @@ extern "C" {
#define CBSIZE_DEF 16*1024*1024
H5_DLL hid_t H5FD_direct_init(void);
-H5_DLL void H5FD_direct_term(void);
H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size,
size_t cbuf_size);
H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/,
@@ -55,3 +52,4 @@ H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/,
#endif /* H5_HAVE_DIRECT */
#endif
+
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 5fd0294..17683ce 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -88,6 +88,7 @@ typedef struct H5FD_family_dxpl_t {
} H5FD_family_dxpl_t;
/* Callback prototypes */
+static herr_t H5FD_family_term(void);
static void *H5FD_family_fapl_get(H5FD_t *_file);
static void *H5FD_family_fapl_copy(const void *_old_fa);
static herr_t H5FD_family_fapl_free(void *_fa);
@@ -119,6 +120,7 @@ static const H5FD_class_t H5FD_family_g = {
"family", /*name */
HADDR_MAX, /*maxaddr */
H5F_CLOSE_WEAK, /*fc_degree */
+ H5FD_family_term, /*terminate */
H5FD_family_sb_size, /*sb_size */
H5FD_family_sb_encode, /*sb_encode */
H5FD_family_sb_decode, /*sb_decode */
@@ -166,7 +168,7 @@ DESCRIPTION
static herr_t
H5FD_family_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_family_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_family_init())
} /* H5FD_family_init_interface() */
@@ -194,7 +196,7 @@ H5FD_family_init(void)
{
hid_t ret_value=H5FD_FAMILY_g; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if (H5I_VFL!=H5Iget_type(H5FD_FAMILY_g))
H5FD_FAMILY_g = H5FD_register(&H5FD_family_g,sizeof(H5FD_class_t),FALSE);
@@ -212,24 +214,22 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_family_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_family_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_FAMILY_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_term() */
@@ -265,7 +265,7 @@ H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id)
H5FD_family_fapl_t fa={0, -1};
H5P_genplist_t *plist; /* Property list pointer */
- FUNC_ENTER_API(H5Pset_fapl_family, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ihi", fapl_id, msize, memb_fapl_id);
@@ -324,7 +324,7 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fapl_family, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, msize, memb_fapl_id);
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
@@ -371,7 +371,7 @@ H5FD_family_fapl_get(H5FD_t *_file)
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_fapl_get, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -417,7 +417,7 @@ H5FD_family_fapl_copy(const void *_old_fa)
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_fapl_copy, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -470,7 +470,7 @@ H5FD_family_fapl_free(void *_fa)
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_fapl_free, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@@ -505,7 +505,7 @@ H5FD_family_dxpl_copy(const void *_old_dx)
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_dxpl_copy, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (new_dx = (H5FD_family_dxpl_t *)H5MM_malloc(sizeof(H5FD_family_dxpl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -556,7 +556,7 @@ H5FD_family_dxpl_free(void *_dx)
H5FD_family_dxpl_t *dx = (H5FD_family_dxpl_t*)_dx;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_dxpl_free, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(H5I_dec_ref(dx->memb_dxpl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@@ -587,16 +587,11 @@ done:
static hsize_t
H5FD_family_sb_size(H5FD_t UNUSED *_file)
{
- hsize_t ret_value = 0; /*size of header*/
-
- FUNC_ENTER_NOAPI(H5FD_family_sb_size, UFAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* 8 bytes field for the size of member file size field should be
* enough for now. */
- ret_value += 8;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(8)
}
@@ -625,7 +620,7 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
{
H5FD_family_t *file = (H5FD_family_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_family_sb_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Name and version number */
HDstrncpy(name, "NCSAfami", (size_t)9);
@@ -670,7 +665,7 @@ H5FD_family_sb_decode(H5FD_t *_file, const char UNUSED *name, const unsigned cha
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_sb_decode, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Read member file size. Skip name template for now although it's saved. */
UINT64DECODE(buf, msize);
@@ -748,7 +743,7 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
hsize_t eof=HADDR_UNDEF;
unsigned t_flags = flags & ~H5F_ACC_CREAT;
- FUNC_ENTER_NOAPI(H5FD_family_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(!name || !*name)
@@ -905,7 +900,7 @@ H5FD_family_close(H5FD_t *_file)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
@@ -929,7 +924,6 @@ H5FD_family_close(H5FD_t *_file)
H5MM_xfree(file->name);
H5MM_xfree(file);
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_close() */
@@ -957,18 +951,17 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
- int ret_value=(H5FD_VFD_DEFAULT);
+ int ret_value = 0;
- FUNC_ENTER_NOAPI(H5FD_family_cmp, H5FD_VFD_DEFAULT)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- assert(f1->nmembs>=1 && f1->memb[0]);
- assert(f2->nmembs>=1 && f2->memb[0]);
+ HDassert(f1->nmembs >= 1 && f1->memb[0]);
+ HDassert(f2->nmembs >= 1 && f2->memb[0]);
- ret_value= H5FDcmp(f1->memb[0], f2->memb[0]);
+ ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
-done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_family_cmp() */
/*-------------------------------------------------------------------------
@@ -991,7 +984,7 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_family_query)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -1035,15 +1028,10 @@ static haddr_t
H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_family_get_eoa, HADDR_UNDEF)
- /* Set return value */
- ret_value=file->eoa;
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eoa)
}
@@ -1075,7 +1063,7 @@ H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
for(u = 0; addr || u < file->nmembs; u++) {
@@ -1153,7 +1141,7 @@ H5FD_family_get_eof(const H5FD_t *_file)
int i; /* Local index variable */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_get_eof, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Find the last member that has a non-zero EOF and break out of the loop
@@ -1180,7 +1168,6 @@ H5FD_family_get_eof(const H5FD_t *_file)
/* Set return value */
ret_value = MAX(eof, file->eoa);
-done:
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1208,7 +1195,7 @@ H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
int memb;
herr_t ret_value;
- FUNC_ENTER_NOAPI(H5FD_family_get_handle, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the plist structure and family offset */
if(NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
@@ -1260,7 +1247,7 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_read, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Get the member data transfer property list. If the transfer property
@@ -1337,7 +1324,7 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_write, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Get the member data transfer property list. If the transfer property
@@ -1402,7 +1389,7 @@ H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_flush, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_flush(file->memb[u], dxpl_id, closing) < 0)
@@ -1437,7 +1424,7 @@ H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_family_truncate, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_truncate(file->memb[u], dxpl_id, closing) < 0)
diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h
index dcb63e6..80969c3 100644
--- a/src/H5FDfamily.h
+++ b/src/H5FDfamily.h
@@ -22,8 +22,6 @@
#ifndef H5FDfamily_H
#define H5FDfamily_H
-#include "H5Ipublic.h"
-
#define H5FD_FAMILY (H5FD_family_init())
#ifdef __cplusplus
@@ -31,7 +29,6 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_family_init(void);
-H5_DLL void H5FD_family_term(void);
H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size,
hid_t memb_fapl_id);
H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size/*out*/,
@@ -42,3 +39,4 @@ H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size/*out*/,
#endif
#endif
+
diff --git a/src/H5FDint.c b/src/H5FDint.c
index 74b3bf6..09af4ed 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -97,7 +97,7 @@ DESCRIPTION
static herr_t
H5FD_int_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_int_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_init())
} /* H5FD_int_init_interface() */
@@ -122,7 +122,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
@@ -165,7 +165,7 @@ H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
@@ -212,7 +212,7 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
HDassert(H5F_addr_defined(addr) && addr <= file->maxaddr);
@@ -249,7 +249,7 @@ H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type)
{
haddr_t ret_value;
- FUNC_ENTER_NOAPI(H5FD_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(file && file->cls);
@@ -291,7 +291,7 @@ H5FD_get_eof(const H5FD_t *file)
{
haddr_t ret_value;
- FUNC_ENTER_NOAPI(H5FD_get_eof, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(file && file->cls);
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 565e935..bfd0b07 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -30,28 +30,47 @@
#define H5_INTERFACE_INIT_FUNC H5FD_log_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDlog.h" /* Logging file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDlog.h" /* Logging file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_LOG_g = 0;
+/* Since Windows doesn't follow the rest of the world when it comes
+ * to POSIX I/O types, some typedefs and constants are needed to avoid
+ * making the code messy with #ifdefs.
+ */
+#ifdef H5_HAVE_WIN32_API
+typedef unsigned int h5_log_io_t;
+typedef int h5_log_io_ret_t;
+static int H5_LOG_MAX_IO_BYTES_g = INT_MAX;
+#else
+/* Unix, everyone else */
+typedef size_t h5_log_io_t;
+typedef ssize_t h5_log_io_ret_t;
+static size_t H5_LOG_MAX_IO_BYTES_g = SSIZET_MAX;
+#endif /* H5_HAVE_WIN32_API */
+
/* Driver-specific file access properties */
typedef struct H5FD_log_fapl_t {
- char *logfile; /* Allocated log file name */
+ char *logfile; /* Allocated log file name */
unsigned long long flags; /* Flags for logging behavior */
size_t buf_size; /* Size of buffers for track flavor and number of times each byte is accessed */
} H5FD_log_fapl_t;
-/* Define strings for the different file memory types */
-static const char *flavors[]={ /* These are defined in H5FDpublic.h */
+/* Define strings for the different file memory types
+ * These are defined in the H5F_mem_t enum from H5Fpublic.h
+ * Note that H5FD_MEM_NOLIST is not listed here since it has
+ * a negative value.
+ */
+static const char *flavors[]={
"H5FD_MEM_DEFAULT",
"H5FD_MEM_SUPER",
"H5FD_MEM_BTREE",
@@ -61,11 +80,10 @@ static const char *flavors[]={ /* These are defined in H5FDpublic.h */
"H5FD_MEM_OHDR",
};
-/*
- * The description of a file belonging to this driver. The `eoa' and `eof'
+/* The description of a file belonging to this driver. The `eoa' and `eof'
* determine the amount of hdf5 address space in use and the high-water mark
- * of the file (the current size of the underlying Unix file). The `pos'
- * value is used to eliminate file position updates when they would be a
+ * of the file (the current size of the underlying filesystem file). The
+ * `pos' value is used to eliminate file position updates when they would be a
* no-op. Unfortunately we've found systems that use separate file position
* indicators for reading and writing so the lseek can only be eliminated if
* the current operation is the same as the previous operation. When opening
@@ -74,72 +92,77 @@ static const char *flavors[]={ /* These are defined in H5FDpublic.h */
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_log_t {
- H5FD_t pub; /*public stuff, must be first */
- int fd; /*the unix file */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- H5FD_file_op_t op; /*last operation */
- char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
-#ifndef _WIN32
- /*
- * On most systems the combination of device and i-node number uniquely
- * identify a file.
+ H5FD_t pub; /* public stuff, must be first */
+ int fd; /* the unix file */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* end of file; current file size */
+ haddr_t pos; /* current file I/O position */
+ H5FD_file_op_t op; /* last operation */
+ char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
+#ifndef H5_HAVE_WIN32_API
+ /* On most systems the combination of device and i-node number uniquely
+ * identify a file. Note that Cygwin, MinGW and other Windows POSIX
+ * environments have the stat function (which fakes inodes)
+ * and will use the 'device + inodes' scheme as opposed to the
+ * Windows code further below.
*/
- dev_t device; /*file device number */
+ dev_t device; /* file device number */
#ifdef H5_VMS
- ino_t inode[3]; /*file i-node number */
+ ino_t inode[3]; /* file i-node number */
#else
- ino_t inode; /*file i-node number */
+ ino_t inode; /* file i-node number */
#endif /*H5_VMS*/
#else
- /*
- * On _WIN32 the low-order word of a unique identifier associated with the
- * file and the volume serial number uniquely identify a file. This number
- * (which, both? -rpm) may change when the system is restarted or when the
- * file is opened. After a process opens a file, the identifier is
- * constant until the file is closed. An application can use this
- * identifier and the volume serial number to determine whether two
- * handles refer to the same file.
+ /* Files in windows are uniquely identified by the volume serial
+ * number and the file index (both low and high parts).
+ *
+ * There are caveats where these numbers can change, especially
+ * on FAT file systems. On NTFS, however, a file should keep
+ * those numbers the same until renamed or deleted (though you
+ * can use ReplaceFile() on NTFS to keep the numbers the same
+ * while renaming).
+ *
+ * See the MSDN "BY_HANDLE_FILE_INFORMATION Structure" entry for
+ * more information.
+ *
+ * http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD fileindexlo;
- DWORD fileindexhi;
-#endif
-
- /* Information from file open flags, for SWMR access */
- hbool_t swmr_read; /* Whether the file is open for SWMR read access */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
+
+ /* Information from properties set by 'h5repart' tool
+ *
+ * Whether to eliminate the family driver info and convert this file to
+ * a single file
+ */
+ hbool_t fam_to_sec2;
- /* Information from properties set by 'h5repart' tool */
- hbool_t fam_to_sec2; /* Whether to eliminate the family driver info
- * and convert this file to a single file */
+ /* Information from file open flags, for SWMR access:
+ *
+ * Whether the file is open for SWMR read access.
+ */
+ hbool_t swmr_read;
/* Fields for tracking I/O operations */
- unsigned char *nread; /* Number of reads from a file location */
- unsigned char *nwrite; /* Number of write to a file location */
- unsigned char *flavor; /* Flavor of information written to file location */
- unsigned long long total_read_ops; /* Total number of read operations */
- unsigned long long total_write_ops; /* Total number of write operations */
- unsigned long long total_seek_ops; /* Total number of seek operations */
- unsigned long long total_truncate_ops; /* Total number of truncate operations */
- double total_read_time; /* Total time spent in read operations */
- double total_write_time; /* Total time spent in write operations */
- double total_seek_time; /* Total time spent in seek operations */
- size_t iosize; /* Size of I/O information buffers */
- FILE *logfp; /* Log file pointer */
- H5FD_log_fapl_t fa; /* Driver-specific file access properties*/
+ unsigned char *nread; /* Number of reads from a file location */
+ unsigned char *nwrite; /* Number of write to a file location */
+ unsigned char *flavor; /* Flavor of information written to file location */
+ unsigned long long total_read_ops; /* Total number of read operations */
+ unsigned long long total_write_ops; /* Total number of write operations */
+ unsigned long long total_seek_ops; /* Total number of seek operations */
+ unsigned long long total_truncate_ops; /* Total number of truncate operations */
+ double total_read_time; /* Total time spent in read operations */
+ double total_write_time; /* Total time spent in write operations */
+ double total_seek_time; /* Total time spent in seek operations */
+ size_t iosize; /* Size of I/O information buffers */
+ FILE *logfp; /* Log file pointer */
+ H5FD_log_fapl_t fa; /* Driver-specific file access properties */
} H5FD_log_t;
-
-/*
- * This driver supports systems that have the lseek64() function by defining
- * some macros here so we don't have to have conditional compilations later
- * throughout the code.
- *
- * HDoff_t: The datatype for file offsets, the second argument of
- * the lseek() or lseek64() call.
- *
- */
-
/*
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
@@ -164,6 +187,7 @@ typedef struct H5FD_log_t {
(HDoff_t)((A)+(Z))<(HDoff_t)(A))
/* Prototypes */
+static herr_t H5FD_log_term(void);
static void *H5FD_log_fapl_get(H5FD_t *file);
static void *H5FD_log_fapl_copy(const void *_old_fa);
static herr_t H5FD_log_fapl_free(void *_fa);
@@ -187,6 +211,7 @@ static const H5FD_class_t H5FD_log_g = {
"log", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_log_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -237,7 +262,7 @@ DESCRIPTION
static herr_t
H5FD_log_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_log_init())
} /* H5FD_log_init_interface() */
@@ -262,7 +287,7 @@ H5FD_log_init(void)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_log_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5I_VFL != H5I_get_type(H5FD_LOG_g))
H5FD_LOG_g = H5FD_register(&H5FD_log_g, sizeof(H5FD_class_t), FALSE);
@@ -280,22 +305,22 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_log_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_LOG_g = 0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_term() */
@@ -303,8 +328,7 @@ H5FD_log_term(void)
* Function: H5Pset_fapl_log
*
* Purpose: Modify the file access property list to use the H5FD_LOG
- * driver defined in this source file. There are no driver
- * specific properties.
+ * driver defined in this source file.
*
* Return: Non-negative on success/Negative on failure
*
@@ -316,17 +340,22 @@ H5FD_log_term(void)
herr_t
H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size)
{
- H5FD_log_fapl_t fa; /* File access property list information */
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5FD_log_fapl_t fa; /* File access property list information */
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pset_fapl_log, FAIL)
- H5TRACE4("e", "i*sIuz", fapl_id, logfile, flags, buf_size);
+ FUNC_ENTER_API(FAIL)
+ H5TRACE4("e", "i*sULz", fapl_id, logfile, flags, buf_size);
+ /* Check arguments */
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ /* This shallow copy is correct! The string will be properly
+ * copied deep down in the H5P code.
+ */
fa.logfile = (char *)logfile;
+
fa.flags = flags;
fa.buf_size = buf_size;
ret_value = H5P_set_driver(plist, H5FD_LOG, &fa);
@@ -358,7 +387,7 @@ H5FD_log_fapl_get(H5FD_t *_file)
H5FD_log_t *file = (H5FD_log_t *)_file;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_fapl_get)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = H5FD_log_fapl_copy(&(file->fa));
@@ -387,7 +416,7 @@ H5FD_log_fapl_copy(const void *_old_fa)
H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_fapl_copy)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(old_fa);
@@ -436,7 +465,7 @@ H5FD_log_fapl_free(void *_fa)
{
H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_fapl_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the fapl information */
if(fa->logfile)
@@ -450,7 +479,7 @@ H5FD_log_fapl_free(void *_fa)
/*-------------------------------------------------------------------------
* Function: H5FD_log_open
*
- * Purpose: Create and/or opens a Unix file as an HDF5 file.
+ * Purpose: Create and/or opens a file as an HDF5 file.
*
* Return: Success: A pointer to a new file data structure. The
* public fields will be initialized by the
@@ -470,8 +499,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD_log_fapl_t *fa; /* File access property list information */
int fd = (-1); /* File descriptor */
int o_flags; /* Flags for open() call */
-#ifdef _WIN32
- HFILE filehandle;
+#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
@@ -482,7 +510,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
h5_stat_t sb;
H5FD_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -567,12 +595,18 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5_ASSIGN_OVERFLOW(file->eof, sb.st_size, h5_stat_size_t, haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef _WIN32
- filehandle = _get_osfhandle(fd);
- (void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
- file->fileindexhi = fileinfo.nFileIndexHigh;
- file->fileindexlo = fileinfo.nFileIndexLow;
-#else /* _WIN32 */
+#ifdef H5_HAVE_WIN32_API
+ file->hFile = (HANDLE)_get_osfhandle(fd);
+ if(INVALID_HANDLE_VALUE == file->hFile)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle")
+
+ if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information")
+
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
#ifdef H5_VMS
file->inode[0] = sb.st_ino[0];
@@ -582,7 +616,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file->inode = sb.st_ino;
#endif /*H5_VMS*/
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
HDstrncpy(file->filename, name, sizeof(file->filename));
@@ -657,7 +691,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_log_close
*
- * Purpose: Closes a Unix file.
+ * Purpose: Closes an HDF5 file.
*
* Return: Success: 0
* Failure: -1, file not closed.
@@ -676,7 +710,7 @@ H5FD_log_close(H5FD_t *_file)
#endif /* H5_HAVE_GETTIMEOFDAY */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(file);
@@ -824,15 +858,17 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef _WIN32
- if(f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
- if(f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
+#ifdef H5_HAVE_WIN32_API
+ if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
+ if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) HGOTO_DONE(1)
- if(f1->fileindexlo < f2->fileindexlo) HGOTO_DONE(-1)
- if(f1->fileindexlo > f2->fileindexlo) HGOTO_DONE(1)
+ if(f1->nFileIndexHigh < f2->nFileIndexHigh) HGOTO_DONE(-1)
+ if(f1->nFileIndexHigh > f2->nFileIndexHigh) HGOTO_DONE(1)
+ if(f1->nFileIndexLow < f2->nFileIndexLow) HGOTO_DONE(-1)
+ if(f1->nFileIndexLow > f2->nFileIndexLow) HGOTO_DONE(1)
#else
#ifdef H5_DEV_T_IS_SCALAR
if(f1->device < f2->device) HGOTO_DONE(-1)
@@ -880,7 +916,7 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_query)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -921,7 +957,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, hsize_t siz
haddr_t addr;
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Compute the address for the block to allocate */
addr = file->eoa;
@@ -974,7 +1010,7 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_get_eoa)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_log_get_eoa() */
@@ -1000,7 +1036,7 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_set_eoa)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
file->eoa = addr;
@@ -1012,11 +1048,11 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
* Function: H5FD_log_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
- * either the Unix end-of-file or the HDF5 end-of-address
+ * either the filesystem end-of-file or the HDF5 end-of-address
* markers.
*
* Return: Success: End of file address, the first address past
- * the end of the "file", either the Unix file
+ * the end of the "file", either the filesystem file
* or the HDF5 file.
* Failure: HADDR_UNDEF
*
@@ -1030,7 +1066,7 @@ H5FD_log_get_eof(const H5FD_t *_file)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_get_eof)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
} /* end H5FD_log_get_eof() */
@@ -1055,7 +1091,7 @@ H5FD_log_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void **file_handle)
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_get_handle)
+ FUNC_ENTER_NOAPI_NOINIT
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1089,7 +1125,6 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
size_t size, void *buf/*out*/)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- ssize_t nbytes;
size_t orig_size = size; /* Save the original size for later */
haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
@@ -1097,7 +1132,7 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
#endif /* H5_HAVE_GETTIMEOFDAY */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_read)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1182,10 +1217,23 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
while(size > 0) {
+
+ h5_log_io_t bytes_in = 0; /* # of bytes to read */
+ h5_log_io_ret_t bytes_read = -1; /* # of bytes actually read */
+
+ /* Trying to read more bytes than the return type can handle is
+ * undefined behavior in POSIX.
+ */
+ if(size > H5_LOG_MAX_IO_BYTES_g)
+ bytes_in = H5_LOG_MAX_IO_BYTES_g;
+ else
+ bytes_in = (h5_log_io_t)size;
+
do {
- nbytes = HDread(file->fd, buf, size);
- } while(-1 == nbytes && EINTR == errno);
- if(-1 == nbytes) { /* error */
+ bytes_read = HDread(file->fd, buf, bytes_in);
+ } while(-1 == bytes_read && EINTR == errno);
+
+ if(-1 == bytes_read) { /* error */
int myerrno = errno;
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
@@ -1195,18 +1243,20 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
} /* end if */
- if(0 == nbytes) {
+
+ if(0 == bytes_read) {
/* end of file but not end of format address space */
HDmemset(buf, 0, size);
break;
} /* end if */
- HDassert(nbytes >= 0);
- HDassert((size_t)nbytes <= size);
- H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
- addr += (haddr_t)nbytes;
- buf = (char *)buf + nbytes;
+
+ HDassert(bytes_read >= 0);
+ HDassert((size_t)bytes_read <= size);
+
+ size -= (size_t)bytes_read;
+ addr += (haddr_t)bytes_read;
+ buf = (char *)buf + bytes_read;
+
} /* end while */
#ifdef H5_HAVE_GETTIMEOFDAY
if(file->fa.flags & H5FD_LOG_TIME_READ)
@@ -1282,7 +1332,6 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
size_t size, const void *buf)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- ssize_t nbytes;
size_t orig_size = size; /* Save the original size for later */
haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
@@ -1290,7 +1339,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
#endif /* H5_HAVE_GETTIMEOFDAY */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_write)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file && file->pub.cls);
HDassert(size > 0);
@@ -1374,10 +1423,23 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
HDgettimeofday(&timeval_start, NULL);
#endif /* H5_HAVE_GETTIMEOFDAY */
while(size > 0) {
+
+ h5_log_io_t bytes_in = 0; /* # of bytes to write */
+ h5_log_io_ret_t bytes_wrote = -1; /* # of bytes written */
+
+ /* Trying to write more bytes than the return type can handle is
+ * undefined behavior in POSIX.
+ */
+ if(size > H5_LOG_MAX_IO_BYTES_g)
+ bytes_in = H5_LOG_MAX_IO_BYTES_g;
+ else
+ bytes_in = (h5_log_io_t)size;
+
do {
- nbytes = HDwrite(file->fd, buf, size);
- } while(-1 == nbytes && EINTR == errno);
- if(-1 == nbytes) { /* error */
+ bytes_wrote = HDwrite(file->fd, buf, bytes_in);
+ } while(-1 == bytes_wrote && EINTR == errno);
+
+ if(-1 == bytes_wrote) { /* error */
int myerrno = errno;
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
@@ -1387,13 +1449,13 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
} /* end if */
- HDassert(nbytes > 0);
- HDassert((size_t)nbytes <= size);
- H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
- addr += (haddr_t)nbytes;
- buf = (const char *)buf + nbytes;
+
+ HDassert(bytes_wrote > 0);
+ HDassert((size_t)bytes_wrote <= size);
+
+ size -= (size_t)bytes_wrote;
+ addr += (haddr_t)bytes_wrote;
+ buf = (const char *)buf + bytes_wrote;
} /* end while */
#ifdef H5_HAVE_GETTIMEOFDAY
if(file->fa.flags & H5FD_LOG_TIME_WRITE)
@@ -1475,26 +1537,39 @@ H5FD_log_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_log_truncate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Extend the file to make sure it's large enough */
if(!H5F_addr_eq(file->eoa, file->eof)) {
-#ifdef _WIN32
- HFILE filehandle; /* Windows file handle */
- LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
-
- /* Map the posix file handle to a Windows file handle */
- filehandle = _get_osfhandle(file->fd);
-
- /* Translate 64-bit integers into form Windows wants */
- /* [This algorithm is from the Windows documentation for SetFilePointer()] */
- li.QuadPart = (LONGLONG)file->eoa;
- (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(SetEndOfFile((HANDLE)filehandle) == 0)
+#ifdef H5_HAVE_WIN32_API
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
+
+ /* Windows uses this odd QuadPart union for 32/64-bit portability */
+ li.QuadPart = (__int64)file->eoa;
+
+ /* Extend the file to make sure it's large enough.
+ *
+ * Since INVALID_SET_FILE_POINTER can technically be a valid return value
+ * from SetFilePointer(), we also need to check GetLastError().
+ */
+ dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
+ if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ dwError = GetLastError();
+ if(dwError != NO_ERROR )
+ HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer")
+ }
+
+ bError = SetEndOfFile(file->hFile);
+ if(0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
#ifdef H5_VMS
/* Reset seek offset to the beginning of the file, so that the file isn't
* re-extended later. This may happen on Open VMS. */
@@ -1504,7 +1579,7 @@ H5FD_log_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Log information about the truncate */
if(file->fa.flags & H5FD_LOG_NUM_TRUNCATE)
diff --git a/src/H5FDlog.h b/src/H5FDlog.h
index ffc4df1..2f1544e 100644
--- a/src/H5FDlog.h
+++ b/src/H5FDlog.h
@@ -22,8 +22,6 @@
#ifndef H5FDlog_H
#define H5FDlog_H
-#include "H5Ipublic.h"
-
#define H5FD_LOG (H5FD_log_init())
/* Flags for H5Pset_fapl_log() */
@@ -61,7 +59,6 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_log_init(void);
-H5_DLL void H5FD_log_term(void);
H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size);
#ifdef __cplusplus
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 21c761a..ff2c87d 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -59,7 +59,7 @@ H5FD_mpi_get_rank(const H5FD_t *file)
const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls);
int ret_value;
- FUNC_ENTER_NOAPI(H5FD_mpi_get_rank, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(file && cls);
assert(cls->get_rank); /* All MPI drivers must implement this */
@@ -95,7 +95,7 @@ H5FD_mpi_get_size(const H5FD_t *file)
const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls);
int ret_value;
- FUNC_ENTER_NOAPI(H5FD_mpi_get_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(file && cls);
assert(cls->get_size); /* All MPI drivers must implement this */
@@ -131,7 +131,7 @@ H5FD_mpi_get_comm(const H5FD_t *file)
const H5FD_class_mpi_t *cls=(const H5FD_class_mpi_t *)(file->cls);
MPI_Comm ret_value;
- FUNC_ENTER_NOAPI(H5FD_mpi_get_comm, MPI_COMM_NULL)
+ FUNC_ENTER_NOAPI(MPI_COMM_NULL)
assert(file && cls);
assert(cls->get_comm); /* All MPI drivers must implement this */
@@ -172,7 +172,7 @@ H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off)
{
haddr_t ret_value=HADDR_UNDEF;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpi_MPIOff_to_haddr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (mpi_off != (MPI_Offset)(haddr_t)mpi_off)
ret_value=HADDR_UNDEF;
@@ -213,7 +213,7 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
{
herr_t ret_value=FAIL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpi_haddr_to_MPIOff)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(mpi_off);
@@ -257,7 +257,7 @@ H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info, MPI_Comm *comm_new, MPI_Inf
MPI_Info info_dup=MPI_INFO_NULL;
int mpi_code;
- FUNC_ENTER_NOAPI(H5FD_mpi_comm_info_dup, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if (MPI_COMM_NULL == comm)
@@ -316,7 +316,8 @@ herr_t
H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info)
{
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpi_comm_info_free, FAIL)
+
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if (!comm || !info)
@@ -368,7 +369,7 @@ H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
int mpi_code; /* mpi return code */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_wait_for_left_neighbor, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
@@ -422,7 +423,7 @@ H5FD_mpio_signal_right_neighbor(H5FD_t *_file)
int mpi_code; /* mpi return code */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_signal_right_neighbor, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
@@ -470,7 +471,7 @@ H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype btype, MPI_Datatype ftype)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpi_setup_collective, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
@@ -510,7 +511,7 @@ H5FD_mpi_teardown_collective(hid_t dxpl_id)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpi_teardown_collective, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index b9998dd..2b7ac98 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -73,10 +73,6 @@ typedef struct H5FD_class_mpi_t {
/* Macros */
-/* Single macro to check for all file drivers that use MPI */
-#define IS_H5FD_MPI(file) \
- (IS_H5FD_MPIO(file) || IS_H5FD_MPIPOSIX(file))
-
#ifdef H5_HAVE_PARALLEL
/* ======== Temporary data transfer properties ======== */
/* Definitions for memory MPI type property */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index b382fb4..d780ceb 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -65,6 +65,7 @@ typedef struct H5FD_mpio_t {
/* Private Prototypes */
/* Callbacks */
+static herr_t H5FD_mpio_term(void);
static void *H5FD_mpio_fapl_get(H5FD_t *_file);
static void *H5FD_mpio_fapl_copy(const void *_old_fa);
static herr_t H5FD_mpio_fapl_free(void *_fa);
@@ -98,6 +99,7 @@ static const H5FD_class_mpi_t H5FD_mpio_g = {
"mpio", /*name */
HADDR_MAX, /*maxaddr */
H5F_CLOSE_SEMI, /* fc_degree */
+ H5FD_mpio_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -169,7 +171,7 @@ DESCRIPTION
static herr_t
H5FD_mpio_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpio_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_mpio_init())
} /* H5FD_mpio_init_interface() */
@@ -200,7 +202,7 @@ H5FD_mpio_init(void)
#endif /* H5FDmpio_DEBUG */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if (H5I_VFL!=H5I_get_type(H5FD_MPIO_g))
H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g,sizeof(H5FD_class_mpi_t),FALSE);
@@ -234,24 +236,22 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_mpio_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpio_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_MPIO_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpio_term() */
@@ -321,7 +321,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_mpio, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iMcMi", fapl_id, comm, info);
if(fapl_id == H5P_DEFAULT)
@@ -392,7 +392,7 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
int mpi_code; /* mpi return code */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fapl_mpio, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, comm, info);
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -466,7 +466,7 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_dxpl_mpio, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDt", dxpl_id, xfer_mode);
if(dxpl_id==H5P_DEFAULT)
@@ -516,7 +516,7 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_dxpl_mpio, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", dxpl_id, xfer_mode);
if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
@@ -563,7 +563,7 @@ H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mo
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_dxpl_mpio_collective_opt, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDc", dxpl_id, opt_mode);
if(dxpl_id == H5P_DEFAULT)
@@ -615,7 +615,7 @@ H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDh", dxpl_id, opt_mode);
if(dxpl_id == H5P_DEFAULT)
@@ -662,7 +662,7 @@ H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt_num, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", dxpl_id, num_chunk_per_proc);
if(dxpl_id == H5P_DEFAULT)
@@ -709,7 +709,7 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt_ratio, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", dxpl_id, percent_num_proc_per_chunk);
if(dxpl_id == H5P_DEFAULT)
@@ -758,7 +758,7 @@ H5FD_mpio_fapl_get(H5FD_t *_file)
H5FD_mpio_fapl_t *fa = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_fapl_get, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
HDassert(H5FD_MPIO == file->pub.driver_id);
@@ -801,7 +801,7 @@ H5FD_mpio_fapl_copy(const void *_old_fa)
const H5FD_mpio_fapl_t *old_fa = (const H5FD_mpio_fapl_t*)_old_fa;
H5FD_mpio_fapl_t *new_fa = NULL;
- FUNC_ENTER_NOAPI(H5FD_mpio_fapl_copy, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
@@ -855,7 +855,7 @@ H5FD_mpio_fapl_free(void *_fa)
herr_t ret_value = SUCCEED;
H5FD_mpio_fapl_t *fa = (H5FD_mpio_fapl_t*)_fa;
- FUNC_ENTER_NOAPI(H5FD_mpio_fapl_free, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
fprintf(stderr, "in H5FD_mpio_fapl_free\n");
@@ -867,7 +867,6 @@ fprintf(stderr, "in H5FD_mpio_fapl_free\n");
H5FD_mpi_comm_info_free(&fa->comm, &fa->info);
H5MM_xfree(fa);
-done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
fprintf(stderr, "leaving H5FD_mpio_fapl_free\n");
@@ -940,10 +939,10 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
MPI_Info info_dup=MPI_INFO_NULL;
H5FD_t *ret_value; /* Return value */
#ifndef H5_HAVE_MPI_GET_SIZE
- struct stat stat_buf;
+ h5_stat_t stat_buf;
#endif
- FUNC_ENTER_NOAPI(H5FD_mpio_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t']) {
@@ -1103,7 +1102,7 @@ H5FD_mpio_close(H5FD_t *_file)
int mpi_code; /* MPI return code */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
@@ -1156,19 +1155,18 @@ done:
static herr_t
H5FD_mpio_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */)
{
- herr_t ret_value=SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_mpio_query, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags=0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags|=H5FD_FEAT_HAS_MPI; /* This driver uses MPI */
+ *flags|=H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -1197,18 +1195,13 @@ static haddr_t
H5FD_mpio_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
- haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- /* Set return value */
- ret_value=file->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eoa)
}
@@ -1237,17 +1230,15 @@ static herr_t
H5FD_mpio_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
file->eoa = addr;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -1284,18 +1275,13 @@ static haddr_t
H5FD_mpio_get_eof(const H5FD_t *_file)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
- haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_get_eof, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- /* Set return value */
- ret_value=file->eof;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eof)
}
@@ -1319,7 +1305,7 @@ H5FD_mpio_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpio_get_handle, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1417,7 +1403,7 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add
hbool_t use_view_this_time = FALSE;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpio_read, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
@@ -1701,7 +1687,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5P_genplist_t *plist = NULL; /* Property list pointer */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpio_write, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
@@ -1876,7 +1862,7 @@ H5FD_mpio_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned closing)
int mpi_code; /* mpi return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpio_flush, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
@@ -1920,7 +1906,7 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpio_truncate, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FDmpio_DEBUG
if(H5FD_mpio_Debug[(int)'t'])
@@ -2010,18 +1996,13 @@ static int
H5FD_mpio_mpi_rank(const H5FD_t *_file)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
- int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_mpi_rank, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- /* Set return value */
- ret_value=file->mpi_rank;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->mpi_rank)
} /* end H5FD_mpio_mpi_rank() */
@@ -2044,18 +2025,13 @@ static int
H5FD_mpio_mpi_size(const H5FD_t *_file)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
- int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_mpi_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- /* Set return value */
- ret_value=file->mpi_size;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->mpi_size)
} /* end H5FD_mpio_mpi_size() */
@@ -2079,18 +2055,14 @@ static MPI_Comm
H5FD_mpio_communicator(const H5FD_t *_file)
{
const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
- MPI_Comm ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpio_communicator, MPI_COMM_NULL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- /* Set return value */
- ret_value=file->comm;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->comm)
}
#endif /* H5_HAVE_PARALLEL */
+
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 41baf8d..fe2d11f 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -46,7 +46,6 @@
extern "C" {
#endif
H5_DLL hid_t H5FD_mpio_init(void);
-H5_DLL void H5FD_mpio_term(void);
H5_DLL herr_t H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info);
H5_DLL herr_t H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/,
MPI_Info *info/*out*/);
@@ -63,3 +62,4 @@ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_n
#endif /* H5_HAVE_PARALLEL */
#endif
+
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 2a61c89..c91f176 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -17,7 +17,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.ed>
* Thursday, July 11, 2002
*
- * Purpose: This is a "combination" MPI-2 and posix I/O driver.
+ * Purpose: This is a "combination" MPI-2 and posix I/O driver.
* It uses MPI for coordinating the actions of several processes
* and posix I/O calls to do the actual I/O to the disk.
*
@@ -34,17 +34,17 @@
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_mpiposix_init_interface
+#define H5_INTERFACE_INIT_FUNC H5FD_mpiposix_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDmpi.h" /* MPI-based file drivers */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
/* Features:
@@ -72,9 +72,9 @@
static hid_t H5FD_MPIPOSIX_g = 0;
/* File operations */
-#define OP_UNKNOWN 0
-#define OP_READ 1
-#define OP_WRITE 2
+#define OP_UNKNOWN 0
+#define OP_READ 1
+#define OP_WRITE 2
/*
* The description of a file belonging to this driver.
@@ -84,31 +84,31 @@ static hid_t H5FD_MPIPOSIX_g = 0;
* doesn't bother to keep it updated since it's an expensive operation.
*/
typedef struct H5FD_mpiposix_t {
- H5FD_t pub; /*public stuff, must be first */
- int fd; /*the unix file handle */
- MPI_Comm comm; /*communicator */
+ H5FD_t pub; /*public stuff, must be first */
+ int fd; /*the unix file handle */
+ MPI_Comm comm; /*communicator */
int mpi_rank; /* This process's rank */
int mpi_size; /* Total number of processes */
- haddr_t eof; /*end-of-file marker */
- haddr_t eoa; /*end-of-address marker */
- haddr_t last_eoa; /* Last known end-of-address marker */
- haddr_t pos; /* Current file I/O position */
- int op; /* Last file I/O operation */
- hsize_t naccess; /* Number of (write) accesses to file */
+ haddr_t eof; /*end-of-file marker */
+ haddr_t eoa; /*end-of-address marker */
+ haddr_t last_eoa; /* Last known end-of-address marker */
+ haddr_t pos; /* Current file I/O position */
+ int op; /* Last file I/O operation */
+ hsize_t naccess; /* Number of (write) accesses to file */
#ifdef H5_HAVE_GPFS
size_t blksize; /* Block size of file system */
#endif
hbool_t use_gpfs; /* Use GPFS to write things */
-#ifndef _WIN32
+#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
*/
- dev_t device; /*file device number */
- ino_t inode; /*file i-node number */
+ dev_t device; /*file device number */
+ ino_t inode; /*file i-node number */
#else
/*
- * On _WIN32 the low-order word of a unique identifier associated with the
+ * On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -129,59 +129,60 @@ typedef struct H5FD_mpiposix_t {
* some macros here so we don't have to have conditional compilations later
* throughout the code.
*
- * file_offset_t: The datatype for file offsets, the second argument of
- * the lseek() or lseek64() call.
+ * file_offset_t: The datatype for file offsets, the second argument of
+ * the lseek() or lseek64() call.
*
- * file_seek: The function which adjusts the current file position,
- * either lseek() or lseek64().
+ * file_seek: The function which adjusts the current file position,
+ * either lseek() or lseek64().
*/
/* adding for windows NT file system support. */
#ifdef H5_HAVE_LSEEK64
-# define file_offset_t off64_t
-# define file_seek lseek64
-# define file_truncate ftruncate64
-#elif defined (_WIN32)
+# define file_offset_t off64_t
+# define file_seek lseek64
+# define file_truncate ftruncate64
+#elif defined (H5_HAVE_WIN32_API)
# /*MSVC*/
# define file_offset_t __int64
# define file_seek _lseeki64
-# define file_truncate _ftruncatei64
+# define file_truncate _ftruncatei64
#else
-# define file_offset_t off_t
-# define file_seek HDlseek
-# define file_truncate HDftruncate
+# define file_offset_t off_t
+# define file_seek HDlseek
+# define file_truncate HDftruncate
#endif
/*
* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely by the second
+ * argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- sizeof(file_offset_t)<sizeof(size_t) || \
- HADDR_UNDEF==(A)+(Z) || \
- (file_offset_t)((A)+(Z))<(file_offset_t)(A))
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
+ ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ sizeof(file_offset_t)<sizeof(size_t) || \
+ HADDR_UNDEF==(A)+(Z) || \
+ (file_offset_t)((A)+(Z))<(file_offset_t)(A))
/* Callbacks */
+static herr_t H5FD_mpiposix_term(void);
static void *H5FD_mpiposix_fapl_get(H5FD_t *_file);
static void *H5FD_mpiposix_fapl_copy(const void *_old_fa);
static herr_t H5FD_mpiposix_fapl_free(void *_fa);
static H5FD_t *H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_mpiposix_close(H5FD_t *_file);
static int H5FD_mpiposix_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_mpiposix_query(const H5FD_t *_f1, unsigned long *flags);
@@ -201,43 +202,44 @@ static MPI_Comm H5FD_mpiposix_communicator(const H5FD_t *_file);
/* MPIPOSIX-specific file access properties */
typedef struct H5FD_mpiposix_fapl_t {
hbool_t use_gpfs; /*use GPFS hints */
- MPI_Comm comm; /*communicator */
+ MPI_Comm comm; /*communicator */
} H5FD_mpiposix_fapl_t;
/* The MPIPOSIX file driver information */
static const H5FD_class_mpi_t H5FD_mpiposix_g = {
{ /* Start of superclass information */
- "mpiposix", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_SEMI, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_mpiposix_fapl_t), /*fapl_size */
- H5FD_mpiposix_fapl_get, /*fapl_get */
- H5FD_mpiposix_fapl_copy, /*fapl_copy */
- H5FD_mpiposix_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_mpiposix_open, /*open */
- H5FD_mpiposix_close, /*close */
- H5FD_mpiposix_cmp, /*cmp */
- H5FD_mpiposix_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_mpiposix_get_eoa, /*get_eoa */
- H5FD_mpiposix_set_eoa, /*set_eoa */
- H5FD_mpiposix_get_eof, /*get_eof */
+ "mpiposix", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_SEMI, /* fc_degree */
+ H5FD_mpiposix_term, /*terminate */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ sizeof(H5FD_mpiposix_fapl_t), /*fapl_size */
+ H5FD_mpiposix_fapl_get, /*fapl_get */
+ H5FD_mpiposix_fapl_copy, /*fapl_copy */
+ H5FD_mpiposix_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_mpiposix_open, /*open */
+ H5FD_mpiposix_close, /*close */
+ H5FD_mpiposix_cmp, /*cmp */
+ H5FD_mpiposix_query, /*query */
+ NULL, /*get_type_map */
+ NULL, /*alloc */
+ NULL, /*free */
+ H5FD_mpiposix_get_eoa, /*get_eoa */
+ H5FD_mpiposix_set_eoa, /*set_eoa */
+ H5FD_mpiposix_get_eof, /*get_eof */
H5FD_mpiposix_get_handle, /*get_handle */
- H5FD_mpiposix_read, /*read */
- H5FD_mpiposix_write, /*write */
- NULL, /*flush */
- H5FD_mpiposix_truncate, /*truncate */
+ H5FD_mpiposix_read, /*read */
+ H5FD_mpiposix_write, /*write */
+ NULL, /*flush */
+ H5FD_mpiposix_truncate, /*truncate */
NULL, /*lock */
NULL, /*unlock */
- H5FD_FLMAP_SINGLE /*fl_map */
+ H5FD_FLMAP_SINGLE /*fl_map */
}, /* End of superclass information */
H5FD_mpiposix_mpi_rank, /*get_rank */
H5FD_mpiposix_mpi_size, /*get_size */
@@ -261,23 +263,23 @@ DESCRIPTION
static herr_t
H5FD_mpiposix_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpiposix_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_mpiposix_init())
} /* H5FD_mpiposix_init_interface() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_init
+ * Function: H5FD_mpiposix_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the mpiposix driver.
+ * Return: Success: The driver ID for the mpiposix driver.
*
- * Failure: Negative.
+ * Failure: Negative.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -289,7 +291,7 @@ H5FD_mpiposix_init(void)
{
hid_t ret_value=H5FD_MPIPOSIX_g; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if (H5I_VFL!=H5Iget_type(H5FD_MPIPOSIX_g))
H5FD_MPIPOSIX_g = H5FD_register((const H5FD_class_t *)&H5FD_mpiposix_g,sizeof(H5FD_class_mpi_t),FALSE);
@@ -303,80 +305,78 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_mpiposix_term
+ * Function: H5FD_mpiposix_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_mpiposix_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpiposix_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_MPIPOSIX_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpiposix_term() */
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_mpiposix
+ * Function: H5Pset_fapl_mpiposix
*
- * Purpose: Store the user supplied MPI communicator COMM in
- * the file access property list FAPL_ID which can then be used
- * to create and/or open the file. This function is available
- * only in the parallel HDF5 library and is not collective.
+ * Purpose: Store the user supplied MPI communicator COMM in
+ * the file access property list FAPL_ID which can then be used
+ * to create and/or open the file. This function is available
+ * only in the parallel HDF5 library and is not collective.
*
- * comm is the MPI communicator to be used for file open as
- * defined in MPI_FILE_OPEN of MPI-2. This function makes a
- * duplicate of comm. Any modification to comm after this function
- * call returns has no effect on the access property list.
+ * comm is the MPI communicator to be used for file open as
+ * defined in MPI_FILE_OPEN of MPI-2. This function makes a
+ * duplicate of comm. Any modification to comm after this function
+ * call returns has no effect on the access property list.
*
* If fapl_id has previously set comm value, it will be replaced
* and the old communicator is freed.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * Thursday, July 11, 2002
+ * Programmer: Quincey Koziol
+ * Thursday, July 11, 2002
*
* Modifications:
- * Albert Cheng, 2003-04-24
- * Modified the description of the function that it now stores
- * a duplicate of the communicator. Free the old duplicate if
- * previously set. (Work is actually done by H5P_set_driver.)
+ * Albert Cheng, 2003-04-24
+ * Modified the description of the function that it now stores
+ * a duplicate of the communicator. Free the old duplicate if
+ * previously set. (Work is actually done by H5P_set_driver.)
*
- * Bill Wendling, 2003-05-01
- * Modified to take an extra flag indicating that we should
- * use the GPFS hints (if available) for this file.
+ * Bill Wendling, 2003-05-01
+ * Modified to take an extra flag indicating that we should
+ * use the GPFS hints (if available) for this file.
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_mpiposix(hid_t fapl_id, MPI_Comm comm, hbool_t use_gpfs)
{
- H5FD_mpiposix_fapl_t fa;
+ H5FD_mpiposix_fapl_t fa;
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_mpiposix, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iMcb", fapl_id, comm, use_gpfs);
/* Check arguments */
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
if (MPI_COMM_NULL == comm)
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
fa.comm = comm;
@@ -391,29 +391,29 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_mpiposix
+ * Function: H5Pget_fapl_mpiposix
*
- * Purpose: If the file access property list is set to the H5FD_MPIPOSIX
- * driver then this function returns a duplicate of the MPI
- * communicator through the comm pointer. It is the responsibility
- * of the application to free the returned communicator.
+ * Purpose: If the file access property list is set to the H5FD_MPIPOSIX
+ * driver then this function returns a duplicate of the MPI
+ * communicator through the comm pointer. It is the responsibility
+ * of the application to free the returned communicator.
*
- * Return: Success: Non-negative with the communicator and
- * information returned through the COMM
- * argument if non-null. Since it is a duplicate
- * of the stored object, future modifications to
- * the access property list do not affect it and
- * it is the responsibility of the application to
- * free it.
+ * Return: Success: Non-negative with the communicator and
+ * information returned through the COMM
+ * argument if non-null. Since it is a duplicate
+ * of the stored object, future modifications to
+ * the access property list do not affect it and
+ * it is the responsibility of the application to
+ * free it.
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Quincey Koziol
- * Thursday, July 11, 2002
+ * Programmer: Quincey Koziol
+ * Thursday, July 11, 2002
*
* Modifications:
- * Albert Cheng, 2003-04-24
- * Return duplicate of the stored communicator.
+ * Albert Cheng, 2003-04-24
+ * Return duplicate of the stored communicator.
*
* Bill Wendling, 2003-05-01
* Return the USE_GPFS flag.
@@ -423,12 +423,12 @@ done:
herr_t
H5Pget_fapl_mpiposix(hid_t fapl_id, MPI_Comm *comm/*out*/, hbool_t *use_gpfs/*out*/)
{
- H5FD_mpiposix_fapl_t *fa;
+ H5FD_mpiposix_fapl_t *fa;
H5P_genplist_t *plist; /* Property list pointer */
- int mpi_code; /* mpi return code */
+ int mpi_code; /* mpi return code */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fapl_mpiposix, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, comm, use_gpfs);
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
@@ -440,8 +440,8 @@ H5Pget_fapl_mpiposix(hid_t fapl_id, MPI_Comm *comm/*out*/, hbool_t *use_gpfs/*ou
/* Get MPI Communicator */
if (comm){
- if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(fa->comm, comm)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
+ if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(fa->comm, comm)))
+ HMPI_GOTO_ERROR(FAIL, "MPI_Comm_dup failed", mpi_code)
}
if (use_gpfs)
@@ -453,35 +453,35 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_fapl_get
+ * Function: H5FD_mpiposix_fapl_get
*
- * Purpose: Returns a file access property list which could be used to
- * create another file the same as this one.
+ * Purpose: Returns a file access property list which could be used to
+ * create another file the same as this one.
*
- * Return: Success: Ptr to new file access property list with all
- * fields copied from the file pointer.
+ * Return: Success: Ptr to new file access property list with all
+ * fields copied from the file pointer.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
- * Albert Cheng, 2003-04-24
- * Duplicate the communicator object so that the new
- * property list is insulated from the old one.
+ * Albert Cheng, 2003-04-24
+ * Duplicate the communicator object so that the new
+ * property list is insulated from the old one.
*
*-------------------------------------------------------------------------
*/
static void *
H5FD_mpiposix_fapl_get(H5FD_t *_file)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
H5FD_mpiposix_fapl_t *fa = NULL;
- int mpi_code; /* MPI return code */
+ int mpi_code; /* MPI return code */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_fapl_get, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
@@ -491,7 +491,7 @@ H5FD_mpiposix_fapl_get(H5FD_t *_file)
/* Duplicate the communicator. */
if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(file->comm, &fa->comm)))
- HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
+ HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
fa->use_gpfs = file->use_gpfs;
@@ -504,15 +504,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_fapl_copy
+ * Function: H5FD_mpiposix_fapl_copy
*
- * Purpose: Copies the mpiposix-specific file access properties.
+ * Purpose: Copies the mpiposix-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Apr 24, 2003
*
* Modifications:
@@ -522,12 +522,12 @@ done:
static void *
H5FD_mpiposix_fapl_copy(const void *_old_fa)
{
- void *ret_value = NULL;
+ void *ret_value = NULL;
const H5FD_mpiposix_fapl_t *old_fa = (const H5FD_mpiposix_fapl_t*)_old_fa;
- H5FD_mpiposix_fapl_t *new_fa = NULL;
- int mpi_code; /* MPI return code */
+ H5FD_mpiposix_fapl_t *new_fa = NULL;
+ int mpi_code; /* MPI return code */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_fapl_copy, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if (NULL==(new_fa=H5MM_malloc(sizeof(H5FD_mpiposix_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -537,16 +537,16 @@ H5FD_mpiposix_fapl_copy(const void *_old_fa)
/* Duplicate communicator. */
if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(old_fa->comm, &new_fa->comm)))
- HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
+ HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
new_fa->use_gpfs = old_fa->use_gpfs;
ret_value = new_fa;
done:
if (NULL == ret_value){
- /* cleanup */
- if (new_fa)
- H5MM_xfree(new_fa);
+ /* cleanup */
+ if (new_fa)
+ H5MM_xfree(new_fa);
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -554,15 +554,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_fapl_free
+ * Function: H5FD_mpiposix_fapl_free
*
- * Purpose: Frees the mpiposix-specific file access properties.
+ * Purpose: Frees the mpiposix-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* Apr 24, 2003
*
* Modifications:
@@ -572,10 +572,10 @@ done:
static herr_t
H5FD_mpiposix_fapl_free(void *_fa)
{
- herr_t ret_value = SUCCEED;
- H5FD_mpiposix_fapl_t *fa = (H5FD_mpiposix_fapl_t*)_fa;
+ H5FD_mpiposix_fapl_t *fa = (H5FD_mpiposix_fapl_t*)_fa;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_ENTER_NOAPI(H5FD_mpiposix_fapl_free, FAIL)
assert(fa);
/* Free the internal communicator */
@@ -583,8 +583,7 @@ H5FD_mpiposix_fapl_free(void *_fa)
MPI_Comm_free(&fa->comm);
H5MM_xfree(fa);
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpiposix_fapl_free() */
@@ -592,11 +591,11 @@ done:
* Function: H5FD_mpiposix_open
*
* Purpose: Opens a file with name NAME. The FLAGS are a bit field with
- * purpose similar to the second argument of open(2) and which
- * are defined in H5Fpublic.h. The file access property list
- * FAPL_ID contains the properties driver properties and MAXADDR
- * is the largest address which this file will be expected to
- * access. This is collective.
+ * purpose similar to the second argument of open(2) and which
+ * are defined in H5Fpublic.h. The file access property list
+ * FAPL_ID contains the properties driver properties and MAXADDR
+ * is the largest address which this file will be expected to
+ * access. This is collective.
*
* Return: Success: A new file pointer.
* Failure: NULL
@@ -605,27 +604,27 @@ done:
* Thursday, July 11, 2002
*
* Modifications:
- * Albert Cheng, 2003-04-24
- * Duplicate the communicator so that file is insulated from the
- * old one.
+ * Albert Cheng, 2003-04-24
+ * Duplicate the communicator so that file is insulated from the
+ * old one.
*
*-------------------------------------------------------------------------
*/
static H5FD_t *
H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+ haddr_t maxaddr)
{
- H5FD_mpiposix_t *file=NULL; /* New MPIPOSIX file struct */
+ H5FD_mpiposix_t *file=NULL; /* New MPIPOSIX file struct */
int o_flags; /* Flags for file open call */
- int fd=(-1); /* File handle for file opened */
- int mpi_rank; /* MPI rank of this process */
- int mpi_size; /* Total number of MPI processes */
- int mpi_code; /* mpi return code */
- const H5FD_mpiposix_fapl_t *fa=NULL; /* MPIPOSIX file access property list information */
- H5FD_mpiposix_fapl_t _fa; /* Private copy of default file access property list information */
+ int fd=(-1); /* File handle for file opened */
+ int mpi_rank; /* MPI rank of this process */
+ int mpi_size; /* Total number of MPI processes */
+ int mpi_code; /* mpi return code */
+ const H5FD_mpiposix_fapl_t *fa=NULL; /* MPIPOSIX file access property list information */
+ H5FD_mpiposix_fapl_t _fa; /* Private copy of default file access property list information */
H5P_genplist_t *plist; /* Property list pointer */
h5_stat_t sb; /* Portable 'stat' struct */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int results;
@@ -633,7 +632,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
H5FD_t *ret_value=NULL; /* Return value */
MPI_Comm comm_dup=MPI_COMM_NULL;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if (!name || !*name)
@@ -647,18 +646,18 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
if (H5P_FILE_ACCESS_DEFAULT==fapl_id || H5FD_MPIPOSIX!=H5P_get_driver(plist)) {
- _fa.comm = MPI_COMM_SELF; /*default*/
+ _fa.comm = MPI_COMM_SELF; /*default*/
_fa.use_gpfs = FALSE;
- fa = &_fa;
+ fa = &_fa;
} /* end if */
else {
- fa = H5P_get_driver_info(plist);
- assert(fa);
+ fa = H5P_get_driver_info(plist);
+ assert(fa);
} /* end else */
/* Duplicate the communicator for use by this file. */
if (MPI_SUCCESS != (mpi_code=MPI_Comm_dup(fa->comm, &comm_dup)))
- HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
+ HMPI_GOTO_ERROR(NULL, "MPI_Comm_dup failed", mpi_code)
/* Get the MPI rank of this process and the total number of processes */
if (MPI_SUCCESS != (mpi_code=MPI_Comm_rank (comm_dup, &mpi_rank)))
@@ -759,7 +758,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
file->fd = fd;
file->eof = sb.st_size;
- /* for _WIN32 support. _WIN32 'stat' does not have st_blksize and st_blksize
+ /* for H5_HAVE_WIN32_API support. H5_HAVE_WIN32_API 'stat' does not have st_blksize and st_blksize
is only used for the H5_HAVE_GPFS case */
#ifdef H5_HAVE_GPFS
file->blksize = sb.st_blksize;
@@ -778,7 +777,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
file->op = OP_UNKNOWN;
/* Set the information for the file's device and inode */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
filehandle = _get_osfhandle(fd);
results = GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -801,8 +800,8 @@ done:
/* Close the file if it was left open */
if(fd!=(-1))
HDclose(fd);
- if (MPI_COMM_NULL != comm_dup)
- MPI_Comm_free(&comm_dup);
+ if (MPI_COMM_NULL != comm_dup)
+ MPI_Comm_free(&comm_dup);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
@@ -814,24 +813,24 @@ done:
*
* Purpose: Closes a file.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
- * Albert Cheng, 2003-04-24
- * Free the communicator stored.
+ * Albert Cheng, 2003-04-24
+ * Free the communicator stored.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpiposix_close(H5FD_t *_file)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_close, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
@@ -852,16 +851,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_cmp
+ * Function: H5FD_mpiposix_cmp
*
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
+ * Purpose: Compares two files belonging to this driver using an
+ * arbitrary (but consistent) ordering.
*
- * Return: Success: A value like strcmp()
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Return: Success: A value like strcmp()
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -871,13 +870,13 @@ done:
static int
H5FD_mpiposix_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_mpiposix_t *f1 = (const H5FD_mpiposix_t*)_f1;
- const H5FD_mpiposix_t *f2 = (const H5FD_mpiposix_t*)_f2;
+ const H5FD_mpiposix_t *f1 = (const H5FD_mpiposix_t*)_f1;
+ const H5FD_mpiposix_t *f2 = (const H5FD_mpiposix_t*)_f2;
int ret_value=0;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_cmp, H5FD_VFD_DEFAULT)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -907,15 +906,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_query
+ * Function: H5FD_mpiposix_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -923,41 +922,40 @@ done:
* John Mainzer -- 9/21/05
* Modified code to turn off the
* H5FD_FEAT_ACCUMULATE_METADATA_WRITE flag.
- * With the movement of all cache writes to process 0,
- * this flag has become problematic in PHDF5.
+ * With the movement of all cache writes to process 0,
+ * this flag has become problematic in PHDF5.
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_mpiposix_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */)
{
- herr_t ret_value=SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_mpiposix_query, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags=0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags|=H5FD_FEAT_HAS_MPI; /* This driver uses MPI */
+ *flags|=H5FD_FEAT_ALLOCATE_EARLY; /* Allocate space early instead of late */
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpiposix_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_get_eoa
+ * Function: H5FD_mpiposix_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
- * Failure: HADDR_UNDEF
+ * Return: Success: The end-of-address marker.
+ * Failure: HADDR_UNDEF
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -971,32 +969,27 @@ static haddr_t
H5FD_mpiposix_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- /* Set return value */
- ret_value=file->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_mpiposix_get_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_set_eoa
+ * Function: H5FD_mpiposix_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1009,37 +1002,35 @@ done:
static herr_t
H5FD_mpiposix_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_set_eoa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
file->eoa = addr;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_mpi_posix_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_get_eof
+ * Function: H5FD_mpiposix_get_eof
*
- * Purpose: Gets the end-of-file marker for the file. The EOF marker
- * is the real size of the file.
+ * Purpose: Gets the end-of-file marker for the file. The EOF marker
+ * is the real size of the file.
*
- * The MPIPOSIX driver doesn't bother keeping this field updated
- * since that's a relatively expensive operation. Fortunately
- * the library only needs the EOF just after the file is opened
- * in order to determine whether the file is empty, truncated,
- * or okay.
+ * The MPIPOSIX driver doesn't bother keeping this field updated
+ * since that's a relatively expensive operation. Fortunately
+ * the library only needs the EOF just after the file is opened
+ * in order to determine whether the file is empty, truncated,
+ * or okay.
*
- * Return: Success: The end-of-address marker.
- * Failure: HADDR_UNDEF
+ * Return: Success: The end-of-address marker.
+ * Failure: HADDR_UNDEF
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1049,19 +1040,14 @@ done:
static haddr_t
H5FD_mpiposix_get_eof(const H5FD_t *_file)
{
- const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- haddr_t ret_value; /* Return value */
+ const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eof, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- /* Set return value */
- ret_value=MAX(file->eof,file->eoa);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(MAX(file->eof,file->eoa))
} /* end H5FD_mpiposix_get_eof() */
@@ -1085,7 +1071,7 @@ H5FD_mpiposix_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
H5FD_mpiposix_t *file = (H5FD_mpiposix_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_get_handle, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1098,21 +1084,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_read
+ * Function: H5FD_mpiposix_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * Reading past the end of the file returns zeros instead of
- * failing.
+ * Reading past the end of the file returns zeros instead of
+ * failing.
*
- * Return: Success: Non-negative. Result is stored in caller-supplied
- * buffer BUF.
- * Failure: Negative, Contents of buffer BUF are undefined.
+ * Return: Success: Non-negative. Result is stored in caller-supplied
+ * buffer BUF.
+ * Failure: Negative, Contents of buffer BUF are undefined.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1121,13 +1107,13 @@ done:
*/
static herr_t
H5FD_mpiposix_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+ void *buf/*out*/)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
- ssize_t nbytes; /* Number of bytes read each I/O call */
- herr_t ret_value=SUCCEED;
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ ssize_t nbytes; /* Number of bytes read each I/O call */
+ herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_read, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
@@ -1200,17 +1186,17 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_write
+ * Function: H5FD_mpiposix_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID using potentially complex file and buffer types to
- * effect the transfer.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID using potentially complex file and buffer types to
+ * effect the transfer.
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1225,17 +1211,17 @@ done:
*/
static herr_t
H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
#if 0 /* JRM */
- int mpi_code; /* MPI return code */
+ int mpi_code; /* MPI return code */
#endif /* JRM */
- ssize_t nbytes; /* Number of bytes written each I/O call */
+ ssize_t nbytes; /* Number of bytes written each I/O call */
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_write, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
@@ -1262,10 +1248,10 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
* writes between processes, but we should really just flag an error
* whenever any process other than process 0 attempts to write
* metadata.
- * -- JRM 9/1/05
+ * -- JRM 9/1/05
*/
if(type!=H5FD_MEM_DRAW) {
- unsigned block_before_meta_write=0; /* Whether to block before a metadata write */
+ unsigned block_before_meta_write=0; /* Whether to block before a metadata write */
/* Check if we need to syncronize all processes before attempting metadata write
* (Prevents race condition where the process writing the metadata goes ahead
@@ -1363,11 +1349,11 @@ done:
} /* end if */
#if 0 /* JRM */
/* Since metadata writes are now done by process 0 only, this broadcast
- * is no longer needed. I leave it in and commented out to remind us
- * that we need to re-work this function to reflect this reallity.
- *
- * -- JRM 9/1/05
- */
+ * is no longer needed. I leave it in and commented out to remind us
+ * that we need to re-work this function to reflect this reallity.
+ *
+ * -- JRM 9/1/05
+ */
/* Guard against getting into metadata broadcast in failure cases */
else {
@@ -1386,11 +1372,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_mpiposix_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: Success: Non-negative
+ * Failure: Negative
*
* Programmer: Quincey Koziol
* Thursday, July 11, 2002
@@ -1400,15 +1386,15 @@ done:
static herr_t
H5FD_mpiposix_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
-#ifdef _WIN32
+ H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
-#endif /* _WIN32 */
- int mpi_code; /* MPI return code */
+#endif /* H5_HAVE_WIN32_API */
+ int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FD_mpiposix_truncate, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
HDassert(H5FD_MPIPOSIX == file->pub.driver_id);
@@ -1417,7 +1403,7 @@ H5FD_mpiposix_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closi
if(file->eoa > file->last_eoa) {
/* Use the round-robin process to truncate (extend) the file */
if(file->mpi_rank == H5_PAR_META_WRITE) {
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
/* Map the posix file handle to a Windows file handle */
filehandle = _get_osfhandle(file->fd);
@@ -1427,10 +1413,10 @@ H5FD_mpiposix_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closi
SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle) == 0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
if(-1==file_truncate(file->fd, (file_offset_t)file->eoa))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
} /* end if */
/* Don't let any proc return until all have extended the file.
@@ -1457,14 +1443,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_mpi_rank
+ * Function: H5FD_mpiposix_mpi_rank
*
- * Purpose: Returns the MPI rank for a process
+ * Purpose: Returns the MPI rank for a process
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1475,30 +1461,25 @@ static int
H5FD_mpiposix_mpi_rank(const H5FD_t *_file)
{
const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_mpi_rank, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- /* Set return value */
- ret_value=file->mpi_rank;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->mpi_rank)
} /* end H5FD_mpiposix_mpi_rank() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_mpi_size
+ * Function: H5FD_mpiposix_mpi_size
*
- * Purpose: Returns the number of MPI processes
+ * Purpose: Returns the number of MPI processes
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1509,31 +1490,26 @@ static int
H5FD_mpiposix_mpi_size(const H5FD_t *_file)
{
const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_mpi_size, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- /* Set return value */
- ret_value=file->mpi_size;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->mpi_size)
} /* end H5FD_mpiposix_mpi_size() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mpiposix_communicator
+ * Function: H5FD_mpiposix_communicator
*
- * Purpose: Returns the MPI communicator for the file.
+ * Purpose: Returns the MPI communicator for the file.
*
- * Return: Success: The communicator
+ * Return: Success: The communicator
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 11, 2002
*
* Modifications:
@@ -1544,18 +1520,13 @@ static MPI_Comm
H5FD_mpiposix_communicator(const H5FD_t *_file)
{
const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
- MPI_Comm ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_mpiposix_communicator, MPI_COMM_NULL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- /* Set return value */
- ret_value=file->comm;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(file->comm)
} /* end H5FD_mpi_posix_communicator() */
#endif /*H5_HAVE_PARALLEL*/
diff --git a/src/H5FDmpiposix.h b/src/H5FDmpiposix.h
index 832839e..af13fad 100644
--- a/src/H5FDmpiposix.h
+++ b/src/H5FDmpiposix.h
@@ -42,7 +42,6 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_mpiposix_init(void);
-H5_DLL void H5FD_mpiposix_term(void);
H5_DLL herr_t H5Pset_fapl_mpiposix(hid_t fapl_id, MPI_Comm comm, hbool_t use_gpfs);
H5_DLL herr_t H5Pget_fapl_mpiposix(hid_t fapl_id, MPI_Comm *comm/*out*/, hbool_t *use_gpfs/*out*/);
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 328b530..5751596 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -97,9 +97,11 @@ typedef struct H5FD_multi_t {
H5FD_multi_fapl_t fa; /*driver-specific file access properties*/
haddr_t memb_next[H5FD_MEM_NTYPES];/*addr of next member */
H5FD_t *memb[H5FD_MEM_NTYPES]; /*member pointers */
- /*haddr_t eoa;*/ /*end of allocated addresses. Took it out
- *because individual files have their own
- *eoa. */
+ haddr_t memb_eoa[H5FD_MEM_NTYPES]; /*EOA for individual files,
+ *end of allocated addresses. v1.6 library
+ *have the EOA for the entire file. But it's
+ *meaningless for MULTI file. We replaced it
+ *with the EOAs for individual files */
unsigned flags; /*file open flags saved for debugging */
char *name; /*name passed to H5Fopen or H5Fcreate */
} H5FD_multi_t;
@@ -115,6 +117,7 @@ static int compute_next(H5FD_multi_t *file);
static int open_members(H5FD_multi_t *file);
/* Callback prototypes */
+static herr_t H5FD_multi_term(void);
static hsize_t H5FD_multi_sb_size(H5FD_t *file);
static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/,
unsigned char *buf/*out*/);
@@ -150,6 +153,7 @@ static const H5FD_class_t H5FD_multi_g = {
"multi", /*name */
HADDR_MAX, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_multi_term, /*terminate */
H5FD_multi_sb_size, /*sb_size */
H5FD_multi_sb_encode, /*sb_encode */
H5FD_multi_sb_decode, /*sb_decode */
@@ -247,21 +251,20 @@ H5FD_multi_init(void)
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_multi_term(void)
{
/* Reset VFL ID */
H5FD_MULTI_g=0;
+ return 0;
} /* end H5FD_multi_term() */
@@ -969,6 +972,9 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
if (file->memb[mt])
if(H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt])<0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1)
+
+ /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) */
+ file->memb_eoa[mt] = memb_eoa[mt];
} END_MEMBERS;
return 0;
@@ -1221,7 +1227,9 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
/*
* Initialize the file from the file access properties, using default
- * values if necessary.
+ * values if necessary. Make sure to use CALLOC here because the code
+ * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa
+ * in H5FD_multi_t.
*/
if(NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t))))
H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL)
@@ -1563,6 +1571,10 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
* for MULTI file. This function only sets eoa for individual
* file.
*
+ * Raymond Lu
+ * 21 June 2011
+ * Backward compatibility of EOA. Please the comment in the
+ * code.
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1580,6 +1592,17 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
+ /* Handle backward compatibility in a quick and simple way. v1.6 library had EOA for the entire virtual
+ * file. But it wasn't meaningful. So v1.8 library doesn't have it anymore. It saves the EOA for the
+ * metadata file, instead. Here we try to figure out whether the EOA is from a v1.6 file by comparing its
+ * value. If it is a big value, we assume it's from v1.6 and simply discard it. This is the normal case
+ * when the metadata file has the smallest starting address. If the metadata file has the biggest address,
+ * the EOAs of v1.6 and v1.8 files are the same. It won't cause any trouble. (Please see Issue 2598
+ * in Jira) SLU - 2011/6/21
+ */
+ if(H5FD_MEM_SUPER == type && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > file->memb_eoa[H5FD_MEM_SUPER])
+ return 0;
+
assert(eoa >= file->fa.memb_addr[mmt]);
assert(eoa < file->memb_next[mmt]);
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index c7e54ce..da16b0c 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -22,17 +22,12 @@
#ifndef H5FDmulti_H
#define H5FDmulti_H
-#include "H5Ipublic.h"
-#include "H5Ppublic.h" /* Property lists */
-#include "H5Fpublic.h"
-
#define H5FD_MULTI (H5FD_multi_init())
#ifdef __cplusplus
extern "C" {
#endif
H5_DLL hid_t H5FD_multi_init(void);
-H5_DLL void H5FD_multi_term(void);
H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
const hid_t *memb_fapl, const char * const *memb_name,
const haddr_t *memb_addr, hbool_t relax);
@@ -50,3 +45,4 @@ H5_DLL herr_t H5Pset_fapl_split(hid_t fapl, const char *meta_ext,
#endif
#endif
+
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index c8ec658..f495e2d 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -209,8 +209,19 @@ typedef enum H5F_mem_t H5FD_mem_t;
* the handle for the VFD (returned with the 'get_handle' callback) is
* of type 'int' and is compatible with POSIX I/O calls.
*/
-#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
-
+#define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080
+ /*
+ * Defining the H5FD_FEAT_HAS_MPI for a VFL driver means that
+ * the driver makes use of MPI communication and code may retrieve
+ * communicator/rank information from it
+ */
+#define H5FD_FEAT_HAS_MPI 0x00000100
+ /*
+ * Defining the H5FD_FEAT_ALLOCATE_EARLY for a VFL driver means that
+ * the library will use the H5D_ALLOC_TIME_EARLY on dataset create
+ * instead of the default H5D_ALLOC_TIME_LATE
+ */
+#define H5FD_FEAT_ALLOCATE_EARLY 0x00000200
/* Forward declaration */
typedef struct H5FD_t H5FD_t;
@@ -220,6 +231,7 @@ typedef struct H5FD_class_t {
const char *name;
haddr_t maxaddr;
H5F_close_degree_t fc_degree;
+ herr_t (*terminate)(void);
hsize_t (*sb_size)(H5FD_t *file);
herr_t (*sb_encode)(H5FD_t *file, char *name/*out*/,
unsigned char *p/*out*/);
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 94f1fc3..d1e62f9 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -42,11 +42,25 @@
/* The driver identification number, initialized at runtime */
static hid_t H5FD_SEC2_g = 0;
-/*
- * The description of a file belonging to this driver. The `eoa' and `eof'
+/* Since Windows doesn't follow the rest of the world when it comes
+ * to POSIX I/O types, some typedefs and constants are needed to avoid
+ * making the code messy with #ifdefs.
+ */
+#ifdef H5_HAVE_WIN32_API
+typedef unsigned int h5_sec2_io_t;
+typedef int h5_sec2_io_ret_t;
+static int H5_SEC2_MAX_IO_BYTES_g = INT_MAX;
+#else
+/* Unix, everyone else */
+typedef size_t h5_sec2_io_t;
+typedef ssize_t h5_sec2_io_ret_t;
+static size_t H5_SEC2_MAX_IO_BYTES_g = SSIZET_MAX;
+#endif /* H5_HAVE_WIN32_API */
+
+/* The description of a file belonging to this driver. The `eoa' and `eof'
* determine the amount of hdf5 address space in use and the high-water mark
- * of the file (the current size of the underlying Unix file). The `pos'
- * value is used to eliminate file position updates when they would be a
+ * of the file (the current size of the underlying filesystem file). The
+ * `pos' value is used to eliminate file position updates when they would be a
* no-op. Unfortunately we've found systems that use separate file position
* indicators for reading and writing so the lseek can only be eliminated if
* the current operation is the same as the previous operation. When opening
@@ -55,57 +69,62 @@ static hid_t H5FD_SEC2_g = 0;
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_sec2_t {
- H5FD_t pub; /*public stuff, must be first */
- int fd; /*the unix file */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- H5FD_file_op_t op; /*last operation */
- char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
-#ifndef _WIN32
- /*
- * On most systems the combination of device and i-node number uniquely
- * identify a file.
+ H5FD_t pub; /* public stuff, must be first */
+ int fd; /* the filesystem file descriptor */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* end of file; current file size */
+ haddr_t pos; /* current file I/O position */
+ H5FD_file_op_t op; /* last operation */
+ char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */
+#ifndef H5_HAVE_WIN32_API
+ /* On most systems the combination of device and i-node number uniquely
+ * identify a file. Note that Cygwin, MinGW and other Windows POSIX
+ * environments have the stat function (which fakes inodes)
+ * and will use the 'device + inodes' scheme as opposed to the
+ * Windows code further below.
*/
- dev_t device; /*file device number */
+ dev_t device; /* file device number */
#ifdef H5_VMS
- ino_t inode[3]; /*file i-node number */
+ ino_t inode[3]; /* file i-node number */
#else
- ino_t inode; /*file i-node number */
-#endif /*H5_VMS*/
+ ino_t inode; /* file i-node number */
+#endif /* H5_VMS */
#else
- /*
- * On _WIN32 the low-order word of a unique identifier associated with the
- * file and the volume serial number uniquely identify a file. This number
- * (which, both? -rpm) may change when the system is restarted or when the
- * file is opened. After a process opens a file, the identifier is
- * constant until the file is closed. An application can use this
- * identifier and the volume serial number to determine whether two
- * handles refer to the same file.
+ /* Files in windows are uniquely identified by the volume serial
+ * number and the file index (both low and high parts).
+ *
+ * There are caveats where these numbers can change, especially
+ * on FAT file systems. On NTFS, however, a file should keep
+ * those numbers the same until renamed or deleted (though you
+ * can use ReplaceFile() on NTFS to keep the numbers the same
+ * while renaming).
+ *
+ * See the MSDN "BY_HANDLE_FILE_INFORMATION Structure" entry for
+ * more information.
+ *
+ * http://msdn.microsoft.com/en-us/library/aa363788(v=VS.85).aspx
*/
- DWORD fileindexlo;
- DWORD fileindexhi;
-#endif
-
- /* Information from file open flags, for SWMR access */
- hbool_t swmr_read; /* Whether the file is open for SWMR read access */
+ DWORD nFileIndexLow;
+ DWORD nFileIndexHigh;
+ DWORD dwVolumeSerialNumber;
+
+ HANDLE hFile; /* Native windows file handle */
+#endif /* H5_HAVE_WIN32_API */
+
+ /* Information from properties set by 'h5repart' tool
+ *
+ * Whether to eliminate the family driver info and convert this file to
+ * a single file.
+ */
+ hbool_t fam_to_sec2;
- /* Information from properties set by 'h5repart' tool */
- hbool_t fam_to_sec2; /* Whether to eliminate the family driver info
- * and convert this file to a single file */
+ /* Information from file open flags, for SWMR access:
+ *
+ * Whether the file is open for SWMR read access.
+ */
+ hbool_t swmr_read;
} H5FD_sec2_t;
-
-/*
- * This driver supports systems that have the lseek64() function by defining
- * some macros here so we don't have to have conditional compilations later
- * throughout the code.
- *
- * HDoff_t: The datatype for file offsets, the second argument of
- * the lseek() or lseek64() call.
- *
- */
-
/*
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
@@ -130,6 +149,7 @@ typedef struct H5FD_sec2_t {
(HDoff_t)((A)+(Z))<(HDoff_t)(A))
/* Prototypes */
+static herr_t H5FD_sec2_term(void);
static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_sec2_close(H5FD_t *_file);
@@ -149,6 +169,7 @@ static const H5FD_class_t H5FD_sec2_g = {
"sec2", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_sec2_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -199,7 +220,7 @@ DESCRIPTION
static herr_t
H5FD_sec2_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_sec2_init())
} /* H5FD_sec2_init_interface() */
@@ -224,7 +245,7 @@ H5FD_sec2_init(void)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_sec2_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5I_VFL != H5I_get_type(H5FD_SEC2_g))
H5FD_SEC2_g = H5FD_register(&H5FD_sec2_g, sizeof(H5FD_class_t), FALSE);
@@ -242,22 +263,22 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_sec2_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
H5FD_SEC2_g = 0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_sec2_term() */
@@ -281,7 +302,7 @@ H5Pset_fapl_sec2(hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_sec2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", fapl_id);
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
@@ -297,7 +318,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_open
*
- * Purpose: Create and/or opens a Unix file as an HDF5 file.
+ * Purpose: Create and/or opens a file as an HDF5 file.
*
* Return: Success: A pointer to a new file data structure. The
* public fields will be initialized by the
@@ -312,17 +333,16 @@ done:
static H5FD_t *
H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_sec2_t *file = NULL; /* sec2 VFD info */
- int fd = (-1); /* File descriptor */
- int o_flags; /* Flags for open() call */
-#ifdef _WIN32
- HFILE filehandle;
+ H5FD_sec2_t *file = NULL; /* sec2 VFD info */
+ int fd = -1; /* File descriptor */
+ int o_flags; /* Flags for open() call */
+#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- H5FD_t *ret_value; /* Return value */
+ h5_stat_t sb;
+ H5FD_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -347,9 +367,9 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Open the file */
if((fd = HDopen(name, o_flags, 0666)) < 0) {
int myerrno = errno;
-
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', errno = %d, error message = '%s', flags = %x, o_flags = %x", name, myerrno, HDstrerror(myerrno), flags, (unsigned)o_flags);
} /* end if */
+
if(HDfstat(fd, &sb) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
@@ -361,22 +381,27 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5_ASSIGN_OVERFLOW(file->eof, sb.st_size, h5_stat_size_t, haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef _WIN32
- filehandle = _get_osfhandle(fd);
- (void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
- file->fileindexhi = fileinfo.nFileIndexHigh;
- file->fileindexlo = fileinfo.nFileIndexLow;
-#else /* _WIN32 */
+#ifdef H5_HAVE_WIN32_API
+ file->hFile = (HANDLE)_get_osfhandle(fd);
+ if(INVALID_HANDLE_VALUE == file->hFile)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle")
+
+ if(!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information")
+
+ file->nFileIndexHigh = fileinfo.nFileIndexHigh;
+ file->nFileIndexLow = fileinfo.nFileIndexLow;
+ file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber;
+#else /* H5_HAVE_WIN32_API */
file->device = sb.st_dev;
#ifdef H5_VMS
file->inode[0] = sb.st_ino[0];
file->inode[1] = sb.st_ino[1];
file->inode[2] = sb.st_ino[2];
-#else
+#else /* H5_VMS */
file->inode = sb.st_ino;
-#endif /*H5_VMS*/
-
-#endif /* _WIN32 */
+#endif /* H5_VMS */
+#endif /* H5_HAVE_WIN32_API */
/* Retain a copy of the name used to open the file, for possible error reporting */
HDstrncpy(file->filename, name, sizeof(file->filename));
@@ -422,7 +447,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_close
*
- * Purpose: Closes a Unix file.
+ * Purpose: Closes an HDF5 file.
*
* Return: Success: 0
* Failure: -1, file not closed.
@@ -438,7 +463,7 @@ H5FD_sec2_close(H5FD_t *_file)
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(file);
@@ -477,16 +502,18 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
-#ifdef _WIN32
- if(f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
- if(f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
+#ifdef H5_HAVE_WIN32_API
+ if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
+ if(f1->dwVolumeSerialNumber > f2->dwVolumeSerialNumber) HGOTO_DONE(1)
- if(f1->fileindexlo < f2->fileindexlo) HGOTO_DONE(-1)
- if(f1->fileindexlo > f2->fileindexlo) HGOTO_DONE(1)
+ if(f1->nFileIndexHigh < f2->nFileIndexHigh) HGOTO_DONE(-1)
+ if(f1->nFileIndexHigh > f2->nFileIndexHigh) HGOTO_DONE(1)
-#else
+ if(f1->nFileIndexLow < f2->nFileIndexLow) HGOTO_DONE(-1)
+ if(f1->nFileIndexLow > f2->nFileIndexLow) HGOTO_DONE(1)
+#else /* H5_HAVE_WIN32_API */
#ifdef H5_DEV_T_IS_SCALAR
if(f1->device < f2->device) HGOTO_DONE(-1)
if(f1->device > f2->device) HGOTO_DONE(1)
@@ -498,16 +525,14 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) HGOTO_DONE(-1)
if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1)
#endif /* H5_DEV_T_IS_SCALAR */
-
-#ifndef H5_VMS
- if(f1->inode < f2->inode) HGOTO_DONE(-1)
- if(f1->inode > f2->inode) HGOTO_DONE(1)
-#else
+#ifdef H5_VMS
if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) HGOTO_DONE(-1)
if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) HGOTO_DONE(1)
-#endif /*H5_VMS*/
-
-#endif
+#else /* H5_VMS */
+ if(f1->inode < f2->inode) HGOTO_DONE(-1)
+ if(f1->inode > f2->inode) HGOTO_DONE(1)
+#endif /* H5_VMS */
+#endif /* H5_HAVE_WIN32_API */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -533,16 +558,16 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_query)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags = 0;
- *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
+ *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
+ *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+ *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
/* Check for flags that are set by h5repart */
if(file->fam_to_sec2)
@@ -568,12 +593,13 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
*
*-------------------------------------------------------------------------
*/
+/* ARGSUSED */
static haddr_t
H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_get_eoa)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_sec2_get_eoa() */
@@ -594,12 +620,13 @@ H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
*
*-------------------------------------------------------------------------
*/
+/* ARGSUSED */
static herr_t
H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_set_eoa)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
file->eoa = addr;
@@ -611,11 +638,11 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
* Function: H5FD_sec2_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
- * either the Unix end-of-file or the HDF5 end-of-address
+ * either the filesystem end-of-file or the HDF5 end-of-address
* markers.
*
* Return: Success: End of file address, the first address past
- * the end of the "file", either the Unix file
+ * the end of the "file", either the filesystem file
* or the HDF5 file.
* Failure: HADDR_UNDEF
*
@@ -629,7 +656,7 @@ H5FD_sec2_get_eof(const H5FD_t *_file)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_get_eof)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(MAX(file->eof, file->eoa))
} /* end H5FD_sec2_get_eof() */
@@ -654,7 +681,7 @@ H5FD_sec2_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void **file_handle)
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_get_handle)
+ FUNC_ENTER_NOAPI_NOINIT
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -685,13 +712,12 @@ done:
/* ARGSUSED */
static herr_t
H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
- haddr_t addr, size_t size, void *buf/*out*/)
+ haddr_t addr, size_t size, void *buf /*out*/)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- ssize_t nbytes;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_read)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -708,7 +734,8 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
* SWMR write operations.
*/
if(!file->swmr_read && (addr + size) > file->eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%lu, eoa=%llu",
+ (unsigned long long)addr, size, (unsigned long long)file->eoa)
/* Seek to the correct location */
if(addr != file->pos || OP_READ != file->op) {
@@ -716,33 +743,46 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
- /*
- * Read data, being careful of interrupted system calls, partial results,
+ /* Read data, being careful of interrupted system calls, partial results,
* and the end of the file.
*/
while(size > 0) {
+
+ h5_sec2_io_t bytes_in = 0; /* # of bytes to read */
+ h5_sec2_io_ret_t bytes_read = -1; /* # of bytes actually read */
+
+ /* Trying to read more bytes than the return type can handle is
+ * undefined behavior in POSIX.
+ */
+ if(size > H5_SEC2_MAX_IO_BYTES_g)
+ bytes_in = H5_SEC2_MAX_IO_BYTES_g;
+ else
+ bytes_in = (h5_sec2_io_t)size;
+
do {
- nbytes = HDread(file->fd, buf, size);
- } while(-1 == nbytes && EINTR == errno);
- if(-1 == nbytes) { /* error */
+ bytes_read = HDread(file->fd, buf, bytes_in);
+ } while(-1 == bytes_read && EINTR == errno);
+
+ if(-1 == bytes_read) { /* error */
int myerrno = errno;
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
} /* end if */
- if(0 == nbytes) {
+
+ if(0 == bytes_read) {
/* end of file but not end of format address space */
HDmemset(buf, 0, size);
break;
} /* end if */
- HDassert(nbytes >= 0);
- HDassert((size_t)nbytes <= size);
- H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
- addr += (haddr_t)nbytes;
- buf = (char *)buf + nbytes;
+
+ HDassert(bytes_read >= 0);
+ HDassert((size_t)bytes_read <= size);
+
+ size -= (size_t)bytes_read;
+ addr += (haddr_t)bytes_read;
+ buf = (char *)buf + bytes_read;
} /* end while */
/* Update current position */
@@ -777,14 +817,13 @@ done:
*/
/* ARGSUSED */
static herr_t
-H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
+ haddr_t addr, size_t size, const void *buf)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- ssize_t nbytes;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_write)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -803,28 +842,40 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
} /* end if */
- /*
- * Write the data, being careful of interrupted system calls and partial
+ /* Write the data, being careful of interrupted system calls and partial
* results
*/
while(size > 0) {
+
+ h5_sec2_io_t bytes_in = 0; /* # of bytes to write */
+ h5_sec2_io_ret_t bytes_wrote = -1; /* # of bytes written */
+
+ /* Trying to write more bytes than the return type can handle is
+ * undefined behavior in POSIX.
+ */
+ if(size > H5_SEC2_MAX_IO_BYTES_g)
+ bytes_in = H5_SEC2_MAX_IO_BYTES_g;
+ else
+ bytes_in = (h5_sec2_io_t)size;
+
do {
- nbytes = HDwrite(file->fd, buf, size);
- } while(-1 == nbytes && EINTR == errno);
- if(-1 == nbytes) { /* error */
+ bytes_wrote = HDwrite(file->fd, buf, bytes_in);
+ } while(-1 == bytes_wrote && EINTR == errno);
+
+ if(-1 == bytes_wrote) { /* error */
int myerrno = errno;
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
} /* end if */
- HDassert(nbytes > 0);
- HDassert((size_t)nbytes <= size);
- H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
- addr += (haddr_t)nbytes;
- buf = (const char *)buf + nbytes;
+
+ HDassert(bytes_wrote > 0);
+ HDassert((size_t)bytes_wrote <= size);
+
+ size -= (size_t)bytes_wrote;
+ addr += (haddr_t)bytes_wrote;
+ buf = (const char *)buf + bytes_wrote;
} /* end while */
/* Update current position and eof */
@@ -865,36 +916,48 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_sec2_truncate)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
/* Extend the file to make sure it's large enough */
if(!H5F_addr_eq(file->eoa, file->eof)) {
-#ifdef _WIN32
- HFILE filehandle; /* Windows file handle */
- LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
-
- /* Map the posix file handle to a Windows file handle */
- filehandle = _get_osfhandle(file->fd);
-
- /* Translate 64-bit integers into form Windows wants */
- /* [This algorithm is from the Windows documentation for SetFilePointer()] */
- li.QuadPart = (LONGLONG)file->eoa;
- (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(SetEndOfFile((HANDLE)filehandle) == 0)
+#ifdef H5_HAVE_WIN32_API
+ LARGE_INTEGER li; /* 64-bit (union) integer for SetFilePointer() call */
+ DWORD dwPtrLow; /* Low-order pointer bits from SetFilePointer()
+ * Only used as an error code here.
+ */
+ DWORD dwError; /* DWORD error code from GetLastError() */
+ BOOL bError; /* Boolean error flag */
+
+ /* Windows uses this odd QuadPart union for 32/64-bit portability */
+ li.QuadPart = (__int64)file->eoa;
+
+ /* Extend the file to make sure it's large enough.
+ *
+ * Since INVALID_SET_FILE_POINTER can technically be a valid return value
+ * from SetFilePointer(), we also need to check GetLastError().
+ */
+ dwPtrLow = SetFilePointer(file->hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
+ if(INVALID_SET_FILE_POINTER == dwPtrLow) {
+ dwError = GetLastError();
+ if(dwError != NO_ERROR )
+ HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer")
+ }
+
+ bError = SetEndOfFile(file->hFile);
+ if(0 == bError)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
#ifdef H5_VMS
/* Reset seek offset to the beginning of the file, so that the file isn't
* re-extended later. This may happen on Open VMS. */
if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
#endif
-
if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Update the eof value */
file->eof = file->eoa;
diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h
index b7db0d5..0c62597 100644
--- a/src/H5FDsec2.h
+++ b/src/H5FDsec2.h
@@ -22,8 +22,6 @@
#ifndef H5FDsec2_H
#define H5FDsec2_H
-#include "H5Ipublic.h"
-
#define H5FD_SEC2 (H5FD_sec2_init())
#ifdef __cplusplus
@@ -31,7 +29,6 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_sec2_init(void);
-H5_DLL void H5FD_sec2_term(void);
H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id);
#ifdef __cplusplus
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index 9895938..deb2153 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -102,7 +102,7 @@ DESCRIPTION
static herr_t
H5FD_space_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_space_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5FD_init())
} /* H5FD_space_init_interface() */
@@ -131,7 +131,7 @@ H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, hadd
hsize_t extra; /* Extra space to allocate, to align request */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_extend)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file);
@@ -199,7 +199,7 @@ H5FD_alloc_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, hsize_t size, hadd
{
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_alloc_real, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5FD_ALLOC_DEBUG
HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
#endif /* H5FD_ALLOC_DEBUG */
@@ -255,7 +255,7 @@ H5FD_alloc(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, hsize_t size,
{
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_alloc, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
/* check args */
HDassert(file);
@@ -295,7 +295,7 @@ H5FD_free_real(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr, hsize
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FD_free_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(file);
@@ -380,7 +380,7 @@ H5FD_free(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, H5F_t *f, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_free, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(file);
@@ -426,7 +426,7 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end,
haddr_t eoa; /* End of allocated space in file */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5FD_try_extend, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(file);
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 4eab71f..5c40d15 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -14,12 +14,12 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Wednesday, October 22, 1997
*
- * Purpose: This is the Posix stdio.h I/O subclass of H5Flow.
- * It also serves as an example of coding a simple file driver,
- * therefore, it should not use any non-public definitions.
+ * Purpose: This is the Posix stdio.h I/O subclass of H5Flow.
+ * It also serves as an example of coding a simple file driver,
+ * therefore, it should not use any non-public definitions.
*
* Notes: Ported to the new H5FD architecture on 10/18/99 - QAK
*
@@ -43,7 +43,7 @@
#include <unistd.h>
#endif
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
#include <windows.h>
#include <io.h>
@@ -58,7 +58,7 @@
#ifdef MAX
#undef MAX
#endif /* MAX */
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#define MAX(X,Y) ((X)>(Y)?(X):(Y))
/* The driver identification number, initialized at runtime */
static hid_t H5FD_STDIO_g = 0;
@@ -84,23 +84,23 @@ typedef enum {
* occurs), and `op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_stdio_t {
- H5FD_t pub; /*public stuff, must be first */
- FILE * fp; /*the file handle */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- H5FD_stdio_file_op op; /*last operation */
+ H5FD_t pub; /*public stuff, must be first */
+ FILE * fp; /*the file handle */
+ haddr_t eoa; /*end of allocated region */
+ haddr_t eof; /*end of file; current file size*/
+ haddr_t pos; /*current file I/O position */
+ H5FD_stdio_file_op op; /*last operation */
unsigned write_access; /* Flag to indicate the file was opened with write access */
-#ifndef _WIN32
+#ifndef H5_HAVE_WIN32_API
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
*/
- dev_t device; /*file device number */
- ino_t inode; /*file i-node number */
+ dev_t device; /*file device number */
+ ino_t inode; /*file i-node number */
#else
/*
- * On _WIN32 the low-order word of a unique identifier associated with the
+ * On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -117,18 +117,11 @@ typedef struct H5FD_stdio_t {
} H5FD_stdio_t;
/* Use similar structure as in H5private.h by defining Windows stuff first. */
-#ifdef _WIN32
- #if _MSC_VER > 1310 /* Newer than VS.NET 2003 */
- # define file_fseek _fseeki64
- # define file_offset_t __int64
- # define file_ftruncate _chsize_s /* Supported in VS 2005 or newer */
- # define file_ftell _ftelli64
- #else
- # define file_fseek fseek
- # define file_offset_t long
- # define file_ftruncate _chsize
- # define file_ftell ftell
- #endif
+#ifdef H5_HAVE_WIN32_API
+ # define file_fseek _fseeki64
+ # define file_offset_t __int64
+ # define file_ftruncate _chsize_s /* Supported in VS 2005 or newer */
+ # define file_ftell _ftelli64
#endif
/* Use file_xxx to indicate these are local macros, avoiding confusing
@@ -138,15 +131,15 @@ typedef struct H5FD_stdio_t {
*/
#ifndef file_fseek
#ifdef H5_HAVE_FSEEKO64
- # define file_fseek fseeko64
- # define file_offset_t off64_t
- # define file_ftruncate ftruncate64
- # define file_ftell ftello64
+ # define file_fseek fseeko64
+ # define file_offset_t off64_t
+ # define file_ftruncate ftruncate64
+ # define file_ftell ftello64
#else
- # define file_fseek fseeko
- # define file_offset_t off_t
- # define file_ftruncate ftruncate
- # define file_ftell ftello
+ # define file_fseek fseeko
+ # define file_offset_t off_t
+ # define file_ftruncate ftruncate
+ # define file_ftell ftello
#endif
#endif
@@ -154,25 +147,26 @@ typedef struct H5FD_stdio_t {
* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely by the second
+ * argument of the file seek function.
*/
/* adding for windows NT filesystem support. */
#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
HADDR_UNDEF==(A)+(Z) || (file_offset_t)((A)+(Z))<(file_offset_t)(A))
/* Prototypes */
+static herr_t H5FD_stdio_term(void);
static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_stdio_close(H5FD_t *lf);
@@ -191,51 +185,52 @@ static herr_t H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
static herr_t H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_stdio_g = {
- "stdio", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- 0, /*fapl_size */
- NULL, /*fapl_get */
- NULL, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_stdio_open, /*open */
- H5FD_stdio_close, /*close */
- H5FD_stdio_cmp, /*cmp */
- H5FD_stdio_query, /*query */
- NULL, /*get_type_map */
- H5FD_stdio_alloc, /*alloc */
- NULL, /*free */
- H5FD_stdio_get_eoa, /*get_eoa */
- H5FD_stdio_set_eoa, /*set_eoa */
- H5FD_stdio_get_eof, /*get_eof */
+ "stdio", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_stdio_term, /*terminate */
+ NULL, /*sb_size */
+ NULL, /*sb_encode */
+ NULL, /*sb_decode */
+ 0, /*fapl_size */
+ NULL, /*fapl_get */
+ NULL, /*fapl_copy */
+ NULL, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_stdio_open, /*open */
+ H5FD_stdio_close, /*close */
+ H5FD_stdio_cmp, /*cmp */
+ H5FD_stdio_query, /*query */
+ NULL, /*get_type_map */
+ H5FD_stdio_alloc, /*alloc */
+ NULL, /*free */
+ H5FD_stdio_get_eoa, /*get_eoa */
+ H5FD_stdio_set_eoa, /*set_eoa */
+ H5FD_stdio_get_eof, /*get_eof */
H5FD_stdio_get_handle, /*get_handle */
- H5FD_stdio_read, /*read */
- H5FD_stdio_write, /*write */
- H5FD_stdio_flush, /*flush */
- H5FD_stdio_truncate, /*truncate */
+ H5FD_stdio_read, /*read */
+ H5FD_stdio_write, /*write */
+ H5FD_stdio_flush, /*flush */
+ H5FD_stdio_truncate, /*truncate */
NULL, /*lock */
NULL, /*unlock */
- H5FD_FLMAP_SINGLE /*fl_map */
+ H5FD_FLMAP_SINGLE /*fl_map */
};
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_init
+ * Function: H5FD_stdio_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the stdio driver.
+ * Return: Success: The driver ID for the stdio driver.
*
- * Failure: Negative.
+ * Failure: Negative.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Modifications:
@@ -256,39 +251,38 @@ H5FD_stdio_init(void)
/*---------------------------------------------------------------------------
- * Function: H5FD_stdio_term
+ * Function: H5FD_stdio_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_stdio_term(void)
{
/* Reset VFL ID */
H5FD_STDIO_g=0;
+ return 0;
} /* end H5FD_stdio_term() */
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_stdio
+ * Function: H5Pset_fapl_stdio
*
- * Purpose: Modify the file access property list to use the H5FD_STDIO
- * driver defined in this source file. There are no driver
- * specific properties.
+ * Purpose: Modify the file access property list to use the H5FD_STDIO
+ * driver defined in this source file. There are no driver
+ * specific properties.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 19, 1998
*
* Modifications:
* Stolen from the sec2 driver - QAK, 10/18/99
@@ -313,27 +307,27 @@ H5Pset_fapl_stdio(hid_t fapl_id)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_open
+ * Function: H5FD_stdio_open
*
- * Purpose: Create and/or opens a Standard C file as an HDF5 file.
+ * Purpose: Create and/or opens a Standard C file as an HDF5 file.
*
- * Bugs: H5F_ACC_EXCL has a race condition. (? -QAK)
+ * Bugs: H5F_ACC_EXCL has a race condition. (? -QAK)
*
* Errors:
- * IO CANTOPENFILE File doesn't exist and CREAT wasn't
- * specified.
- * IO CANTOPENFILE Fopen failed.
- * IO FILEEXISTS File exists but CREAT and EXCL were
- * specified.
+ * IO CANTOPENFILE File doesn't exist and CREAT wasn't
+ * specified.
+ * IO CANTOPENFILE Fopen failed.
+ * IO FILEEXISTS File exists but CREAT and EXCL were
+ * specified.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
* Modifications:
* Ported to VFL/H5FD layer - QAK, 10/18/99
@@ -344,17 +338,17 @@ static H5FD_t *
H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
{
- FILE *f = NULL;
+ FILE *f = NULL;
unsigned write_access=0; /* File opened with write access? */
- H5FD_stdio_t *file=NULL;
+ H5FD_stdio_t *file=NULL;
static const char *func="H5FD_stdio_open"; /* Function Name for error reporting */
-#ifdef _WIN32
- HFILE filehandle;
- struct _BY_HANDLE_FILE_INFORMATION fileinfo;
+#ifdef H5_HAVE_WIN32_API
+ HFILE filehandle;
+ struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int fd;
-#else /* _WIN32 */
- struct stat sb;
-#endif /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
+ struct stat sb;
+#endif /* H5_HAVE_WIN32_API */
/* Sanity check on file offsets */
assert(sizeof(file_offset_t)>=sizeof(size_t));
@@ -412,7 +406,7 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
}
/* The unique key */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
/*#error "Needs correct fileindexhi & fileindexlo, code below is from sec2 driver"*/
fd = _fileno(f);
filehandle = _get_osfhandle(fd);
@@ -434,17 +428,17 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
/*-------------------------------------------------------------------------
- * Function: H5F_stdio_close
+ * Function: H5F_stdio_close
*
- * Purpose: Closes a file.
+ * Purpose: Closes a file.
*
* Errors:
- * IO CLOSEERROR Fclose failed.
+ * IO CLOSEERROR Fclose failed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
* Modifications:
* Ported to VFL/H5FD layer - QAK, 10/18/99
@@ -454,7 +448,7 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
static herr_t
H5FD_stdio_close(H5FD_t *_file)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func="H5FD_stdio_close"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -470,17 +464,17 @@ H5FD_stdio_close(H5FD_t *_file)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_cmp
+ * Function: H5FD_stdio_cmp
*
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
+ * Purpose: Compares two files belonging to this driver using an
+ * arbitrary (but consistent) ordering.
*
- * Return: Success: A value like strcmp()
+ * Return: Success: A value like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Modifications:
@@ -491,13 +485,13 @@ H5FD_stdio_close(H5FD_t *_file)
static int
H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_stdio_t *f1 = (const H5FD_stdio_t*)_f1;
- const H5FD_stdio_t *f2 = (const H5FD_stdio_t*)_f2;
+ const H5FD_stdio_t *f1 = (const H5FD_stdio_t*)_f1;
+ const H5FD_stdio_t *f2 = (const H5FD_stdio_t*)_f2;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) return -1;
if (f1->fileindexhi > f2->fileindexhi) return 1;
@@ -525,16 +519,16 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_query
+ * Function: H5FD_stdio_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
* Modifications:
@@ -561,18 +555,18 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_alloc
+ * Function: H5FD_stdio_alloc
*
- * Purpose: Allocates file memory. If fseeko isn't available, makes
+ * Purpose: Allocates file memory. If fseeko isn't available, makes
* sure the file size isn't bigger than 2GB because the
* parameter OFFSET of fseek is of the type LONG INT, limiting
* the file size to 2GB.
*
- * Return: Success: Address of new memory
+ * Return: Success: Address of new memory
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 30 March 2007
*
* Modifications:
@@ -582,8 +576,8 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
static haddr_t
H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id, hsize_t size)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
- haddr_t addr;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ haddr_t addr;
haddr_t ret_value; /* Return value */
/* Shut compiler up */
@@ -613,17 +607,17 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_get_eoa
+ * Function: H5FD_stdio_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
+ * Return: Success: The end-of-address marker.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Modifications:
@@ -638,7 +632,7 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
static haddr_t
H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*unused*/ type)
{
- const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
+ const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -651,17 +645,17 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*unused*/ type)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_set_eoa
+ * Function: H5FD_stdio_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Modifications:
@@ -675,7 +669,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*unused*/ type)
static herr_t
H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*unused*/ type, haddr_t addr)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -690,19 +684,19 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*unused*/ type, haddr_t addr)
/*-------------------------------------------------------------------------
- * Function: H5FD_stdio_get_eof
+ * Function: H5FD_stdio_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the Unix end-of-file or the HDF5 end-of-address
- * markers.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the Unix end-of-file or the HDF5 end-of-address
+ * markers.
*
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the Unix file
- * or the HDF5 file.
+ * Return: Success: End of file address, the first address past
+ * the end of the "file", either the Unix file
+ * or the HDF5 file.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Modifications:
@@ -713,7 +707,7 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*unused*/ type, haddr_t addr)
static haddr_t
H5FD_stdio_get_eof(const H5FD_t *_file)
{
- const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
+ const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -756,24 +750,24 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
/*-------------------------------------------------------------------------
- * Function: H5F_stdio_read
+ * Function: H5F_stdio_read
*
- * Purpose: Reads SIZE bytes beginning at address ADDR in file LF and
- * places them in buffer BUF. Reading past the logical or
- * physical end of file returns zeros instead of failing.
+ * Purpose: Reads SIZE bytes beginning at address ADDR in file LF and
+ * places them in buffer BUF. Reading past the logical or
+ * physical end of file returns zeros instead of failing.
*
* Errors:
- * IO READERROR Fread failed.
- * IO SEEKERROR Fseek failed.
+ * IO READERROR Fread failed.
+ * IO SEEKERROR Fseek failed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
* Modifications:
- * June 2, 1998 Albert Cheng
- * Added xfer_mode argument
+ * June 2, 1998 Albert Cheng
+ * Added xfer_mode argument
*
* Ported to VFL/H5FD layer - QAK, 10/18/99
*
@@ -783,8 +777,8 @@ static herr_t
H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *buf/*out*/)
{
- size_t n;
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ size_t n;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func="H5FD_stdio_read"; /* Function Name for error reporting */
/* Shut compiler up */
@@ -862,23 +856,23 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
/*-------------------------------------------------------------------------
- * Function: H5F_stdio_write
+ * Function: H5F_stdio_write
*
- * Purpose: Writes SIZE bytes from the beginning of BUF into file LF at
- * file address ADDR.
+ * Purpose: Writes SIZE bytes from the beginning of BUF into file LF at
+ * file address ADDR.
*
* Errors:
- * IO SEEKERROR Fseek failed.
- * IO WRITEERROR Fwrite failed.
+ * IO SEEKERROR Fseek failed.
+ * IO WRITEERROR Fwrite failed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
* Modifications:
- * June 2, 1998 Albert Cheng
- * Added xfer_mode argument
+ * June 2, 1998 Albert Cheng
+ * Added xfer_mode argument
*
* Ported to VFL/H5FD layer - QAK, 10/18/99
*
@@ -886,9 +880,9 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
*/
static herr_t
H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func="H5FD_stdio_write"; /* Function Name for error reporting */
/* Shut compiler up */
@@ -945,25 +939,25 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/*-------------------------------------------------------------------------
- * Function: H5F_stdio_flush
+ * Function: H5F_stdio_flush
*
- * Purpose: Makes sure that all data is on disk.
+ * Purpose: Makes sure that all data is on disk.
*
* Errors:
- * IO SEEKERROR fseek failed.
- * IO WRITEERROR fflush or fwrite failed.
+ * IO SEEKERROR fseek failed.
+ * IO WRITEERROR fflush or fwrite failed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
/* Shut compiler up */
@@ -990,29 +984,29 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
/*-------------------------------------------------------------------------
- * Function: H5F_stdio_truncate
+ * Function: H5F_stdio_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
* Errors:
- * IO SEEKERROR fseek failed.
- * IO WRITEERROR fflush or fwrite failed.
+ * IO SEEKERROR fseek failed.
+ * IO WRITEERROR fflush or fwrite failed.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, January 31, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, January 31, 2008
*
* Modifications:
- * Vailin Choi; June 2010
- * Fix for window failures manifested from tests in mf.c.
+ * Vailin Choi; June 2010
+ * Fix for window failures manifested from tests in mf.c.
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
/* Shut compiler up */
@@ -1028,11 +1022,11 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
if(file->eoa != file->eof) {
int fd = fileno(file->fp); /* File descriptor for HDF5 file */
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
- /* Reset seek offset to beginning of file, so that file isn't re-extended later */
+ /* Reset seek offset to beginning of file, so that file isn't re-extended later */
rewind(file->fp);
/* Map the posix file handle to a Windows file handle */
@@ -1044,14 +1038,14 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
(void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle) == 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1)
-#else /* _WIN32 */
+#else /* H5_HAVE_WIN32_API */
/* Reset seek offset to beginning of file, so that file isn't re-extended later */
rewind(file->fp);
/* Truncate file to proper length */
if(-1 == file_ftruncate(fd, (file_offset_t)file->eoa))
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1)
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
/* Update the eof value */
file->eof = file->eoa;
diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h
index 80443d8..8281705 100644
--- a/src/H5FDstdio.h
+++ b/src/H5FDstdio.h
@@ -31,7 +31,6 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_stdio_init(void);
-H5_DLL void H5FD_stdio_term(void);
H5_DLL herr_t H5Pset_fapl_stdio(hid_t fapl_id);
#ifdef __cplusplus
diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c
index efdd0ba..8dd7555 100644
--- a/src/H5FDwindows.c
+++ b/src/H5FDwindows.c
@@ -13,271 +13,37 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Scott Wegner <swegner@hdfgroup.org>
- * Based on code by Robb Matzke
- * May 24, 2007
- *
- * Purpose: We would like to create a driver specifically for Windows
- * to utilize the Win32 API, and reduce the maintenence demands
- * for the other file drivers. Our other motivation is that
- * the Windows system calls of the existing sec2 driver differ
- * from those on other platforms, and are not 64-bit compatible.
- * From the start, this will have the structure very similar
- * to our sec2 driver, but make system calls more similar to
- * our stdio driver.
- */
-
-/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_windows_init_interface
-
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDwindows.h" /* Windows file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDwindows.h" /* Windows file driver */
+#include "H5FDsec2.h" /* Windows file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_WINDOWS
-/* The driver identification number, initialized at runtime */
-static hid_t H5FD_WINDOWS_g = 0;
-
-/* File operations */
-#define OP_UNKNOWN 0
-#define OP_READ 1
-#define OP_WRITE 2
-
-/*
- * The description of a file belonging to this driver. The `eoa' and `eof'
- * determine the amount of hdf5 address space in use and the high-water mark
- * of the file (the current size of the underlying file). The `pos'
- * value is used to eliminate file position updates when they would be a
- * no-op. Unfortunately we've found systems that use separate file position
- * indicators for reading and writing so the lseek can only be eliminated if
- * the current operation is the same as the previous operation. When opening
- * a file the `eof' will be set to the current file size, `eoa' will be set
- * to zero, `pos' will be set to H5F_ADDR_UNDEF (as it is when an error
- * occurs), and `op' will be set to H5F_OP_UNKNOWN.
- */
-typedef struct H5FD_windows_t {
- H5FD_t pub; /*public stuff, must be first */
- /*
- * .NET doesn't support our 64-bit safe stdio functions,
- * so we will use io.h functions instead.
- */
-#ifndef WINDOWS_USE_STDIO
- int fd; /*the file descriptor */
-#else
- FILE *fp; /*the file handle */
-#endif /*MSC_VER */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*end of file; current file size*/
- haddr_t pos; /*current file I/O position */
- int op; /*last operation */
- unsigned write_access; /*flag to indicate the file was opened with write access */
- /*
- * On _WIN32 the low-order word of a unique identifier associated with the
- * file and the volume serial number uniquely identify a file. This number
- * may change when the system is restarted or when the
- * file is opened. After a process opens a file, the identifier is
- * constant until the file is closed. An application can use this
- * identifier and the volume serial number to determine whether two
- * handles refer to the same file.
- */
- DWORD fileindexlo;
- DWORD fileindexhi;
- DWORD volumeserialnumber;
-
- /* Information from file open flags, for SWMR access */
- hbool_t swmr_read; /* Whether the file is open for SWMR read access */
-
- /* Information from properties set by 'h5repart' tool */
- hbool_t fam_to_sec2; /* Whether to eliminate the family driver info
- * and convert this file to a single file */
-} H5FD_windows_t;
-
-
-/* These are used by the macros below */
-#define file_offset_t __int64
-#define fseek_offset_t __int64
-
-/*
- * These macros check for overflow of various quantities. These macros
- * assume that fseek_offset_t is signed and haddr_t and size_t are unsigned.
- *
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
- *
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
- *
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
- */
-#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (fseek_offset_t)((A)+(Z))<(fseek_offset_t)(A))
-
-/* Prototypes */
-static H5FD_t *H5FD_windows_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
-static herr_t H5FD_windows_close(H5FD_t *_file);
-static int H5FD_windows_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_windows_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_windows_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id,
- hsize_t size);
-static haddr_t H5FD_windows_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_windows_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_windows_get_eof(const H5FD_t *_file);
-static herr_t H5FD_windows_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_windows_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_windows_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-static herr_t H5FD_windows_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_windows_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-
-static const H5FD_class_t H5FD_windows_g = {
- "windows", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- 0, /*fapl_size */
- NULL, /*fapl_get */
- NULL, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_windows_open, /*open */
- H5FD_windows_close, /*close */
- H5FD_windows_cmp, /*cmp */
- H5FD_windows_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_windows_get_eoa, /*get_eoa */
- H5FD_windows_set_eoa, /*set_eoa */
- H5FD_windows_get_eof, /*get_eof */
- H5FD_windows_get_handle, /*get_handle */
- H5FD_windows_read, /*read */
- H5FD_windows_write, /*write */
- H5FD_windows_flush, /*flush */
- H5FD_windows_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_SINGLE /*fl_map */
-};
-
-/* Declare a free list to manage the H5FD_windows_t struct */
-H5FL_DEFINE_STATIC(H5FD_windows_t);
-
-/*--------------------------------------------------------------------------
-NAME
- H5FD_windows_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_windows_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_windows_init currently).
-
---------------------------------------------------------------------------*/
-static herr_t
-H5FD_windows_init_interface(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_windows_init_interface)
-
- FUNC_LEAVE_NOAPI(H5FD_windows_init())
-} /* H5FD_windows_init_interface() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_windows_init
- *
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Function: H5Pset_fapl_windows
*
- * Return: Success: The driver ID for the windows driver.
- * Failure: Negative.
+ * Purpose: Modify the file access property list to use the H5FD_WINDOWS
+ * driver defined in this source file. There are no driver
+ * specific properties.
*
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24, 2007
+ * NOTE: The Windows VFD was merely a merge of the SEC2 and STDIO drivers
+ * so it has been retired. Selecting the Windows VFD will actually
+ * set the SEC2 VFD (though for backwards compatibility, we'll keep
+ * the H5FD_WINDOWS symbol).
*
- *-------------------------------------------------------------------------
- */
-hid_t
-H5FD_windows_init(void)
-{
- hid_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_init, FAIL)
-
- if(H5I_VFL != H5I_get_type(H5FD_WINDOWS_g))
- H5FD_WINDOWS_g = H5FD_register(&H5FD_windows_g, sizeof(H5FD_class_t), FALSE);
-
- /* Set return value */
- ret_value = H5FD_WINDOWS_g;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_windows_init() */
-
-/*---------------------------------------------------------------------------
- * Function: H5FD_windows_term
*
- * Purpose: Shut down the VFD
+ * Return: Non-negative on success/Negative on failure
*
- * Return: <none>
- *
- * Programmer: Scott Wegner
- * Based on code by Quincey Koziol
- * Thursday, May 24 2007
- *
- * Modification:
- *
- *---------------------------------------------------------------------------
- */
-void
-H5FD_windows_term(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_windows_term)
-
- /* Reset VFL ID */
- H5FD_WINDOWS_g=0;
-
- FUNC_LEAVE_NOAPI_VOID
-} /* end H5FD_windows_term() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_windows
- *
- * Purpose: Modify the file access property list to use the H5FD_WINDOWS
- * driver defined in this source file. There are no driver
- * specific properties.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
+ * Programmer: Dana Robinson
+ * October 10, 2011
*
*-------------------------------------------------------------------------
*/
@@ -287,810 +53,17 @@ H5Pset_fapl_windows(hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value;
- FUNC_ENTER_API(H5Pset_fapl_windows, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", fapl_id);
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- ret_value= H5P_set_driver(plist, H5FD_WINDOWS, NULL);
+ ret_value = H5P_set_driver(plist, H5FD_WINDOWS, NULL);
done:
FUNC_LEAVE_API(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_open
- *
- * Purpose: Create and/or opens a Windows file as an HDF5 file.
- *
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
- *
- * Failure: NULL
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static H5FD_t *
-H5FD_windows_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
- haddr_t maxaddr)
-{
- int fd = -1;
- FILE *f = NULL;
- H5FD_windows_t *file = NULL;
- HANDLE filehandle;
- struct _BY_HANDLE_FILE_INFORMATION fileinfo;
- H5FD_t *ret_value;
- struct _stati64 sb;
-#ifndef WINDOWS_USE_STDIO
- int o_flags;
-#else
- unsigned write_access = 0;
-#endif /* WINDOWS_USE_STDIO */
-
- FUNC_ENTER_NOAPI(H5FD_windows_open, NULL)
-
- /* Sanity check on file offsets */
- assert(sizeof(file_offset_t)>=sizeof(size_t));
-
- /* Check arguments */
- if (!name || !*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if (0==maxaddr || HADDR_UNDEF==maxaddr)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if (ADDR_OVERFLOW(maxaddr))
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
-
-#ifndef WINDOWS_USE_STDIO
- /* Build the open flags */
- o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if (H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
- if (H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
- if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
- /* Windows needs O_BINARY to correctly handle eol characters */
- o_flags |= O_BINARY;
-
- /* Open the file */
- if ((fd=_open(name, o_flags, 0666))<0)
- HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file")
- if (_fstati64(fd, &sb) == -1)
- HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file")
-
-#else /* WINDOWS_USE_STDIO */
- /* Translate our flags into a mode, and open the file */
- if (_access_s(name, F_OK)) {
- if ((flags & H5F_ACC_CREAT) && (flags & H5F_ACC_RDWR)) {
- f = fopen(name, "wb+");
- write_access=1; /* Note the write access */
- }
- else
- HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file doesn't exist and CREAT wasn't specified")
- } else if ((flags & H5F_ACC_CREAT) && (flags & H5F_ACC_EXCL)) {
- HSYS_GOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file exists but CREAT and EXCL were specified")
- } else if (flags & H5F_ACC_RDWR) {
- if (flags & H5F_ACC_TRUNC)
- f = fopen(name, "wb+");
- else
- f = fopen(name, "rb+");
- write_access=1; /* Note the write access */
- } else
- f = fopen(name, "rb");
-
- if (!f)
- HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "fsopen failed")
-
- if (_stati64(name, &sb) == -1)
- HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to stat file")
-#endif /* WINDOWS_USE_STDIO */
-
- /* Create the new file struct */
- if (NULL==(file=H5FL_CALLOC(H5FD_windows_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
-
- H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t);
- file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
-
-#ifndef WINDOWS_USE_STDIO
- file->fd = fd;
-#else
- file->fp = f;
- if((fd = _fileno(f)) == -1)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get file descriptor for file")
- file->write_access=write_access; /* Note the write_access for later */
-#endif /* WINDOWS_USE_STDIO */
-
- if( (filehandle = (HANDLE)_get_osfhandle(fd)) == INVALID_HANDLE_VALUE)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get file handle for file")
- if(!GetFileInformationByHandle(filehandle, &fileinfo))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get file information")
- file->fileindexhi = fileinfo.nFileIndexHigh;
- file->fileindexlo = fileinfo.nFileIndexLow;
- file->volumeserialnumber = fileinfo.dwVolumeSerialNumber;
-
- /* Check for SWMR reader access */
- if(flags & H5F_ACC_SWMR_READ)
- file->swmr_read = TRUE;
-
- /* Check for non-default FAPL */
- if(H5P_FILE_ACCESS_DEFAULT != fapl_id) {
- H5P_genplist_t *plist; /* Property list pointer */
-
- /* Get the FAPL */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
- HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, NULL, "not a file access property list")
-
- /* This step is for h5repart tool only. If user wants to change file driver from
- * family to sec2 while using h5repart, this private property should be set so that
- * in the later step, the library can ignore the family driver information saved
- * in the superblock.
- */
- if(H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SEC2_NAME) > 0)
- if(H5P_get(plist, H5F_ACS_FAMILY_TO_SEC2_NAME, &file->fam_to_sec2) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to sec2")
- } /* end if */
-
- /* Set return value */
- ret_value=(H5FD_t*)file;
-
-done:
- if(ret_value==NULL) {
-#ifndef WINDOWS_USE_STDIO
- if(fd>=0)
- _close(fd);
-#else
- if(f)
- fclose(file->fp);
-#endif /* WINDOWS_USE_STDIO */
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_close
- *
- * Purpose: Closes a Windows file.
- *
- * Return: Success: 0
- *
- * Failure: -1, file not closed.
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_windows_close(H5FD_t *_file)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_close, FAIL)
-
-#ifndef WINDOWS_USE_STDIO
- if (_close(file->fd)<0)
-#else
- if (fclose(file->fp)<0)
-#endif /* WINDOWS_USE_STDIO */
- HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
-
- H5FL_FREE(H5FD_windows_t,file);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_cmp
- *
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
- *
- * Return: Success: A value like strcmp()
- *
- * Failure: never fails (arguments were checked by the
- * caller).
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static int
-H5FD_windows_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
-{
- const H5FD_windows_t *f1 = (const H5FD_windows_t*)_f1;
- const H5FD_windows_t *f2 = (const H5FD_windows_t*)_f2;
- int ret_value=0;
-
- FUNC_ENTER_NOAPI(H5FD_windows_cmp, H5FD_VFD_DEFAULT)
-
- if (f1->volumeserialnumber < f2->volumeserialnumber) HGOTO_DONE(-1)
- if (f1->volumeserialnumber > f2->volumeserialnumber) HGOTO_DONE(1)
-
- if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
- if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
-
- if (f1->fileindexlo < f2->fileindexlo) HGOTO_DONE(-1)
- if (f1->fileindexlo > f2->fileindexlo) HGOTO_DONE(1)
-
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_query
- *
- * Purpose: Set the flags that this VFL driver is capable of supporting.
- * (listed in H5FDpublic.h)
- *
- * Return: Success: non-negative
- *
- * Failure: negative
- *
- * Programmer: Scott Wegner
- Based on code by Quincey Koziol
- * Thursday, May 24 2007
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_windows_query(const H5FD_t *_file, unsigned long *flags /* out */)
-{
- const H5FD_windows_t *file = (const H5FD_windows_t*)_file; /* windows VFD info */
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_windows_query)
-
- /* Set the VFL feature flags that this driver supports */
- if(flags) {
- *flags = 0;
- *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
- *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
- *flags|=H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */
- *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
-
- /* Check for flags that are set by h5repart */
- if(file->fam_to_sec2)
- *flags |= H5FD_FEAT_IGNORE_DRVRINFO; /* Ignore the driver info when file is opened (which eliminates it) */
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_windows_query() */
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_get_eoa
- *
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
- *
- * Return: Success: The end-of-address marker.
- *
- * Failure: HADDR_UNDEF
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static haddr_t
-H5FD_windows_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
-{
- const H5FD_windows_t *file = (const H5FD_windows_t*)_file;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_get_eoa, HADDR_UNDEF)
-
- /* Set return value */
- ret_value=file->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_set_eoa
- *
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
- *
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, July 29, 1999
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_windows_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_set_eoa, FAIL)
-
- file->eoa = addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_get_eof
- *
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the Windows end-of-file or the HDF5 end-of-address
- * markers.
- *
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the Unix file
- * or the HDF5 file.
- *
- * Failure: HADDR_UNDEF
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static haddr_t
-H5FD_windows_get_eof(const H5FD_t *_file)
-{
- const H5FD_windows_t *file = (const H5FD_windows_t*)_file;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_get_eof, HADDR_UNDEF)
-
- /* Set return value */
- ret_value=MAX(file->eof, file->eoa);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_get_handle
- *
- * Purpose: Returns the file handle of windows file driver.
- *
- * Returns: Non-negative if succeed or negative if fails.
- *
- * Programmer: Scott Wegner
- Based on code by Raymond Lu
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5FD_windows_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
-{
- H5FD_windows_t *file = (H5FD_windows_t *)_file;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_windows_get_handle, FAIL)
-
- if(!file_handle)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
-#ifndef WINDOWS_USE_STDIO
- *file_handle = &(file->fd);
-#else
- *file_handle = &(file->fp);
-#endif /* WINDOWS_USE_STDIO */
- if(*file_handle==NULL)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "get handle failed")
-
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_alloc
- *
- * Purpose: Allocates file memory.
- *
- * Return: Success: Address of new memory
- *
- * Failure: HADDR_UNDEF
- *
- * Programmer: Scott Wegner
- Based on code by Raymond Lu
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static haddr_t
-H5FD_windows_alloc(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hsize_t size)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- haddr_t addr;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_alloc, HADDR_UNDEF)
-
- /* Compute the address for the block to allocate */
- addr = file->eoa;
-
- /* Check if we need to align this block */
- if(size >= file->pub.threshold) {
- /* Check for an already aligned block */
- if((addr % file->pub.alignment) != 0)
- addr = ((addr / file->pub.alignment) + 1) * file->pub.alignment;
- }
-
-
- file->eoa = addr + size;
-
- /* Set return value */
- ret_value = addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_read
- *
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
- *
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
- *
- * Failure: -1, Contents of buffer BUF are undefined.
- *
- * Programmer: Scott Wegner
- Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5FD_windows_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- int nbytes;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_read, FAIL)
-
- assert(file && file->pub.cls);
- assert(buf);
-
- /* Check for overflow conditions */
- if (HADDR_UNDEF==addr)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined")
- if (REGION_OVERFLOW(addr, size))
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
- /* If the file is open for SWMR read access, allow access to data past
- * the end of the allocated space (the 'eoa'). This is done because the
- * eoa stored in the file's superblock might be out of sync with the
- * objects being written within the file by the application performing
- * SWMR write operations.
- */
- if(!file->swmr_read && (addr + size) > file->eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
-
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_READ!=file->op))
-#ifndef WINDOWS_USE_STDIO
- if (_lseeki64(file->fd, addr, SEEK_SET) == -1) {
-#else
- if (_fseeki64(file->fp, addr, SEEK_SET) == -1) {
-#endif /* WINDOWS_USE_STDIO */
- file->op = OP_UNKNOWN;
- file->pos = HADDR_UNDEF;
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
-
- /*
- * Read data, being careful of interrupted system calls, partial results,
- * and the end of the file.
- */
- while (size>0) {
-#ifndef WINDOWS_USE_STDIO
- do {
- nbytes = _read(file->fd, buf, (unsigned)(size <= WINDOWS_MAX_BUF ? size: WINDOWS_MAX_BUF));
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- if (0==nbytes) {
- /* end of file but not end of format address space */
- HDmemset(buf, 0, size);
- break;
- }
-#else
- do {
- nbytes = fread(buf,(size_t)1,(size <= WINDOWS_MAX_BUF ? size: WINDOWS_MAX_BUF),file->fp);
- } while (!nbytes && EINTR==errno);
- if(!nbytes) {
- if (ferror(file->fp)) /* error */
- HSYS_GOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed")
- if (feof(file->fp)) {
- /* end of file but not end of format address space */
- HDmemset(buf, 0, size);
- break;
- }
- }
-#endif /* WINDOWS_USE_STDIO */
- assert(nbytes>=0);
- assert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (char*)buf + nbytes;
- }
-
- /* Update current position */
- file->pos = addr;
- file->op = OP_READ;
-
-done:
- if(ret_value<0) {
- /* Reset last file I/O information */
- file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_write
- *
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
- *
- * Return: Success: Zero
- *
- * Failure: -1
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5FD_windows_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- ssize_t nbytes;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_write, FAIL)
-
- assert(file && file->pub.cls);
- assert(buf);
-
- /* Check for overflow conditions */
- if (HADDR_UNDEF==addr)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined")
- if (REGION_OVERFLOW(addr, size))
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
- if (addr+size>file->eoa)
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow")
-
- /* Seek to the correct location */
- if ((addr!=file->pos || OP_WRITE!=file->op))
- {
-#ifndef WINDOWS_USE_STDIO
- if (_lseeki64(file->fd, addr, SEEK_SET) == -1) {
-#else
- if (_fseeki64(file->fp, addr, SEEK_SET) == -1) {
-#endif /* WINDOWS_USE_STDIO */
- file->op = OP_UNKNOWN;
- file->pos = HADDR_UNDEF;
- HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
- }
-
- /*
- * Write the data, being careful of interrupted system calls and partial
- * results
- */
- while (size>0) {
- do {
-#ifndef WINDOWS_USE_STDIO
- nbytes = _write(file->fd, buf, (unsigned)(size <= WINDOWS_MAX_BUF ? size: WINDOWS_MAX_BUF));
- } while (-1==nbytes && EINTR==errno);
- if (-1==nbytes) /* error */
-#else
-
-
- /* Write 1GB or less at a time */
- nbytes = fwrite(buf, 1, (size <= WINDOWS_MAX_BUF ? size: WINDOWS_MAX_BUF),file->fp);
- } while (!nbytes && EINTR==errno);
- if (!nbytes) /* error */
-#endif /* WINDOWS_USE_STDIO */
- HSYS_GOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
- assert(nbytes>0);
- assert((size_t)nbytes<=size);
- H5_CHECK_OVERFLOW(nbytes,ssize_t,size_t);
- size -= (size_t)nbytes;
- H5_CHECK_OVERFLOW(nbytes,ssize_t,haddr_t);
- addr += (haddr_t)nbytes;
- buf = (const char*)buf + nbytes;
- }
-
- /* Update current position and eof */
- file->pos = addr;
- file->op = OP_WRITE;
- if (file->pos>file->eof)
- file->eof = file->pos;
-
-done:
- if(ret_value<0) {
- /* Reset last file I/O information */
- file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_flush
- *
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5FD_windows_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned closing)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_flush, FAIL)
-
- HDassert(file);
-
- /* Only try to flush if we have write access */
- if(file->write_access) {
- /* Flush */
- if(!closing) {
-#ifdef WINDOWS_USE_STDIO
- if(fflush(file->fp) == EOF)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "fflush failed")
-#endif /* WINDOWS_USE_STDIO */
-
- /* Reset last file I/O information */
- file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
- } /* end if */
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_windows_flush() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_windows_truncate
- *
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Scott Wegner
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5FD_windows_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
-{
- H5FD_windows_t *file = (H5FD_windows_t*)_file;
-#ifndef WINDOWS_USE_STDIO
- LARGE_INTEGER li;
- HANDLE filehandle;
-#else
- int fd;
-#endif /* WINDOWS_USE_STDIO */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_windows_truncate, FAIL)
-
- HDassert(file);
-
- if(file->eoa != file->eof) {
-#ifndef WINDOWS_USE_STDIO
- /* Extend the file to make sure it's large enough */
- if((filehandle = (HANDLE)_get_osfhandle(file->fd)) == INVALID_HANDLE_VALUE)
- HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to get file handle for file")
-
- li.QuadPart = (__int64)file->eoa;
- (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
- if(SetEndOfFile(filehandle) == 0)
- HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* WINDOWS_USE_STDIO */
- /* Only try to flush if we have write access */
- if(!file->write_access)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush without write access")
-
- if((fd = _fileno(file->fp)) == -1)
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to get file descriptor for file")
- if(_chsize_s(fd, file->eoa))
- HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* WINDOWS_USE_STDIO */
-
- /* Update the eof value */
- file->eof = file->eoa;
-
- /* Reset last file I/O information */
- file->pos = HADDR_UNDEF;
- file->op = OP_UNKNOWN;
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_windows_truncate() */
+} /* end H5Pset_fapl_windows() */
#endif /* H5_HAVE_WINDOWS */
diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h
index 8277f149..7a9d2cf 100644
--- a/src/H5FDwindows.h
+++ b/src/H5FDwindows.h
@@ -1,42 +1,39 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer: Scott Wegner <swegner@hdfgroup.org>
- * Based on code by Robb Matzke
- * Thursday, May 24 2007
- *
- * Purpose: The public header file for the windows driver.
- */
-#ifndef H5FDwindows_H
-#define H5FDwindows_H
-
-#include "H5Ipublic.h"
-
-#define H5FD_WINDOWS (H5FD_windows_init())
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-H5_DLL hid_t H5FD_windows_init(void);
-H5_DLL void H5FD_windows_term(void);
-H5_DLL herr_t H5Pset_fapl_windows(hid_t fapl_id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Scott Wegner <swegner@hdfgroup.org>
+ * Based on code by Robb Matzke
+ * Thursday, May 24 2007
+ *
+ * Purpose: The public header file for the windows driver.
+ */
+#ifndef H5FDwindows_H
+#define H5FDwindows_H
+
+#define H5FD_WINDOWS (H5FD_sec2_init())
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+H5_DLL herr_t H5Pset_fapl_windows(hid_t fapl_id);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* H5FDwindows_H */
+
diff --git a/src/H5FL.c b/src/H5FL.c
index a41da2a..aec92ff 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -164,13 +164,11 @@ DESCRIPTION
static herr_t
H5FL_init_interface(void)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Nothing currently... */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FL_init_interface() */
@@ -195,7 +193,7 @@ H5FL_malloc(size_t mem_size)
{
void *ret_value; /* return value*/
- FUNC_ENTER_NOAPI(H5FL_malloc, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Attempt to allocate the memory requested */
if(NULL==(ret_value=H5MM_malloc(mem_size))) {
@@ -235,7 +233,7 @@ H5FL_reg_init(H5FL_reg_head_t *head)
H5FL_reg_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_reg_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
if(NULL == (new_node = (H5FL_reg_gc_node_t *)H5MM_malloc(sizeof(H5FL_reg_gc_node_t))))
@@ -287,7 +285,7 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
/* NOINIT OK here because this must be called after H5FL_reg_malloc/calloc
* -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_reg_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
@@ -372,7 +370,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_reg_malloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -449,7 +447,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_reg_calloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -489,7 +487,7 @@ H5FL_reg_gc_list(H5FL_reg_head_t *head)
void *tmp; /* Temporary node pointer */
size_t total_mem; /* Total memory used on list */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_reg_gc_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Calculate the total memory used on this list */
total_mem=head->onlist*head->size;
@@ -541,7 +539,7 @@ H5FL_reg_gc(void)
H5FL_reg_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_reg_gc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
gc_node=H5FL_reg_gc_head.first;
@@ -593,7 +591,7 @@ H5FL_reg_term(void)
H5FL_reg_gc_node_t *left; /* pointer to garbage collection lists with work left */
H5FL_reg_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_reg_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5_interface_initialize_g) {
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
@@ -658,7 +656,7 @@ H5FL_blk_find_list(H5FL_blk_node_t **head, size_t size)
{
H5FL_blk_node_t *temp; /* Temp. pointer to node in the native list */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_blk_find_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Find the correct free list */
temp=*head;
@@ -720,7 +718,7 @@ H5FL_blk_create_list(H5FL_blk_node_t **head, size_t size)
H5FL_blk_node_t *temp; /* Temp. pointer to node in the list */
H5FL_blk_node_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5FL_blk_create_list)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate room for the new free list node */
if(NULL==(temp=H5FL_MALLOC(H5FL_blk_node_t)))
@@ -771,7 +769,7 @@ H5FL_blk_init(H5FL_blk_head_t *head)
H5FL_blk_gc_node_t *new_node; /* Pointer to the node for the new list to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_blk_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
if(NULL == (new_node = (H5FL_blk_gc_node_t *)H5MM_malloc(sizeof(H5FL_blk_gc_node_t))))
@@ -814,7 +812,7 @@ H5FL_blk_free_block_avail(H5FL_blk_head_t *head, size_t size)
H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FL_blk_free_block_avail, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Double check parameters */
HDassert(head);
@@ -855,7 +853,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
H5FL_blk_list_t *temp; /* Temp. ptr to the new native list allocated */
void *ret_value; /* Pointer to the block to return to the user */
- FUNC_ENTER_NOAPI(H5FL_blk_malloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -945,7 +943,7 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to the block to return to the user */
- FUNC_ENTER_NOAPI(H5FL_blk_calloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -991,7 +989,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
/* NOINIT OK here because this must be called after H5FL_blk_malloc/calloc
* -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_blk_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
@@ -1089,7 +1087,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
{
void *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5FL_blk_realloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1163,7 +1161,7 @@ H5FL_blk_gc_list(H5FL_blk_head_t *head)
void *next; /* Temp. ptr to the free list list node */
void *temp; /* Temp. ptr to the free list page node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_blk_gc_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Loop through all the nodes in the block free list queue */
while(head->head!=NULL) {
@@ -1226,7 +1224,7 @@ H5FL_blk_gc(void)
H5FL_blk_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_blk_gc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
gc_node=H5FL_blk_gc_head.first;
@@ -1272,7 +1270,7 @@ H5FL_blk_term(void)
H5FL_blk_gc_node_t *left; /* pointer to garbage collection lists with work left */
H5FL_blk_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_blk_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left=NULL;
@@ -1331,7 +1329,7 @@ H5FL_arr_init(H5FL_arr_head_t *head)
size_t u; /* Local index variable */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_arr_init)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new garbage collection node */
if(NULL == (new_node = (H5FL_gc_arr_node_t *)H5MM_malloc(sizeof(H5FL_gc_arr_node_t))))
@@ -1385,7 +1383,7 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj)
/* NOINIT OK here because this must be called after H5FL_arr_malloc/calloc
* -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_arr_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* The H5MM_xfree code allows obj to null */
if (!obj)
@@ -1460,7 +1458,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem)
void *ret_value; /* Pointer to object to return */
size_t mem_size; /* Size of memory block being recycled */
- FUNC_ENTER_NOAPI(H5FL_arr_malloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1533,7 +1531,7 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_arr_calloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1571,7 +1569,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_arr_realloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1635,7 +1633,7 @@ H5FL_arr_gc_list(H5FL_arr_head_t *head)
unsigned u; /* Counter for array of free lists */
size_t total_mem; /* Total memory used on list */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_arr_gc_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Walk through the array of free lists */
for(u=0; u<(unsigned)head->maxelem; u++) {
@@ -1695,7 +1693,7 @@ H5FL_arr_gc(void)
H5FL_gc_arr_node_t *gc_arr_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_arr_gc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
gc_arr_node=H5FL_arr_gc_head.first;
@@ -1741,7 +1739,7 @@ H5FL_arr_term(void)
H5FL_gc_arr_node_t *left; /* pointer to garbage collection lists with work left */
H5FL_gc_arr_node_t *tmp; /* Temporary pointer to a garbage collection node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_arr_term)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left=NULL;
@@ -1799,7 +1797,7 @@ H5FL_seq_free(H5FL_seq_head_t *head, void *obj)
{
/* NOINIT OK here because this must be called after H5FL_seq_malloc/calloc
* -NAF */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_seq_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Double check parameters */
HDassert(head);
@@ -1835,7 +1833,7 @@ H5FL_seq_malloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_seq_malloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1869,7 +1867,7 @@ H5FL_seq_calloc(H5FL_seq_head_t *head, size_t elem H5FL_TRACK_PARAMS)
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_seq_calloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1903,7 +1901,7 @@ H5FL_seq_realloc(H5FL_seq_head_t *head, void * obj, size_t new_elem H5FL_TRACK_P
{
void *ret_value; /* Pointer to object to return */
- FUNC_ENTER_NOAPI(H5FL_seq_realloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Double check parameters */
HDassert(head);
@@ -1942,7 +1940,7 @@ H5FL_fac_init(size_t size)
H5FL_fac_head_t *factory = NULL; /* Pointer to new block factory */
H5FL_fac_head_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FL_fac_init, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(size > 0);
@@ -2018,7 +2016,7 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj)
void *ret_value=NULL; /* Return value */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_fac_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
@@ -2107,7 +2105,7 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
void *ret_value; /* Pointer to object to return */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_fac_malloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
@@ -2184,7 +2182,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS)
void *ret_value; /* Pointer to object to return */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_fac_calloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Double check parameters */
HDassert(head);
@@ -2223,7 +2221,7 @@ H5FL_fac_gc_list(H5FL_fac_head_t *head)
void *tmp; /* Temporary node pointer */
size_t total_mem; /* Total memory used on list */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_fac_gc_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Calculate the total memory used on this list */
total_mem=head->onlist*head->size;
@@ -2273,7 +2271,7 @@ H5FL_fac_gc(void)
H5FL_fac_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value=SUCCEED; /* return value*/
- FUNC_ENTER_NOAPI_NOINIT(H5FL_fac_gc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Walk through all the free lists, free()'ing the nodes */
gc_node=H5FL_fac_gc_head.first;
@@ -2319,7 +2317,7 @@ H5FL_fac_term(H5FL_fac_head_t *factory)
herr_t ret_value = SUCCEED; /* Return value */
/* NOINIT OK here because this must be called after H5FL_fac_init -NAF */
- FUNC_ENTER_NOAPI_NOINIT(H5FL_fac_term)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(factory);
@@ -2379,7 +2377,7 @@ H5FL_fac_term_all(void)
{
H5FL_fac_gc_node_t *tmp; /* Temporary pointer to a garbage collection node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_fac_term_all)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the nodes on the garbage collection list */
while(H5FL_fac_gc_head.first != NULL) {
@@ -2425,7 +2423,7 @@ H5FL_garbage_coll(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FL_garbage_coll, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Garbage collect the free lists for array objects */
if(H5FL_arr_gc()<0)
@@ -2486,7 +2484,7 @@ H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_l
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5FL_set_free_list_limits, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Set the limit variables */
/* limit on all regular free lists */
@@ -2535,7 +2533,7 @@ H5FL_term_interface(void)
{
int ret_value=0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Garbage collect any nodes on the free lists */
(void)H5FL_garbage_coll();
diff --git a/src/H5FO.c b/src/H5FO.c
index 8e1b98c..ace66ec 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -75,14 +75,14 @@ H5FO_create(const H5F_t *f)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_create,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
assert(f);
assert(f->shared);
/* Create container used to store open object info */
- if((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR)) == NULL)
+ if((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container")
done:
@@ -116,7 +116,7 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
H5FO_open_obj_t *open_obj; /* Information about open object */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5FO_opened)
+ FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
HDassert(f);
@@ -163,7 +163,7 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag)
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_insert,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
assert(f);
@@ -215,7 +215,7 @@ H5FO_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_delete,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -266,7 +266,7 @@ H5FO_mark(const H5F_t *f, haddr_t addr, hbool_t deleted)
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5FO_mark)
+ FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
assert(f);
@@ -310,7 +310,7 @@ H5FO_marked(const H5F_t *f, haddr_t addr)
H5FO_open_obj_t *open_obj; /* Information about open object */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5FO_marked)
+ FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
HDassert(f);
@@ -349,7 +349,7 @@ H5FO_dest(const H5F_t *f)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_dest,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
assert(f);
@@ -394,13 +394,13 @@ H5FO_top_create(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_top_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
/* Create container used to store open object info */
- if((f->obj_count = H5SL_create(H5SL_TYPE_HADDR)) == NULL)
+ if((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container")
done:
@@ -433,7 +433,7 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr)
H5FO_obj_count_t *obj_count; /* Ref. count for object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_top_incr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -488,7 +488,7 @@ H5FO_top_decr(const H5F_t *f, haddr_t addr)
H5FO_obj_count_t *obj_count; /* Ref. count for object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_top_decr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -542,7 +542,7 @@ H5FO_top_count(const H5F_t *f, haddr_t addr)
H5FO_obj_count_t *obj_count; /* Ref. count for object */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FO_top_count)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -582,7 +582,7 @@ H5FO_top_dest(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_top_dest, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
diff --git a/src/H5FS.c b/src/H5FS.c
index aa7da4d..fc1285f 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -109,7 +109,7 @@ H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_c
H5FS_t *fspace = NULL; /* New free space structure */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_create, dxpl_id, H5AC__FREESPACE_TAG, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses);
#endif /* H5FS_DEBUG */
@@ -198,7 +198,7 @@ H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, size_t nclasses,
H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_open, dxpl_id, H5AC__FREESPACE_TAG, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr, nclasses);
#endif /* H5FS_DEBUG */
@@ -267,7 +267,7 @@ H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr)
H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_delete, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr);
#endif /* H5FS_DEBUG */
@@ -358,7 +358,7 @@ H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_close, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* Check arguments. */
HDassert(f);
@@ -522,7 +522,7 @@ H5FS_new(const H5F_t *f, size_t nclasses, const H5FS_section_class_t *classes[],
size_t u; /* Local index variable */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_new)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(nclasses == 0 || (nclasses > 0 && classes));
@@ -597,7 +597,7 @@ done:
herr_t
H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5FS_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -631,7 +631,7 @@ H5FS_incr(H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_incr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
#endif /* H5FS_DEBUG */
@@ -672,7 +672,7 @@ H5FS_decr(H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_decr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fspace->addr, fspace->rc);
#endif /* H5FS_DEBUG */
@@ -720,7 +720,7 @@ H5FS_dirty(H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_dirty)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
#endif /* QAK */
@@ -755,7 +755,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_alloc_hdr, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* Check arguments. */
HDassert(f);
@@ -795,7 +795,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_alloc_sect, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* Check arguments. */
HDassert(f);
@@ -843,7 +843,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
unsigned cache_flags; /* Flags for unprotecting cache entries */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5FS_free, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* Check arguments. */
HDassert(f);
@@ -950,7 +950,7 @@ H5FS_hdr_dest(H5FS_t *fspace)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_hdr_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -996,7 +996,7 @@ H5FS_sinfo_free_sect_cb(void *_sect, void UNUSED *key, void *op_data)
H5FS_section_info_t *sect = (H5FS_section_info_t *)_sect; /* Section to free */
const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)op_data; /* Free space manager for section */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_sinfo_free_sect_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(sect);
HDassert(sinfo);
@@ -1027,7 +1027,7 @@ H5FS_sinfo_free_node_cb(void *item, void UNUSED *key, void *op_data)
{
H5FS_node_t *fspace_node = (H5FS_node_t *)item; /* Temporary pointer to free space list node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_sinfo_free_node_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(fspace_node);
HDassert(op_data);
@@ -1061,7 +1061,7 @@ H5FS_sinfo_dest(H5FS_sinfo_t *sinfo)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1119,7 +1119,7 @@ done:
herr_t
H5FS_assert(const H5FS_t *fspace)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_assert)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifndef QAK
HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_assert", fspace->tot_sect_count);
#endif /* QAK */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index d1c8a2a..d186404 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -160,7 +160,7 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
unsigned nclasses; /* Number of section classes */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_hdr_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -287,7 +287,7 @@ H5FS_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5F
uint8_t hdr_buf[H5FS_HDR_BUF_SIZE]; /* Buffer for header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_hdr_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -440,7 +440,7 @@ H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_hdr_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(fspace);
@@ -489,7 +489,7 @@ H5FS_cache_hdr_clear(H5F_t *f, H5FS_t *fspace, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_hdr_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -526,7 +526,7 @@ done:
static herr_t
H5FS_cache_hdr_size(const H5F_t UNUSED *f, const H5FS_t *fspace, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_cache_hdr_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(f);
@@ -567,7 +567,7 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata
uint32_t computed_chksum; /* Computed metadata checksum value */
H5FS_sinfo_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_sinfo_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -724,7 +724,7 @@ H5FS_sinfo_serialize_sect_cb(void *_item, void UNUSED *key, void *_udata)
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_serialize_sect_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -779,7 +779,7 @@ H5FS_sinfo_serialize_node_cb(void *_item, void UNUSED *key, void *_udata)
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_serialize_node_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace_node);
@@ -823,7 +823,7 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_sinfo_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -921,7 +921,7 @@ H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_sinfo_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(sinfo);
@@ -967,7 +967,7 @@ H5FS_cache_sinfo_clear(H5F_t *f, H5FS_sinfo_t *sinfo, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_cache_sinfo_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1004,7 +1004,7 @@ done:
static herr_t
H5FS_cache_sinfo_size(const H5F_t UNUSED *f, const H5FS_sinfo_t *sinfo, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_cache_sinfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(sinfo);
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index 9be363e..fe3ca71 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -100,7 +100,7 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -197,7 +197,7 @@ H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *str
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sect_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -240,7 +240,7 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int
H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sects_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 9fb34df..914fa58 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -129,7 +129,7 @@ H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace)
H5FS_sinfo_t *sinfo = NULL; /* Section information struct created */
H5FS_sinfo_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_new)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(f);
@@ -209,7 +209,7 @@ H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5AC_protect_t accmode)
H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5FS_sinfo_lock, dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr);
@@ -315,7 +315,7 @@ H5FS_sinfo_unlock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hbool_t modified)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sinfo_unlock)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: Called, modified = %t, fspace->addr = %a, fspace->sect_addr = %a\n", FUNC, modified, fspace->addr, fspace->sect_addr);
HDfprintf(stderr, "%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %t, fspace->sinfo_protected = %t\n", FUNC, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
@@ -474,7 +474,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
static herr_t
H5FS_sect_serialize_size(H5FS_t *fspace)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_sect_serialize_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fspace);
@@ -542,7 +542,7 @@ H5FS_sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_increase)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -604,7 +604,7 @@ H5FS_sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_decrease)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -662,7 +662,7 @@ H5FS_size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_size_node_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sinfo);
@@ -754,7 +754,7 @@ H5FS_sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
unsigned bin; /* Bin to put the free space section in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_unlink_size)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sinfo);
@@ -808,7 +808,7 @@ H5FS_sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_unlink_rest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -862,7 +862,7 @@ H5FS_sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect)
const H5FS_section_class_t *cls; /* Class of section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_remove_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -905,7 +905,7 @@ H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(f);
@@ -952,7 +952,7 @@ H5FS_sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
unsigned bin; /* Bin to put the free space section in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_link_size)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, sect->addr);
#endif /* QAK */
@@ -967,7 +967,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
bin = H5V_log2_gen(sect->size);
HDassert(bin < sinfo->nbins);
if(sinfo->bins[bin].bin_list == NULL) {
- if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE)))
+ if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
} /* end if */
else {
@@ -985,7 +985,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
/* Initialize the free list size node */
fspace_node->sect_size = sect->size;
fspace_node->serial_count = fspace_node->ghost_count = 0;
- if(NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
/* Insert new free space size node into bin's list */
@@ -1059,7 +1059,7 @@ H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_link_rest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -1072,7 +1072,7 @@ H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")
@@ -1110,7 +1110,7 @@ H5FS_sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
const H5FS_section_class_t *cls; /* Class of section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_link)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -1172,7 +1172,7 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
htri_t status; /* Status value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_merge)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -1381,7 +1381,7 @@ H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect
hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sect_add, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: *sect = {%a, %Hu, %u, %s}\n", FUNC, sect->addr, sect->size, sect->type, (sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
@@ -1469,7 +1469,7 @@ H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, haddr_t addr,
hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sect_try_extend, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: addr = %a, size = %Hu, extra_requested = %hu\n", FUNC, addr, size, extra_requested);
@@ -1601,7 +1601,7 @@ H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t
hsize_t saved_fs_size; /* copy the free-space section size */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sect_try_merge, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -1675,7 +1675,7 @@ H5FS_sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node)
const H5FS_section_class_t *cls; /* Class of section */
hsize_t alignment;
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_find_node)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -1827,7 +1827,7 @@ H5FS_sect_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, hsize_t request,
hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5FS_sect_find, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef QAK
HDfprintf(stderr, "%s: request = %Hu\n", FUNC, request);
@@ -1899,7 +1899,7 @@ H5FS_iterate_sect_cb(void *_item, void UNUSED *key, void *_udata)
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_iterate_sect_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect_info);
@@ -1937,7 +1937,7 @@ H5FS_iterate_node_cb(void *_item, void UNUSED *key, void *_udata)
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_iterate_node_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace_node);
@@ -1975,7 +1975,7 @@ H5FS_sect_iterate(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_operator_t op, v
hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -2038,7 +2038,7 @@ done:
herr_t
H5FS_sect_stats(const H5FS_t *fspace, hsize_t *tot_space, hsize_t *nsects)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5FS_sect_stats)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fspace);
@@ -2078,7 +2078,7 @@ H5FS_sect_change_class(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5FS_sect_change_class)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(fspace);
@@ -2187,7 +2187,7 @@ HDfprintf(stderr, "%s: to_mergable = %u\n", FUNC, to_mergable);
HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")
@@ -2243,7 +2243,7 @@ H5FS_sect_assert(const H5FS_t *fspace)
{
hsize_t separate_obj; /* The number of separate objects managed */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_sect_assert)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifndef QAK
HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_sect_assert", fspace->tot_sect_count);
#endif /* QAK */
diff --git a/src/H5FSstat.c b/src/H5FSstat.c
index cc4822a..66c5495 100644
--- a/src/H5FSstat.c
+++ b/src/H5FSstat.c
@@ -84,7 +84,7 @@
herr_t
H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_stat_info)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(frsp);
@@ -103,3 +103,4 @@ H5FS_stat_info(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *stats)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_stat_info() */
+
diff --git a/src/H5FStest.c b/src/H5FStest.c
index af9eaec..63ba94c 100644
--- a/src/H5FStest.c
+++ b/src/H5FStest.c
@@ -85,7 +85,7 @@
herr_t
H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_get_cparam_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(frsp);
@@ -100,6 +100,7 @@ H5FS_get_cparam_test(const H5FS_t *frsp, H5FS_create_t *cparam)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5FS_get_cparam_test() */
+
/*-------------------------------------------------------------------------
* Function: H5FS_cmp_cparam_test
*
@@ -118,7 +119,7 @@ H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
{
int ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FS_cmp_cparam_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(cparam1);
@@ -152,3 +153,4 @@ H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_cmp_cparam_test */
+
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index c89ff33..3c72c5d 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -117,7 +117,7 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_accum_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -278,7 +278,7 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_accum_adjust)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(accum);
HDassert(lf);
@@ -417,7 +417,7 @@ H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_accum_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -833,7 +833,7 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_accum_free, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -989,7 +989,7 @@ H5F_accum_flush(const H5F_t *f, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_accum_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -1027,7 +1027,7 @@ H5F_accum_reset(const H5F_t *f, hid_t dxpl_id, hbool_t flush)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_accum_reset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
new file mode 100644
index 0000000..d0688f7
--- /dev/null
+++ b/src/H5Fcwfs.c
@@ -0,0 +1,323 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Tuesday, July 19, 2011
+ *
+ * Purpose: Each file has a small cache of global heap collections called
+ * the CWFS list and recently accessed collections with free
+ * space appear on this list. As collections are accessed the
+ * collection is moved toward the front of the list. New
+ * collections are added to the front of the list while old
+ * collections are added to the end of the list.
+ *
+ * The collection model reduces the overhead which would be
+ * incurred if the global heap were a single object, and the
+ * CWFS list allows the library to cheaply choose a collection
+ * for a new object based on object size, amount of free space
+ * in the collection, and temporal locality.
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5HGprivate.h" /* Global heaps */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+/*
+ * Maximum length of the CWFS list, the list of remembered collections that
+ * have free space.
+ */
+#define H5F_NCWFS 16
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_cwfs_add
+ *
+ * Purpose: Add a global heap collection to the CWFS for a file.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 19, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check args */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(heap);
+
+ /*
+ * Add the new heap to the CWFS list, removing some other entry if
+ * necessary to make room. We remove the right-most entry that has less
+ * free space than this heap.
+ */
+ if(NULL == f->shared->cwfs) {
+ if(NULL == (f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5F_NCWFS * sizeof(H5HG_heap_t *))))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate CWFS for file")
+ f->shared->cwfs[0] = heap;
+ f->shared->ncwfs = 1;
+ } else if(H5F_NCWFS == f->shared->ncwfs) {
+ int i; /* Local index variable */
+
+ for(i = H5F_NCWFS - 1; i >= 0; --i)
+ if(H5HG_FREE_SIZE(f->shared->cwfs[i]) < H5HG_FREE_SIZE(heap)) {
+ HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, (size_t)i * sizeof(H5HG_heap_t *));
+ f->shared->cwfs[0] = heap;
+ break;
+ } /* end if */
+ } else {
+ HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, f->shared->ncwfs * sizeof(H5HG_heap_t *));
+ f->shared->cwfs[0] = heap;
+ f->shared->ncwfs += 1;
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5F_cwfs_add() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_cwfs_find_free_heap
+ *
+ * Purpose: Find a global heap collection with free space for storing
+ * a new object.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr)
+{
+ unsigned cwfsno; /* Local index for iterating over collections */
+ hbool_t found = FALSE; /* Flag to indicate a heap with enough space was found */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check args */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(addr);
+
+ /* Note that we don't have metadata cache locks on the entries in
+ * f->shared->cwfs.
+ *
+ * In the current situation, this doesn't matter, as we are single
+ * threaded, and as best I can tell, entries are added to and deleted
+ * from f->shared->cwfs as they are added to and deleted from the
+ * metadata cache.
+ *
+ * To be proper, we should either lock each entry in f->shared->cwfs
+ * as we examine it, or lock the whole array. However, at present
+ * I don't see the point as there will be significant overhead,
+ * and protecting and unprotecting all the collections in the global
+ * heap on a regular basis will skew the replacement policy.
+ *
+ * JRM - 5/24/04
+ */
+ for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++)
+ if(H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]) >= need) {
+ *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
+ found = TRUE;
+ break;
+ } /* end if */
+
+ /*
+ * If we didn't find any collection with enough free space the check if
+ * we can extend any of the collections to make enough room.
+ */
+ if(!found) {
+ size_t new_need;
+
+ for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++) {
+ new_need = need;
+ new_need -= H5HG_FREE_SIZE(f->shared->cwfs[cwfsno]);
+ new_need = MAX(H5HG_SIZE(f->shared->cwfs[cwfsno]), new_need);
+
+ if((H5HG_SIZE(f->shared->cwfs[cwfsno]) + new_need) <= H5HG_MAXSIZE) {
+ htri_t extended; /* Whether the heap was extended */
+
+ extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need);
+ if(extended < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap")
+ else if(extended == TRUE) {
+ if(H5HG_extend(f, dxpl_id, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection")
+ *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]);
+ found = TRUE;
+ break;
+ } /* end if */
+ } /* end if */
+ } /* end for */
+ } /* end if */
+
+ if(found) {
+ /* Move the collection forward in the CWFS list, if it's not
+ * already at the front
+ */
+ if(cwfsno > 0) {
+ H5HG_heap_t *tmp = f->shared->cwfs[cwfsno];
+
+ f->shared->cwfs[cwfsno] = f->shared->cwfs[cwfsno - 1];
+ f->shared->cwfs[cwfsno - 1] = tmp;
+ } /* end if */
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5F_cwfs_find_free_heap() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_cwfs_advance_heap
+ *
+ * Purpose: Advance a heap in the CWFS
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_cwfs_advance_heap(H5F_t *f, H5HG_heap_t *heap, hbool_t add_heap)
+{
+ unsigned u; /* Local index variable */
+
+ FUNC_ENTER_NOAPI_NOERR
+
+ /* Check args */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(heap);
+
+ for(u = 0; u < f->shared->ncwfs; u++)
+ if(f->shared->cwfs[u] == heap) {
+ if(u) {
+ f->shared->cwfs[u] = f->shared->cwfs[u - 1];
+ f->shared->cwfs[u - 1] = heap;
+ } /* end if */
+ break;
+ } /* end if */
+ if(add_heap && u >= f->shared->ncwfs) {
+ f->shared->ncwfs = MIN(f->shared->ncwfs + 1, H5F_NCWFS);
+ f->shared->cwfs[f->shared->ncwfs - 1] = heap;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_cwfs_advance_heap() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_cwfs_remove_heap
+ *
+ * Purpose: Remove a heap from the CWFS
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_cwfs_remove_heap(H5F_file_t *shared, H5HG_heap_t *heap)
+{
+ unsigned u; /* Local index variable */
+
+ FUNC_ENTER_NOAPI_NOERR
+
+ /* Check args */
+ HDassert(shared);
+ HDassert(heap);
+
+ /* Remove the heap from the CWFS list */
+ for(u = 0; u < shared->ncwfs; u++) {
+ if(shared->cwfs[u] == heap) {
+ shared->ncwfs -= 1;
+ HDmemmove(shared->cwfs + u, shared->cwfs + u + 1, (shared->ncwfs - u) * sizeof(H5HG_heap_t *));
+ break;
+ } /* end if */
+ } /* end for */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5F_cwfs_remove_heap() */
+
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 0ae0eb1..40d24e5 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -53,7 +53,7 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
hsize_t userblock_size; /* Userblock size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -123,13 +123,13 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
f->shared->root_grp ? "" : "(none)");
if(f->shared->root_grp) {
if(f->shared->sblock->root_ent) /* Use real root group symbol table entry */
- H5G_ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
+ H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
else {
H5O_loc_t *root_oloc; /* Root object location */
H5G_entry_t root_ent; /* Constructed root symbol table entry */
/* Reset the root group entry */
- H5G_ent_reset(&root_ent);
+ H5G__ent_reset(&root_ent);
/* Build up a simulated root group symbol table entry */
root_oloc = H5G_oloc(f->shared->root_grp);
@@ -138,7 +138,7 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth)
root_ent.header = root_oloc->addr;
/* Display root group symbol table entry info */
- H5G_ent_debug(&root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
+ H5G__ent_debug(&root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL);
} /* end else */
} /* end if */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index 7e1136c..e3945ff 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -98,7 +98,7 @@ DESCRIPTION
static herr_t
H5F_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_deprec_interface() */
@@ -128,7 +128,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
H5F_t *f; /* Top file in mount hierarchy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_info1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", obj_id, finfo);
/* Check args */
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index eebf143..08d27a1 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -95,7 +95,7 @@ H5F_efc_create(unsigned max_nfiles)
H5F_efc_t *efc = NULL; /* EFC object */
H5F_efc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5F_efc_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
HDassert(max_nfiles > 0);
@@ -147,9 +147,9 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
H5F_efc_t *efc = NULL; /* External file cache for parent file */
H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
- H5F_t *ret_value; /* Return value */
+ H5F_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(parent);
@@ -184,7 +184,7 @@ H5F_efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fcpl_id,
} /* end if */
else {
HDassert(efc->nfiles == 0);
- if(NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR)))
+ if(NULL == (efc->slist = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create skip list")
} /* end else */
@@ -338,7 +338,7 @@ H5F_efc_close(H5F_t *parent, H5F_t *file)
H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(parent);
@@ -396,7 +396,7 @@ done:
unsigned
H5F_efc_max_nfiles(H5F_efc_t *efc)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_efc_max_nfiles)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(efc);
HDassert(efc->max_nfiles > 0);
@@ -427,7 +427,7 @@ H5F_efc_release(H5F_efc_t *efc)
H5F_efc_ent_t *prev_ent = NULL; /* Previous EFC entry */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_release)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(efc);
@@ -487,7 +487,7 @@ H5F_efc_destroy(H5F_efc_t *efc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_destroy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(efc);
@@ -538,7 +538,7 @@ H5F_efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_remove_ent)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(efc);
@@ -605,7 +605,7 @@ H5F_efc_try_close_tag1(H5F_file_t *sf, H5F_file_t **tail)
H5F_efc_ent_t *ent = NULL; /* EFC entry */
H5F_file_t *esf; /* Convenience pointer to ent->file->shared */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_efc_try_close_tag1)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(sf);
@@ -679,7 +679,7 @@ H5F_efc_try_close_tag2(H5F_file_t *sf, H5F_file_t **tail)
H5F_efc_ent_t *ent = NULL; /* EFC entry */
H5F_file_t *esf; /* Convenience pointer to ent->file->shared */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_efc_try_close_tag2)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(sf);
@@ -790,7 +790,7 @@ H5F_efc_try_close(H5F_t *f)
H5F_file_t *next; /* Temporary file pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_efc_try_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
diff --git a/src/H5Ffake.c b/src/H5Ffake.c
index f71d373..af048bc 100644
--- a/src/H5Ffake.c
+++ b/src/H5Ffake.c
@@ -43,7 +43,7 @@ DESCRIPTION
static herr_t
H5F_init_fake_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_init_fake_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_fake_interface() */
@@ -72,7 +72,7 @@ H5F_fake_alloc(uint8_t sizeof_size)
H5F_t *f = NULL; /* Pointer to fake file struct */
H5F_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5F_fake_alloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate faked file struct */
if(NULL == (f = H5FL_CALLOC(H5F_t)))
@@ -114,7 +114,7 @@ done:
herr_t
H5F_fake_free(H5F_t *f)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_fake_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free faked file struct */
if(f) {
diff --git a/src/H5Fio.c b/src/H5Fio.c
index a10fafc..4f15017 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -97,7 +97,7 @@ H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_block_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -138,7 +138,7 @@ H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_block_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef QAK
HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size);
#endif /* QAK */
@@ -180,7 +180,7 @@ H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5F_flush_tagged_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Use tag to search for and flush associated metadata */
if(H5AC_flush_tagged_metadata(f, tag, dxpl_id)<0)
@@ -216,7 +216,7 @@ H5F_evict_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5F_evict_tagged_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Unpin the superblock, as this will be marked for eviction and it can't
be pinned. */
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index d04e747..ee7af97 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -52,7 +52,7 @@ DESCRIPTION
static herr_t
H5F_init_mount_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_init_mount_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_mount_interface() */
@@ -76,7 +76,7 @@ H5F_close_mounts(H5F_t *f)
unsigned u; /* Local index */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_close_mounts, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
@@ -141,7 +141,7 @@ H5F_mount(H5G_loc_t *loc, const char *name, H5F_t *child,
H5G_loc_t root_loc; /* Group location of root of file to mount */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_mount)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(loc);
HDassert(name && *name);
@@ -307,7 +307,7 @@ H5F_unmount(H5G_loc_t *loc, const char *name, hid_t dxpl_id)
int child_idx; /* Index of child in parent's mtab */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_unmount)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(loc);
HDassert(name && *name);
@@ -441,7 +441,7 @@ H5F_is_mount(const H5F_t *file)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_is_mount)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(file);
@@ -474,7 +474,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
H5F_t *child = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fmount, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sii", loc_id, name, child_id, plist_id);
/* Check arguments */
@@ -524,7 +524,7 @@ H5Funmount(hid_t loc_id, const char *name)
H5G_loc_t loc;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Funmount, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* Check args */
@@ -560,7 +560,7 @@ H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_obj
{
unsigned u; /* Local index value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_mount_count_ids_recurse)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -608,9 +608,7 @@ H5F_mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_obj
herr_t
H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5F_mount_count_ids, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -624,8 +622,7 @@ H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
/* Count open IDs in the hierarchy */
H5F_mount_count_ids_recurse(f, nopen_files, nopen_objs);
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F_mount_count_ids() */
@@ -648,7 +645,7 @@ H5F_flush_mounts_recurse(H5F_t *f, hid_t dxpl_id)
unsigned u; /* Index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_flush_mounts_recurse)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -688,7 +685,7 @@ H5F_flush_mounts(H5F_t *f, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_flush_mounts, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -705,3 +702,83 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_flush_mounts() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_traverse_mount
+ *
+ * Purpose: If LNK is a mount point then copy the entry for the root
+ * group of the mounted file into LNK.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, October 6, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_traverse_mount(H5O_loc_t *oloc/*in,out*/)
+{
+ H5F_t *parent = oloc->file, /* File of object */
+ *child = NULL; /* Child file */
+ unsigned lt, rt, md = 0; /* Binary search indices */
+ int cmp;
+ H5O_loc_t *mnt_oloc = NULL; /* Object location for mount points */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity check */
+ HDassert(oloc);
+
+ /*
+ * The loop is necessary because we might have file1 mounted at the root
+ * of file2, which is mounted somewhere in file3.
+ */
+ do {
+ /*
+ * Use a binary search to find the potential mount point in the mount
+ * table for the parent
+ */
+ lt = 0;
+ rt = parent->shared->mtab.nmounts;
+ cmp = -1;
+ while(lt < rt && cmp) {
+ md = (lt + rt) / 2;
+ mnt_oloc = H5G_oloc(parent->shared->mtab.child[md].group);
+ cmp = H5F_addr_cmp(oloc->addr, mnt_oloc->addr);
+ if(cmp < 0)
+ rt = md;
+ else
+ lt = md + 1;
+ } /* end while */
+
+ /* Copy root info over to ENT */
+ if(0 == cmp) {
+ /* Get the child file */
+ child = parent->shared->mtab.child[md].file;
+
+ /* Get the location for the root group in the child's file */
+ mnt_oloc = H5G_oloc(child->shared->root_grp);
+
+ /* Release the mount point */
+ if(H5O_loc_free(oloc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location")
+
+ /* Copy the entry for the root group */
+ if(H5O_loc_copy(oloc, mnt_oloc, H5_COPY_DEEP) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
+
+ /* In case the shared root group info points to a different file handle
+ * than the child, modify oloc */
+ oloc->file = child;
+
+ /* Switch to child's file */
+ parent = child;
+ } /* end if */
+ } while(!cmp);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_traverse_mount() */
+
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index c90ad7c..4fd04f6 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -98,7 +98,7 @@ H5F_mpi_get_rank(const H5F_t *f)
{
int ret_value;
- FUNC_ENTER_NOAPI(H5F_mpi_get_rank, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(f && f->shared);
@@ -132,7 +132,7 @@ H5F_mpi_get_comm(const H5F_t *f)
{
MPI_Comm ret_value;
- FUNC_ENTER_NOAPI(H5F_mpi_get_comm, MPI_COMM_NULL)
+ FUNC_ENTER_NOAPI(MPI_COMM_NULL)
assert(f && f->shared);
@@ -166,7 +166,7 @@ H5F_mpi_get_size(const H5F_t *f)
{
int ret_value;
- FUNC_ENTER_NOAPI(H5F_mpi_get_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(f && f->shared);
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 0768d08..e6553ff 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -198,7 +198,7 @@ typedef struct H5F_super_t {
* count in this struct indicates the number of H5F_t structs which are
* pointing to this struct.
*/
-typedef struct H5F_file_t {
+struct H5F_file_t {
H5FD_t *lf; /* Lower level file handle for I/O */
H5F_super_t *sblock; /* Pointer to (pinned) superblock for file */
unsigned nrefs; /* Ref count for times file is opened */
@@ -255,7 +255,7 @@ typedef struct H5F_file_t {
/* Metadata accumulator information */
H5F_meta_accum_t accum; /* Metadata accumulator info */
-} H5F_file_t;
+};
/*
* This is the top-level file descriptor. One of these structures is
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 8ce9833..7eb7753 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -35,6 +35,7 @@
/* Main file structure */
typedef struct H5F_t H5F_t;
+typedef struct H5F_file_t H5F_file_t;
/* Block aggregation structure */
typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
@@ -236,52 +237,86 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5F_PACKAGE
#define H5F_INTENT(F) ((F)->intent)
-#define H5F_FCPL(F) ((F)->shared->fcpl_id)
-#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr)
-#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size)
+#define H5F_OPEN_NAME(F) ((F)->open_name)
+#define H5F_ACTUAL_NAME(F) ((F)->actual_name)
+#define H5F_EXTPATH(F) ((F)->extpath)
+#define H5F_SHARED(F) ((F)->shared)
+#define H5F_SAME_SHARED(F1, F2) ((F1)->shared == (F2)->shared))
+#define H5F_NOPEN_OBJS(F) ((F)->nopen_objs)
+#define H5F_INCR_NOPEN_OBJS(F) ((F)->nopen_objs++)
+#define H5F_DECR_NOPEN_OBJS(F) ((F)->nopen_objs--)
+#define H5F_FILE_ID(F) ((F)->file_id)
+#define H5F_PARENT(F) ((F)->parent)
+#define H5F_NMOUNTS(F) ((F)->nmounts)
+#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
+#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
+#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL))
+#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr)
#define H5F_SYM_LEAF_K(F) ((F)->shared->sblock->sym_leaf_k)
#define H5F_KVALUE(F,T) ((F)->shared->sblock->btree_k[(T)->id])
+#define H5F_NREFS(F) ((F)->shared->nrefs)
+#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr)
+#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size)
+#define H5F_SOHM_ADDR(F) ((F)->shared->sohm_addr)
+#define H5F_SET_SOHM_ADDR(F, A) ((F)->shared->sohm_addr = (A))
+#define H5F_SOHM_VERS(F) ((F)->shared->sohm_vers)
+#define H5F_SET_SOHM_VERS(F, V) ((F)->shared->sohm_vers = (V))
+#define H5F_SOHM_NINDEXES(F) ((F)->shared->sohm_nindexes)
+#define H5F_SET_SOHM_NINDEXES(F, N) ((F)->shared->sohm_nindexes = (N))
+#define H5F_FCPL(F) ((F)->shared->fcpl_id)
+#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree)
#define H5F_RDCC_NSLOTS(F) ((F)->shared->rdcc_nslots)
#define H5F_RDCC_NBYTES(F) ((F)->shared->rdcc_nbytes)
#define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0)
-#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr)
-#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared)
#define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size)
#define H5F_GC_REF(F) ((F)->shared->gc_ref)
#define H5F_USE_LATEST_FORMAT(F) ((F)->shared->latest_format)
-#define H5F_OPEN_NAME(F) ((F)->open_name)
-#define H5F_ACTUAL_NAME(F) ((F)->actual_name)
-#define H5F_EXTPATH(F) ((F)->extpath)
-#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree)
#define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx)
-#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL))
-#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
-#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
+#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL))
+#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared)
+#define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL)
#define H5F_USE_TMP_SPACE(F) ((F)->shared->use_tmp_space)
#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_addr_le((F)->shared->tmp_addr, (ADDR)))
#else /* H5F_PACKAGE */
#define H5F_INTENT(F) (H5F_get_intent(F))
-#define H5F_FCPL(F) (H5F_get_fcpl(F))
-#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F))
-#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F))
+#define H5F_OPEN_NAME(F) (H5F_get_open_name(F))
+#define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F))
+#define H5F_EXTPATH(F) (H5F_get_extpath(F))
+#define H5F_SHARED(F) (H5F_get_shared(F))
+#define H5F_SAME_SHARED(F1, F2) (H5F_same_shared((F1), (F2)))
+#define H5F_NOPEN_OBJS(F) (H5F_get_nopen_objs(F))
+#define H5F_INCR_NOPEN_OBJS(F) (H5F_incr_nopen_objs(F))
+#define H5F_DECR_NOPEN_OBJS(F) (H5F_decr_nopen_objs(F))
+#define H5F_FILE_ID(F) (H5F_get_file_id(F))
+#define H5F_PARENT(F) (H5F_get_parent(F))
+#define H5F_NMOUNTS(F) (H5F_get_nmounts(F))
+#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
+#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM)))
+#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL))
+#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F))
#define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F))
#define H5F_KVALUE(F,T) (H5F_Kvalue(F,T))
+#define H5F_NREFS(F) (H5F_get_nrefs(F))
+#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F))
+#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F))
+#define H5F_SOHM_ADDR(F) (H5F_get_sohm_addr(F))
+#define H5F_SET_SOHM_ADDR(F, A) (H5F_set_sohm_addr((F), (A)))
+#define H5F_SOHM_VERS(F) (H5F_get_sohm_vers(F))
+#define H5F_SET_SOHM_VERS(F, V) (H5F_set_sohm_vers((F), (V)))
+#define H5F_SOHM_NINDEXES(F) (H5F_get_sohm_nindexes(F))
+#define H5F_SET_SOHM_NINDEXES(F, N) (H5F_set_sohm_nindexes((F), (N)))
+#define H5F_FCPL(F) (H5F_get_fcpl(F))
+#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F))
#define H5F_RDCC_NSLOTS(F) (H5F_rdcc_nslots(F))
#define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F))
#define H5F_RDCC_W0(F) (H5F_rdcc_w0(F))
-#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F))
-#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F))
#define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F))
#define H5F_GC_REF(F) (H5F_gc_ref(F))
#define H5F_USE_LATEST_FORMAT(F) (H5F_use_latest_format(F))
-#define H5F_OPEN_NAME(F) (H5F_get_open_name(F))
-#define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F))
-#define H5F_EXTPATH(F) (H5F_get_extpath(F))
-#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F))
#define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F))
-#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL))
-#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
-#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM)))
+#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL)))
+#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F))
+#define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC)))
#define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F))
#define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR)))
#endif /* H5F_PACKAGE */
@@ -470,55 +505,73 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
/* Forward declarations for prototype arguments */
struct H5B_class_t;
struct H5RC_t;
+struct H5O_loc_t;
+struct H5HG_heap_t;
/* Private functions */
H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id,
hid_t fapl_id, hid_t dxpl_id);
H5_DLL herr_t H5F_try_close(H5F_t *f);
-H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
-H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
/* Functions than retrieve values from the file struct */
H5_DLL unsigned H5F_get_intent(const H5F_t *f);
-H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
-H5_DLL char *H5F_get_extpath(const H5F_t *f);
H5_DLL char *H5F_get_open_name(const H5F_t *f);
H5_DLL char *H5F_get_actual_name(const H5F_t *f);
+H5_DLL char *H5F_get_extpath(const H5F_t *f);
+H5_DLL H5F_file_t *H5F_get_shared(const H5F_t *f);
+H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
+H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
+H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
+H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
+H5_DLL hid_t H5F_get_file_id(const H5F_t *f);
+H5_DLL H5F_t *H5F_get_parent(const H5F_t *f);
+H5_DLL unsigned H5F_get_nmounts(const H5F_t *f);
+H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref);
H5_DLL size_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref);
H5_DLL size_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *obj_id_list, hbool_t app_ref);
H5_DLL haddr_t H5F_get_next_proxy_addr(const H5F_t *f);
/* Functions than retrieve values set/cached from the superblock/FCPL */
-H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
-H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f);
-H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f);
+H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
H5_DLL unsigned H5F_sym_leaf_k(const H5F_t *f);
H5_DLL unsigned H5F_Kvalue(const H5F_t *f, const struct H5B_class_t *type);
+H5_DLL unsigned H5F_get_nrefs(const H5F_t *f);
+H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f);
+H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f);
+H5_DLL haddr_t H5F_get_sohm_addr(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_addr(H5F_t *f, haddr_t addr);
+H5_DLL unsigned H5F_get_sohm_vers(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_vers(H5F_t *f, unsigned vers);
+H5_DLL unsigned H5F_get_sohm_nindexes(const H5F_t *f);
+H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes);
+H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
+H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
H5_DLL double H5F_rdcc_w0(const H5F_t *f);
-H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
-H5_DLL struct H5RC_t *H5F_grp_btree_shared(const H5F_t *f);
H5_DLL size_t H5F_sieve_buf_size(const H5F_t *f);
H5_DLL unsigned H5F_gc_ref(const H5F_t *f);
H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f);
-H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f);
H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f);
-H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr);
+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 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);
/* Functions that retrieve values from VFD layer */
-H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature);
H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
+H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature);
H5_DLL haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type);
H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl,
void **file_handle);
-/* Functions than check file mounting information */
+/* Functions that check file mounting information */
H5_DLL hbool_t H5F_is_mount(const H5F_t *file);
H5_DLL hbool_t H5F_has_mount(const H5F_t *file);
+H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc/*in,out*/);
/* Functions that operate on blocks of bytes wrt super block */
H5_DLL herr_t H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr,
@@ -561,6 +614,13 @@ H5_DLL H5F_t *H5F_efc_open(H5F_t *parent, const char *name, unsigned flags,
hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id);
H5_DLL herr_t H5F_efc_close(H5F_t *parent, H5F_t *file);
+/* Global heap CWFS routines */
+H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap);
+H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, hid_t dxpl_id, size_t need, haddr_t *addr);
+H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap,
+ hbool_t add_heap);
+H5_DLL herr_t H5F_cwfs_remove_heap(H5F_file_t *shared, struct H5HG_heap_t *heap);
+
/* Debugging functions */
H5_DLL herr_t H5F_debug(H5F_t *f, FILE * stream, int indent, int fwidth);
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 540177b..1f0e6d6 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -139,18 +139,27 @@ typedef struct H5F_info2_t {
* Types of allocation requests. The values larger than H5FD_MEM_DEFAULT
* should not change other than adding new types to the end. These numbers
* might appear in files.
+ *
+ * Note: please change the log VFD flavors array if you change this
+ * enumeration.
*/
typedef enum H5F_mem_t {
- H5FD_MEM_NOLIST = -1, /*must be negative*/
- H5FD_MEM_DEFAULT = 0, /*must be zero*/
- H5FD_MEM_SUPER = 1,
- H5FD_MEM_BTREE = 2,
- H5FD_MEM_DRAW = 3,
- H5FD_MEM_GHEAP = 4,
- H5FD_MEM_LHEAP = 5,
- H5FD_MEM_OHDR = 6,
-
- H5FD_MEM_NTYPES /*must be last*/
+ H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list.
+ * Must be negative.
+ */
+ H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the
+ * datatype set in a larger allocation
+ * that will be suballocated by the library.
+ * Must be zero.
+ */
+ H5FD_MEM_SUPER = 1, /* Superblock data */
+ H5FD_MEM_BTREE = 2, /* B-tree data */
+ H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */
+ H5FD_MEM_GHEAP = 4, /* Global heap data */
+ H5FD_MEM_LHEAP = 5, /* Local heap data */
+ H5FD_MEM_OHDR = 6, /* Object header data */
+
+ H5FD_MEM_NTYPES /* Sentinel value - must be last */
} H5F_mem_t;
/* Free space section information */
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index c5ecf6b..c04ba24 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -93,8 +93,8 @@
unsigned
H5F_get_intent(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_intent)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -118,8 +118,8 @@ H5F_get_intent(const H5F_t *f)
char *
H5F_get_open_name(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_open_name)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->open_name);
@@ -144,8 +144,8 @@ H5F_get_open_name(const H5F_t *f)
char *
H5F_get_actual_name(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_actual_name)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->actual_name);
@@ -170,8 +170,8 @@ H5F_get_actual_name(const H5F_t *f)
char *
H5F_get_extpath(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_extpath)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->extpath);
@@ -181,6 +181,147 @@ H5F_get_extpath(const H5F_t *f)
/*-------------------------------------------------------------------------
+ * Function: H5F_get_shared
+ *
+ * Purpose: Retrieve the file's 'shared' pointer
+ *
+ * Return: 'shared' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+H5F_file_t *
+H5F_get_shared(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->shared)
+} /* end H5F_get_shared() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_same_shared
+ *
+ * Purpose: Determine if two files have the same shared file pointer
+ *
+ * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 19, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5F_same_shared(const H5F_t *f1, const H5F_t *f2)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f1);
+ HDassert(f1->shared);
+ HDassert(f2);
+ HDassert(f2->shared);
+
+ FUNC_LEAVE_NOAPI(f1->shared == f2->shared)
+} /* end H5F_same_shared() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_nopen_objs
+ *
+ * Purpose: Retrieve the file's 'nopen_objs' value
+ *
+ * Return: 'nopen_objs' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+unsigned
+H5F_get_nopen_objs(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->nopen_objs)
+} /* end H5F_get_nopen_objs() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_file_id
+ *
+ * Purpose: Retrieve the file's 'file_id' value
+ *
+ * Return: 'file_id' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5F_get_file_id(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->file_id)
+} /* end H5F_get_file_id() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_parent
+ *
+ * Purpose: Retrieve the file's 'parent' pointer
+ *
+ * Return: 'parent' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 19, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+H5F_t *
+H5F_get_parent(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->parent)
+} /* end H5F_get_parent() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_nmounts
+ *
+ * Purpose: Retrieve the file's 'nmounts' value
+ *
+ * Return: 'nmounts' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+unsigned
+H5F_get_nmounts(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->nmounts)
+} /* end H5F_get_nmounts() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_get_fcpl
*
* Purpose: Retrieve the value of a file's FCPL.
@@ -198,8 +339,8 @@ H5F_get_extpath(const H5F_t *f)
hid_t
H5F_get_fcpl(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_fcpl)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -225,8 +366,8 @@ H5F_get_fcpl(const H5F_t *f)
uint8_t
H5F_sizeof_addr(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sizeof_addr)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -252,8 +393,8 @@ H5F_sizeof_addr(const H5F_t *f)
uint8_t
H5F_sizeof_size(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sizeof_size)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -263,6 +404,78 @@ H5F_sizeof_size(const H5F_t *f)
/*-------------------------------------------------------------------------
+ * Function: H5F_get_sohm_addr
+ *
+ * Purpose: Retrieve the file's 'sohm_addr' value
+ *
+ * Return: 'sohm_addr' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+haddr_t
+H5F_get_sohm_addr(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->sohm_addr)
+} /* end H5F_get_sohm_addr() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_sohm_vers
+ *
+ * Purpose: Retrieve the file's 'sohm_vers' value
+ *
+ * Return: 'sohm_vers' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+unsigned
+H5F_get_sohm_vers(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->sohm_vers)
+} /* end H5F_get_sohm_vers() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_sohm_nindexes
+ *
+ * Purpose: Retrieve the file's 'sohm_nindexes' value
+ *
+ * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+unsigned
+H5F_get_sohm_nindexes(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->sohm_nindexes)
+} /* end H5F_get_sohm_nindexes() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_sym_leaf_k
*
* Purpose: Replaced a macro to retrieve the symbol table leaf size,
@@ -283,8 +496,8 @@ H5F_sizeof_size(const H5F_t *f)
unsigned
H5F_sym_leaf_k(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sym_leaf_k)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -315,8 +528,8 @@ H5F_sym_leaf_k(const H5F_t *f)
unsigned
H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_Kvalue)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -328,6 +541,30 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
/*-------------------------------------------------------------------------
+ * Function: H5F_get_nrefs
+ *
+ * Purpose: Retrieve the file's 'nrefs' value
+ *
+ * Return: 'nrefs' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+unsigned
+H5F_get_nrefs(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->nrefs)
+} /* end H5F_get_nrefs() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_rdcc_nslots
*
* Purpose: Replaced a macro to retrieve the raw data cache number of slots,
@@ -348,8 +585,8 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type)
size_t
H5F_rdcc_nslots(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_rdcc_nslots)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -379,8 +616,8 @@ H5F_rdcc_nslots(const H5F_t *f)
size_t
H5F_rdcc_nbytes(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_rdcc_nbytes)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -410,8 +647,8 @@ H5F_rdcc_nbytes(const H5F_t *f)
double
H5F_rdcc_w0(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_rdcc_w0)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -437,8 +674,8 @@ H5F_rdcc_w0(const H5F_t *f)
haddr_t
H5F_get_base_addr(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_base_addr)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -469,8 +706,8 @@ H5F_get_base_addr(const H5F_t *f)
H5RC_t *
H5F_grp_btree_shared(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_grp_btree_shared)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -500,8 +737,8 @@ H5F_grp_btree_shared(const H5F_t *f)
size_t
H5F_sieve_buf_size(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sieve_buf_size)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -531,8 +768,8 @@ H5F_sieve_buf_size(const H5F_t *f)
unsigned
H5F_gc_ref(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_gc_ref)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -560,8 +797,8 @@ H5F_gc_ref(const H5F_t *f)
hbool_t
H5F_use_latest_format(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_use_latest_format)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -588,8 +825,8 @@ H5F_use_latest_format(const H5F_t *f)
H5F_close_degree_t
H5F_get_fc_degree(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_fc_degree)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -616,8 +853,8 @@ H5F_get_fc_degree(const H5F_t *f)
hbool_t
H5F_store_msg_crt_idx(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_store_msg_crt_idx)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -643,8 +880,8 @@ H5F_store_msg_crt_idx(const H5F_t *f)
hbool_t
H5F_has_feature(const H5F_t *f, unsigned feature)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_has_feature)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -670,8 +907,8 @@ H5F_has_feature(const H5F_t *f, unsigned feature)
hid_t
H5F_get_driver_id(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_driver_id)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -700,7 +937,7 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5F_get_fileno, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(f->shared);
@@ -733,7 +970,7 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
{
haddr_t ret_value;
- FUNC_ENTER_NOAPI(H5F_get_eoa, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
HDassert(f);
HDassert(f->shared);
@@ -766,7 +1003,7 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_get_vfd_handle, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(file);
@@ -799,8 +1036,8 @@ done:
hbool_t
H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_is_tmp_addr)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
@@ -827,8 +1064,8 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr)
hbool_t
H5F_use_tmp_space(const H5F_t *f)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_use_tmp_space)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(f->shared);
diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c
index 8144986..95e5ad2 100644
--- a/src/H5Fsfile.c
+++ b/src/H5Fsfile.c
@@ -58,7 +58,7 @@ H5F_sfile_node_t *H5F_sfile_head_g = NULL;
herr_t
H5F_sfile_assert_num(unsigned n)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sfile_assert_num)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(n == 0) {
/* Sanity checking */
@@ -107,7 +107,7 @@ H5F_sfile_add(H5F_file_t *shared)
H5F_sfile_node_t *new_shared; /* New shared file node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_sfile_add)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(shared);
@@ -149,7 +149,7 @@ H5F_sfile_search(H5FD_t *lf)
H5F_sfile_node_t *curr; /* Current shared file node */
H5F_file_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sfile_search)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(lf);
@@ -191,7 +191,7 @@ H5F_sfile_remove(H5F_file_t *shared)
H5F_sfile_node_t *last; /* Last shared file node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_sfile_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(shared);
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 2510487..8bf4405 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -93,7 +93,7 @@ DESCRIPTION
static herr_t
H5F_init_super_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_init_super_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5F_init())
} /* H5F_init_super_interface() */
@@ -123,7 +123,7 @@ H5F_locate_signature(H5FD_t *file, hid_t dxpl_id)
unsigned n, maxpow;
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_locate_signature)
+ FUNC_ENTER_NOAPI_NOINIT
/* Find the least N such that 2^N is larger than the file size */
if(HADDR_UNDEF == (addr = H5FD_get_eof(file)) || HADDR_UNDEF == (eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER)))
@@ -180,7 +180,7 @@ H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_super_ext_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -233,7 +233,7 @@ H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_super_ext_open)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -272,7 +272,7 @@ H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_super_ext_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -327,7 +327,7 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
hbool_t dirtied = FALSE; /* Bool for sblock protect call */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_TAG(H5F_super_read, dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
/* Find the superblock */
if(HADDR_UNDEF == (super_addr = H5F_locate_signature(f->shared->lf, dxpl_id)))
@@ -401,7 +401,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
hbool_t ext_created = FALSE; /* Whether the extension has been created */
herr_t ret_value = SUCCEED; /* Return Value */
- FUNC_ENTER_NOAPI_TAG(H5F_super_init, dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
/* Allocate space for the superblock */
if(NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
@@ -681,7 +681,7 @@ H5F_super_dirty(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_super_dirty, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -713,7 +713,7 @@ done:
herr_t
H5F_super_free(H5F_super_t *sblock)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_super_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(sblock);
@@ -746,7 +746,7 @@ H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_super_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(f);
@@ -805,7 +805,7 @@ H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, void *mesg, unsigned id, hbool_
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_super_ext_write_msg, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(f);
@@ -881,7 +881,7 @@ H5F_super_ext_remove_msg(H5F_t *f, hid_t dxpl_id, unsigned id)
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_super_ext_remove_msg, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Make sure that the superblock extension object header exists */
HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 946fcad..29139d5 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -130,7 +130,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
hbool_t *dirtied = (hbool_t *)_udata; /* Set up dirtied out value */
H5F_super_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_sblock_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -474,7 +474,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
/* (Account for the stored EOA being absolute offset -QAK) */
if((eof + sblock->base_addr) < stored_eoa)
- HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, "truncated file")
+ HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, NULL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eoa = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, (unsigned long long)stored_eoa)
} /* end if */
/*
@@ -638,7 +638,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5F_sblock_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -836,7 +836,7 @@ H5F_sblock_dest(H5F_t UNUSED *f, H5F_super_t* sblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_sblock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(sblock);
@@ -867,7 +867,7 @@ H5F_sblock_clear(H5F_t *f, H5F_super_t *sblock, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_sblock_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -901,7 +901,7 @@ done:
static herr_t
H5F_sblock_size(const H5F_t *f, const H5F_super_t *sblock, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_sblock_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(f);
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index e2ee606..73b00a6 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -102,7 +102,7 @@ H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id,
H5F_t *file; /* File info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_get_sohm_mesg_count_test)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
@@ -139,14 +139,14 @@ H5F_check_cached_stab_test(hid_t file_id)
H5F_t *file; /* File info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_check_cached_stab_test)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Verify the cached stab info */
- if(H5G_verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0)
+ if(H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info")
done:
@@ -173,7 +173,7 @@ H5F_get_maxaddr_test(hid_t file_id, haddr_t *maxaddr)
H5F_t *file; /* File info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5F_get_maxaddr_test)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
diff --git a/src/H5G.c b/src/H5G.c
index 020c8fa..0d7d023 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -75,72 +75,163 @@
*-------------------------------------------------------------------------
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5G_init_interface
-/* Packages needed by this file... */
+
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
#include "H5Gpkg.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
-#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-/* Local macros */
+
+/****************/
+/* Local Macros */
+/****************/
+
#define H5G_RESERVED_ATOMS 0
-/* Local typedefs */
-/* User data for path traversal routine for "insertion file" routine */
-typedef struct {
- H5G_loc_t *loc; /* Pointer to the location for insertion */
-} H5G_trav_ins_t;
+/******************/
+/* Local Typedefs */
+/******************/
+
-/* User data for application-style iteration over links in a group */
-typedef struct {
- hid_t gid; /* The group ID for the application callback */
- H5G_link_iterate_t lnk_op; /* Application callback */
- void *op_data; /* Application's op data */
-} H5G_iter_appcall_ud_t;
+/********************/
+/* Package Typedefs */
+/********************/
-/* User data for recursive traversal over links from a group */
-typedef struct {
- hid_t gid; /* The group ID for the starting group */
- H5G_loc_t *curr_loc; /* Location of starting group */
- hid_t lapl_id; /* LAPL for walking across links */
- hid_t dxpl_id; /* DXPL for operations */
- H5_index_t idx_type; /* Index to use */
- H5_iter_order_t order; /* Iteration order within index */
- H5SL_t *visited; /* Skip list for tracking visited nodes */
- char *path; /* Path name of the link */
- size_t curr_path_len; /* Current length of the path in the buffer */
- size_t path_buf_size; /* Size of path buffer */
- H5L_iterate_t op; /* Application callback */
- void *op_data; /* Application's op data */
-} H5G_iter_visit_ud_t;
+/********************/
+/* Local Prototypes */
+/********************/
-/* Package variables */
+/*********************/
+/* Package Variables */
+/*********************/
-/* Local variables */
-/* Declare a free list to manage the H5G_t struct */
-H5FL_DEFINE(H5G_t);
-H5FL_DEFINE(H5G_shared_t);
+/*****************************/
+/* Library Private Variables */
+/*****************************/
-/* Declare the free list to manage H5_obj_t's */
-H5FL_DEFINE(H5_obj_t);
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G__init
+ *
+ * Purpose: Initialize the interface from some other package.
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, November 11, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G__init(void)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+ /* FUNC_ENTER() does all the work */
-/* Private prototypes */
-static herr_t H5G_open_oid(H5G_t *grp, hid_t dxpl_id);
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G__init() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_init_interface
+ *
+ * Purpose: Initializes the H5G interface.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
+ *
+ * Notes: The group creation properties are registered in the property
+ * list interface initialization routine (H5P_init_interface)
+ * so that the file creation property class can inherit from it
+ * correctly. (Which allows the file creation property list to
+ * control the group creation properties of the root group of
+ * a file) QAK - 24/10/2005
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5G_init_interface(void)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Initialize the atom group for the group IDs */
+ if(H5I_register_type(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS, (H5I_free_t)H5G_close) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_init_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_term_interface
+ *
+ * Purpose: Terminates the H5G interface
+ *
+ * Return: Success: Positive if anything is done that might
+ * affect other interfaces; zero otherwise.
+ *
+ * Failure: Negative.
+ *
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5G_term_interface(void)
+{
+ int n = 0;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ if(H5_interface_initialize_g) {
+ if((n = H5I_nmembers(H5I_GROUP)))
+ H5I_clear_type(H5I_GROUP, FALSE, FALSE);
+ else {
+ /* Destroy the group object id group */
+ H5I_dec_type_ref(H5I_GROUP);
+
+ /* Mark closed */
+ H5_interface_initialize_g = 0;
+ n = 1; /*H5I*/
+ } /* end else */
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(n)
+} /* end H5G_term_interface() */
/*-------------------------------------------------------------------------
@@ -177,7 +268,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
H5G_t *grp = NULL; /* New group created */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Gcreate2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("i", "i*siii", loc_id, name, lcpl_id, gcpl_id, gapl_id);
/* Check arguments */
@@ -208,7 +299,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
/* Create the new group & get its ID */
- if(NULL == (grp = H5G_create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, H5AC_dxpl_id)))
+ if(NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
@@ -223,61 +314,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_create_named
- *
- * Purpose: Internal routine to create a new "named" group.
- *
- * Return: Success: Non-NULL, pointer to new group object.
- *
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * April 5, 2007
- *
- *-------------------------------------------------------------------------
- */
-H5G_t *
-H5G_create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id,
- hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id)
-{
- H5O_obj_create_t ocrt_info; /* Information for object creation */
- H5G_obj_create_t gcrt_info; /* Information for group creation */
- H5G_t *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_create_named, NULL)
-
- /* Check arguments */
- HDassert(loc);
- HDassert(name && *name);
- HDassert(lcpl_id != H5P_DEFAULT);
- HDassert(gcpl_id != H5P_DEFAULT);
- HDassert(gapl_id != H5P_DEFAULT);
- HDassert(dxpl_id != H5P_DEFAULT);
-
- /* Set up group creation info */
- gcrt_info.gcpl_id = gcpl_id;
- gcrt_info.cache_type = H5G_NOTHING_CACHED;
- HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
-
- /* Set up object creation information */
- ocrt_info.obj_type = H5O_TYPE_GROUP;
- ocrt_info.crt_info = &gcrt_info;
- ocrt_info.new_obj = NULL;
-
- /* Create the new group and link it to its parent group */
- if(H5L_link_object(loc, name, &ocrt_info, lcpl_id, gapl_id, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
- HDassert(ocrt_info.new_obj);
-
- /* Set the return value */
- ret_value = (H5G_t *)ocrt_info.new_obj;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_create_named() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5Gcreate_anon
*
* Purpose: Creates a new group relative to LOC_ID, giving it the
@@ -320,7 +356,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
H5G_obj_create_t gcrt_info; /* Information for group creation */
hid_t ret_value;
- FUNC_ENTER_API(H5Gcreate_anon, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "iii", loc_id, gcpl_id, gapl_id);
/* Check arguments */
@@ -347,7 +383,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
- if(NULL == (grp = H5G_create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id)))
+ if(NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
@@ -399,7 +435,7 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
H5G_loc_t loc; /* Location of parent for group */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Gopen2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, name, gapl_id);
/* Check args */
@@ -416,7 +452,7 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
/* Open the group */
- if((grp = H5G_open_name(&loc, name, gapl_id, H5AC_dxpl_id)) == NULL)
+ if((grp = H5G__open_name(&loc, name, gapl_id, H5AC_dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an ID for the group */
@@ -462,7 +498,7 @@ H5Gget_create_plist(hid_t group_id)
hid_t new_gcpl_id = FAIL;
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Gget_create_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", group_id);
/* Check args */
@@ -497,7 +533,7 @@ H5Gget_create_plist(hid_t group_id)
} /* end if */
/* Check for the group having a link info message */
- if((linfo_exists = H5G_obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(linfo_exists) {
/* Set the link info for the property list */
@@ -554,7 +590,7 @@ H5Gget_info(hid_t grp_id, H5G_info_t *grp_info)
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", grp_id, grp_info);
/* Check args */
@@ -569,7 +605,7 @@ H5Gget_info(hid_t grp_id, H5G_info_t *grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Retrieve the group's information */
- if(H5G_obj_info(loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
@@ -601,7 +637,7 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
hbool_t loc_found = FALSE; /* Location at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_info_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*xi", loc_id, name, grp_info, lapl_id);
/* Check args */
@@ -628,7 +664,7 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G_obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
@@ -664,7 +700,7 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
hbool_t loc_found = FALSE; /* Entry at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_info_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, grp_info,
lapl_id);
@@ -696,7 +732,7 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G_obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
@@ -726,7 +762,7 @@ H5Gclose(hid_t group_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", group_id);
/* Check args */
@@ -744,1096 +780,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gclose() */
-/*
- *-------------------------------------------------------------------------
- *-------------------------------------------------------------------------
- * N O A P I F U N C T I O N S B E Y O N D T H I S P O I N T
- *-------------------------------------------------------------------------
- *-------------------------------------------------------------------------
- */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_init
- *
- * Purpose: Initialize the interface from some other package.
- *
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Quincey Koziol
- * Saturday, November 11, 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_init(void)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_init, FAIL)
- /* FUNC_ENTER() does all the work */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_init() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_init_interface
- *
- * Purpose: Initializes the H5G interface.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
- *
- * Notes: The group creation properties are registered in the property
- * list interface initialization routine (H5P_init_interface)
- * so that the file creation property class can inherit from it
- * correctly. (Which allows the file creation property list to
- * control the group creation properties of the root group of
- * a file) QAK - 24/10/2005
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_init_interface(void)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5G_init_interface)
-
- /* Initialize the atom group for the group IDs */
- if(H5I_register_type(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS, (H5I_free_t)H5G_close) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_init_interface() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_term_interface
- *
- * Purpose: Terminates the H5G interface
- *
- * Return: Success: Positive if anything is done that might
- * affect other interfaces; zero otherwise.
- *
- * Failure: Negative.
- *
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
- *
- *-------------------------------------------------------------------------
- */
-int
-H5G_term_interface(void)
-{
- int n = 0;
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_term_interface)
-
- if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_GROUP)))
- H5I_clear_type(H5I_GROUP, FALSE, FALSE);
- else {
- /* Destroy the group object id group */
- H5I_dec_type_ref(H5I_GROUP);
-
- /* Mark closed */
- H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
- } /* end else */
- } /* end if */
-
- FUNC_LEAVE_NOAPI(n)
-} /* end H5G_term_interface() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_create
- *
- * Purpose: Creates a new empty group with the specified name. The name
- * is either an absolute name or is relative to LOC.
- *
- * Return: Success: A handle for the group. The group is opened
- * and should eventually be close by calling
- * H5G_close().
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 11 1997
- *
- *-------------------------------------------------------------------------
- */
-H5G_t *
-H5G_create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id)
-{
- H5G_t *grp = NULL; /*new group */
- unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */
- H5G_t *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5G_create)
-
- /* check args */
- HDassert(file);
- HDassert(gcrt_info->gcpl_id != H5P_DEFAULT);
- HDassert(dxpl_id != H5P_DEFAULT);
-
- /* create an open group */
- if(NULL == (grp = H5FL_CALLOC(H5G_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
-
- /* Create the group object header */
- if(H5G_obj_create(file, dxpl_id, gcrt_info, &(grp->oloc)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header")
- oloc_init = 1; /* Indicate that the object location information is valid */
-
- /* Add group to list of open objects in file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count")
- if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
-
- /* Set the count of times the object is opened */
- grp->shared->fo_count = 1;
-
- /* Set return value */
- ret_value = grp;
-
-done:
- if(ret_value == NULL) {
- /* Check if we need to release the file-oriented symbol table info */
- if(oloc_init) {
- if(H5O_dec_rc_by_loc(&(grp->oloc), dxpl_id) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object")
- if(H5O_close(&(grp->oloc)) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "unable to release object header")
- if(H5O_delete(file, dxpl_id, grp->oloc.addr) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, NULL, "unable to delete object header")
- } /* end if */
- if(grp != NULL) {
- if(grp->shared != NULL)
- grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- grp = H5FL_FREE(H5G_t, grp);
- } /* end if */
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_create() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_open_name
- *
- * Purpose: Opens an existing group by name.
- *
- * Return: Success: Ptr to a new group.
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Monday, August 27, 2007
- *
- *-------------------------------------------------------------------------
- */
-H5G_t *
-H5G_open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id,
- hid_t dxpl_id)
-{
- H5G_t *grp = NULL; /* Group to open */
- H5G_loc_t grp_loc; /* Location used to open group */
- H5G_name_t grp_path; /* Opened object group hier. path */
- H5O_loc_t grp_oloc; /* Opened object object location */
- hbool_t loc_found = FALSE; /* Location at 'name' found */
- H5O_type_t obj_type; /* Type of object at location */
- H5G_t *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_open_name, NULL)
-
- /* Check args */
- HDassert(loc);
- HDassert(name);
-
- /* Set up opened group location to fill in */
- grp_loc.oloc = &grp_oloc;
- grp_loc.path = &grp_path;
- H5G_loc_reset(&grp_loc);
-
- /* Find the group object using the gapl passed in */
- if(H5G_loc_find(loc, name, &grp_loc/*out*/, gapl_id, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found")
- loc_found = TRUE;
-
- /* Check that the object found is the correct type */
- if(H5O_obj_type(&grp_oloc, &obj_type, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type")
- if(obj_type != H5O_TYPE_GROUP)
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group")
-
- /* Open the group */
- if((grp = H5G_open(&grp_loc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group")
-
- /* Set return value */
- ret_value = grp;
-
-done:
- if(!ret_value) {
- if(loc_found && H5G_loc_free(&grp_loc) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, NULL, "can't free location")
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_open_name() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_open
- *
- * Purpose: Opens an existing group. The group should eventually be
- * closed by calling H5G_close().
- *
- * Return: Success: Ptr to a new group.
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
- *
- *-------------------------------------------------------------------------
- */
-H5G_t *
-H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
-{
- H5G_t *grp = NULL; /* Group opened */
- H5G_shared_t *shared_fo; /* Shared group object */
- H5G_t *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_open, NULL)
-
- /* Check args */
- HDassert(loc);
-
- /* Allocate the group structure */
- if(NULL == (grp = H5FL_CALLOC(H5G_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group")
-
- /* Shallow copy (take ownership) of the group location object */
- if(H5O_loc_copy(&(grp->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location")
- if(H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path")
-
- /* Check if group was already open */
- if((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) {
-
- /* Clear any errors from H5FO_opened() */
- H5E_clear_stack(NULL);
-
- /* Open the group object */
- if(H5G_open_oid(grp, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found")
-
- /* Add group to list of open objects in file */
- if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
- grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
- } /* end if */
-
- /* Increment object count for the object in the top file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
-
- /* Set open object count */
- grp->shared->fo_count = 1;
- } /* end if */
- else {
- /* Point to shared group info */
- grp->shared = shared_fo;
-
- /* Increment shared reference count */
- shared_fo->fo_count++;
-
- /* Check if the object has been opened through the top file yet */
- if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
- /* Open the object through this top file */
- if(H5O_open(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header")
- } /* end if */
-
- /* Increment object count for the object in the top file */
- if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
- } /* end else */
-
- /* Set return value */
- ret_value = grp;
-
-done:
- if(!ret_value && grp) {
- H5O_loc_free(&(grp->oloc));
- H5G_name_free(&(grp->path));
- grp = H5FL_FREE(H5G_t, grp);
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_open() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_open_oid
- *
- * Purpose: Opens an existing group. The group should eventually be
- * closed by calling H5G_close().
- *
- * Return: Success: Ptr to a new group.
- *
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Wednesday, March 17, 1999
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_open_oid(H5G_t *grp, hid_t dxpl_id)
-{
- hbool_t obj_opened = FALSE;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT(H5G_open_oid)
-
- /* Check args */
- HDassert(grp);
-
- /* Allocate the shared information for the group */
- if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* Grab the object header */
- if(H5O_open(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- obj_opened = TRUE;
-
- /* Check if this object has the right message(s) to be treated as a group */
- if((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id) <= 0)
- && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id) <= 0))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group")
-
-done:
- if(ret_value < 0) {
- if(obj_opened)
- H5O_close(&(grp->oloc));
- if(grp->shared)
- grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_open_oid() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_close
- *
- * Purpose: Closes the specified group.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_close(H5G_t *grp)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_close, FAIL)
-
- /* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->fo_count > 0);
-
- --grp->shared->fo_count;
-
- if(0 == grp->shared->fo_count) {
- HDassert(grp != H5G_rootof(H5G_fileof(grp)));
-
- /* Remove the group from the list of opened objects in the file */
- if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
- if(H5FO_delete(grp->oloc.file, H5AC_dxpl_id, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects")
- if(H5O_close(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
- grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- } else {
- /* Decrement the ref. count for this object in the top file */
- if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
-
- /* Check reference count for this object in the top file */
- if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0)
- if(H5O_close(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
-
- /* If this group is a mount point and the mount point is the last open
- * reference to the group, then attempt to close down the file hierarchy
- */
- if(grp->shared->mounted && grp->shared->fo_count == 1) {
- /* Attempt to close down the file hierarchy */
- if(H5F_try_close(grp->oloc.file) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
- } /* end if */
- } /* end else */
-
- if(H5G_name_free(&(grp->path)) < 0) {
- grp = H5FL_FREE(H5G_t, grp);
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name")
- } /* end if */
-
- grp = H5FL_FREE(H5G_t, grp);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_close() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_oloc
- *
- * Purpose: Returns a pointer to the object location for a group.
- *
- * Return: Success: Ptr to group entry
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Tuesday, March 24, 1998
- *
- *-------------------------------------------------------------------------
- */
-H5O_loc_t *
-H5G_oloc(H5G_t *grp)
-{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_oloc)
-
- FUNC_LEAVE_NOAPI(grp ? &(grp->oloc) : NULL)
-} /* end H5G_oloc() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_nameof
- *
- * Purpose: Returns a pointer to the hier. name for a group.
- *
- * Return: Success: Ptr to hier. name
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Monday, September 12, 2005
- *
- *-------------------------------------------------------------------------
- */
-H5G_name_t *
-H5G_nameof(H5G_t *grp)
-{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_nameof)
-
- FUNC_LEAVE_NOAPI(grp ? &(grp->path) : NULL)
-} /* end H5G_nameof() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_fileof
- *
- * Purpose: Returns the file to which the specified group belongs.
- *
- * Return: Success: File pointer.
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Tuesday, March 24, 1998
- *
- *-------------------------------------------------------------------------
- */
-H5F_t *
-H5G_fileof(H5G_t *grp)
-{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_fileof)
-
- HDassert(grp);
-
- FUNC_LEAVE_NOAPI(grp->oloc.file)
-} /* end H5G_fileof() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_get_shared_count
- *
- * Purpose: Queries the group object's "shared count"
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, July 5, 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_get_shared_count(H5G_t *grp)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_get_shared_count)
-
- /* Check args */
- HDassert(grp && grp->shared);
-
- FUNC_LEAVE_NOAPI(grp->shared->fo_count)
-} /* end H5G_get_shared_count() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_mount
- *
- * Purpose: Sets the 'mounted' flag for a group
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, July 19, 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_mount(H5G_t *grp)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_mount)
-
- /* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == FALSE);
-
- /* Set the 'mounted' flag */
- grp->shared->mounted = TRUE;
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_mount() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_mounted
- *
- * Purpose: Retrieves the 'mounted' flag for a group
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, July 15, 2008
- *
- *-------------------------------------------------------------------------
- */
-hbool_t
-H5G_mounted(H5G_t *grp)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_mounted)
-
- /* Check args */
- HDassert(grp && grp->shared);
-
- FUNC_LEAVE_NOAPI(grp->shared->mounted)
-} /* end H5G_mounted() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_unmount
- *
- * Purpose: Resets the 'mounted' flag for a group
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Tuesday, July 19, 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_unmount(H5G_t *grp)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_unmount)
-
- /* Check args */
- HDassert(grp && grp->shared);
- HDassert(grp->shared->mounted == TRUE);
-
- /* Reset the 'mounted' flag */
- grp->shared->mounted = FALSE;
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_unmount() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_iterate_cb
- *
- * Purpose: Callback function for iterating over links in a group
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Oct 3, 2005
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
-{
- H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
- herr_t ret_value = H5_ITER_ERROR; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5G_iterate_cb)
-
- /* Sanity check */
- HDassert(lnk);
- HDassert(udata);
-
- switch(udata->lnk_op.op_type) {
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- case H5G_LINK_OP_OLD:
- /* Make the old-type application callback */
- ret_value = (udata->lnk_op.op_func.op_old)(udata->gid, lnk->name, udata->op_data);
- break;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
- case H5G_LINK_OP_NEW:
- {
- H5L_info_t info; /* Link info */
-
- /* Retrieve the info for the link */
- if(H5G_link_to_info(lnk, &info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
-
- /* Make the application callback */
- ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data);
- }
- break;
-
- default:
- HDassert(0 && "Unknown link op type?!?");
- } /* end switch */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_iterate_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_iterate
- *
- * Purpose: Private function for iterating over links in a group
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Oct 3, 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_iterate(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id)
-{
- H5G_loc_t loc; /* Location of parent for group */
- hid_t gid = -1; /* ID of group to iterate over */
- H5G_t *grp = NULL; /* Pointer to group data structure to iterate over */
- H5G_iter_appcall_ud_t udata; /* User data for callback */
- herr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_iterate, FAIL)
-
- /* Sanity check */
- HDassert(group_name);
- HDassert(last_lnk);
- HDassert(lnk_op && lnk_op->op_func.op_new);
-
- /*
- * Open the group on which to operate. We also create a group ID which
- * we can pass to the application-defined operator.
- */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(NULL == (grp = H5G_open_name(&loc, group_name, lapl_id, dxpl_id)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
-
- /* Set up user data for callback */
- udata.gid = gid;
- udata.lnk_op = *lnk_op;
- udata.op_data = op_data;
-
- /* Call the real group iteration routine */
- if((ret_value = H5G_obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G_iterate_cb, &udata, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links")
-
-done:
- /* Release the group opened */
- if(gid > 0) {
- if(H5I_dec_app_ref(gid) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
- } /* end if */
- else if(grp && H5G_close(grp) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_iterate() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_free_visit_visited
- *
- * Purpose: Free the key for an object visited during a group traversal
- *
- * Return: Non-negative on success, negative on failure
- *
- * Programmer: Quincey Koziol
- * Nov 4, 2007
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_free_visit_visited(void *item, void UNUSED *key, void UNUSED *operator_data/*in,out*/)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_free_visit_visited)
-
- item = H5FL_FREE(H5_obj_t, item);
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_free_visit_visited() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_visit_cb
- *
- * Purpose: Callback function for recursively visiting links from a group
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Nov 4, 2007
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
-{
- H5G_iter_visit_ud_t *udata = (H5G_iter_visit_ud_t *)_udata; /* User data for callback */
- H5L_info_t info; /* Link info */
- H5G_loc_t obj_loc; /* Location of object */
- H5G_name_t obj_path; /* Object's group hier. path */
- H5O_loc_t obj_oloc; /* Object's object location */
- hbool_t obj_found = FALSE; /* Object at 'name' found */
- size_t old_path_len = udata->curr_path_len; /* Length of path before appending this link's name */
- size_t link_name_len; /* Length of link's name */
- size_t len_needed; /* Length of path string needed */
- herr_t ret_value = H5_ITER_CONT; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5G_visit_cb)
-
- /* Sanity check */
- HDassert(lnk);
- HDassert(udata);
-
- /* Check if we will need more space to store this link's relative path */
- /* ("+2" is for string terminator and possible '/' for group separator later) */
- link_name_len = HDstrlen(lnk->name);
- len_needed = udata->curr_path_len + link_name_len + 2;
- if(len_needed > udata->path_buf_size) {
- void *new_path; /* Pointer to new path buffer */
-
- /* Attempt to allocate larger buffer for path */
- if(NULL == (new_path = H5MM_realloc(udata->path, len_needed)))
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string")
- udata->path = (char *)new_path;
- udata->path_buf_size = len_needed;
- } /* end if */
-
- /* Build the link's relative path name */
- HDassert(udata->path[old_path_len] == '\0');
- HDstrcpy(&(udata->path[old_path_len]), lnk->name);
- udata->curr_path_len += link_name_len;
-
- /* Construct the link info from the link message */
- if(H5G_link_to_info(lnk, &info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
-
- /* Make the application callback */
- ret_value = (udata->op)(udata->gid, udata->path, &info, udata->op_data);
-
- /* Check for doing more work */
- if(ret_value == H5_ITER_CONT && lnk->type == H5L_TYPE_HARD) {
- H5_obj_t obj_pos; /* Object "position" for this object */
-
- /* Set up opened group location to fill in */
- obj_loc.oloc = &obj_oloc;
- obj_loc.path = &obj_path;
- H5G_loc_reset(&obj_loc);
-
- /* Find the object using the LAPL passed in */
- /* (Correctly handles mounted files) */
- if(H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
- obj_found = TRUE;
-
- /* Construct unique "position" for this object */
- H5F_GET_FILENO(obj_oloc.file, obj_pos.fileno);
- obj_pos.addr = obj_oloc.addr;
-
- /* Check if we've seen the object the link references before */
- if(NULL == H5SL_search(udata->visited, &obj_pos)) {
- H5O_type_t otype; /* Basic object type (group, dataset, etc.) */
- unsigned rc; /* Reference count of object */
-
- /* Get the object's reference count and type */
- if(H5O_get_rc_and_type(&obj_oloc, udata->dxpl_id, &rc, &otype) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
-
- /* If its ref count is > 1, we add it to the list of visited objects */
- /* (because it could come up again during traversal) */
- if(rc > 1) {
- H5_obj_t *new_node; /* New object node for visited list */
-
- /* Allocate new object "position" node */
- if((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node")
-
- /* Set node information */
- *new_node = obj_pos;
-
- /* Add to list of visited objects */
- if(H5SL_insert(udata->visited, new_node, new_node) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert object node into visited list")
- } /* end if */
-
- /* If it's a group, we recurse into it */
- if(otype == H5O_TYPE_GROUP) {
- H5G_loc_t *old_loc = udata->curr_loc; /* Pointer to previous group location info */
- H5_index_t idx_type = udata->idx_type; /* Type of index to use */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
-
- /* Add the path separator to the current path */
- HDassert(udata->path[udata->curr_path_len] == '\0');
- HDstrcpy(&(udata->path[udata->curr_path_len]), "/");
- udata->curr_path_len++;
-
- /* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(&obj_oloc, &linfo, udata->dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message")
- if(linfo_exists) {
- /* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
- /* Check if creation order is tracked */
- if(!linfo.track_corder)
- /* Switch to name order for this group */
- idx_type = H5_INDEX_NAME;
- } /* end if */
- else
- HDassert(idx_type == H5_INDEX_NAME);
- } /* end if */
- else {
- /* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
- /* Switch to name order for this group */
- idx_type = H5_INDEX_NAME;
- } /* end if */
-
- /* Point to this group's location info */
- udata->curr_loc = &obj_loc;
-
- /* Iterate over links in group */
- ret_value = H5G_obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL, H5G_visit_cb, udata, udata->dxpl_id);
-
- /* Restore location */
- udata->curr_loc = old_loc;
- } /* end if */
- } /* end if */
- } /* end if */
-
-done:
- /* Reset path back to incoming path */
- udata->path[old_path_len] = '\0';
- udata->curr_path_len = old_path_len;
-
- /* Release resources */
- if(obj_found && H5G_loc_free(&obj_loc) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_visit_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_visit
- *
- * Purpose: Recursively visit all the links in a group and all
- * the groups that are linked to from that group. Links within
- * each group are visited according to the order within the
- * specified index (unless the specified index does not exist for
- * a particular group, then the "name" index is used).
- *
- * NOTE: Each _link_ reachable from the initial group will only be
- * visited once. However, because an object may be reached from
- * more than one link, the visitation may call the application's
- * callback with more than one link that points to a particular
- * _object_.
- *
- * Return: Success: The return value of the first operator that
- * returns non-zero, or zero if all members were
- * processed with no operator returning non-zero.
- *
- * Failure: Negative if something goes wrong within the
- * library, or the negative value returned by one
- * of the operators.
- *
- *
- *
- * Programmer: Quincey Koziol
- * November 4 2007
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
- H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id)
-{
- H5G_iter_visit_ud_t udata; /* User data for callback */
- H5O_linfo_t linfo; /* Link info message */
- htri_t linfo_exists; /* Whether the link info message exists */
- hid_t gid = (-1); /* Group ID */
- H5G_t *grp = NULL; /* Group opened */
- H5G_loc_t loc; /* Location of group passed in */
- H5G_loc_t start_loc; /* Location of starting group */
- unsigned rc; /* Reference count of object */
- herr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_visit, FAIL)
-
- /* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
-
- /* Open the group to begin visiting within */
- if((grp = H5G_open_name(&loc, group_name, lapl_id, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
-
- /* Register an ID for the starting group */
- if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
-
- /* Get the location of the starting group */
- if(H5G_loc(gid, &start_loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
-
- /* Set up user data */
- udata.gid = gid;
- udata.curr_loc = &start_loc;
- udata.lapl_id = lapl_id;
- udata.dxpl_id = dxpl_id;
- udata.idx_type = idx_type;
- udata.order = order;
- udata.op = op;
- udata.op_data = op_data;
-
- /* Allocate space for the path name */
- if(NULL == (udata.path = H5MM_strdup("")))
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer")
- udata.path_buf_size = 1;
- udata.curr_path_len = 0;
-
- /* Create skip list to store visited object information */
- if((udata.visited = H5SL_create(H5SL_TYPE_OBJ)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
-
- /* Get the group's reference count */
- if(H5O_get_rc_and_type(&grp->oloc, dxpl_id, &rc, NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info")
-
- /* If its ref count is > 1, we add it to the list of visited objects */
- /* (because it could come up again during traversal) */
- if(rc > 1) {
- H5_obj_t *obj_pos; /* New object node for visited list */
-
- /* Allocate new object "position" node */
- if((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node")
-
- /* Construct unique "position" for this object */
- H5F_GET_FILENO(grp->oloc.file, obj_pos->fileno);
- obj_pos->addr = grp->oloc.addr;
-
- /* Add to list of visited objects */
- if(H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list")
- } /* end if */
-
- /* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(&(grp->oloc), &linfo, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
- if(linfo_exists) {
- /* Check for creation order tracking, if creation order index lookup requested */
- if(idx_type == H5_INDEX_CRT_ORDER) {
- /* Check if creation order is tracked */
- if(!linfo.track_corder)
- /* Switch to name order for this group */
- idx_type = H5_INDEX_NAME;
- } /* end if */
- else
- HDassert(idx_type == H5_INDEX_NAME);
- } /* end if */
- else {
- /* Can only perform name lookups on groups with symbol tables */
- if(idx_type != H5_INDEX_NAME)
- /* Switch to name order for this group */
- idx_type = H5_INDEX_NAME;
- } /* end if */
-
- /* Call the link iteration routine */
- if((ret_value = H5G_obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G_visit_cb, &udata, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links")
-
-done:
- /* Release user data resources */
- H5MM_xfree(udata.path);
- if(udata.visited)
- H5SL_destroy(udata.visited, H5G_free_visit_visited, NULL);
-
- /* Release the group opened */
- if(gid > 0) {
- if(H5I_dec_app_ref(gid) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
- } /* end if */
- else if(grp && H5G_close(grp) < 0)
- HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_visit() */
-
/*-------------------------------------------------------------------------
* Function: H5Gflush
@@ -1853,7 +799,7 @@ H5Gflush(hid_t group_id)
H5G_t *grp; /* Dataset for this operation */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Gflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", group_id);
/* Check args */
@@ -1887,7 +833,7 @@ H5Grefresh(hid_t group_id)
H5G_t * grp = NULL;
hid_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Grefresh, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", group_id);
/* Check args */
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 5ae9db1..a917eb4 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -167,7 +167,7 @@ H5G_dense_fh_name_cmp(const void *obj, size_t UNUSED obj_len, void *_udata)
H5O_link_t *lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_fh_name_cmp)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
@@ -209,7 +209,7 @@ H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_name_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Copy user information info native record */
nrecord->hash = udata->common.name_hash;
@@ -240,7 +240,7 @@ H5G_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec)
const H5G_dense_bt2_name_rec_t *bt2_rec = (const H5G_dense_bt2_name_rec_t *)_bt2_rec;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_name_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(bt2_udata);
@@ -310,7 +310,7 @@ H5G_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void UNUSED *ct
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_name_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Encode the record's fields */
UINT32ENCODE(raw, nrecord->hash)
@@ -338,7 +338,7 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void UNUSED *ct
{
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_name_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Decode the record's fields */
UINT32DECODE(raw, nrecord->hash)
@@ -369,7 +369,7 @@ H5G_dense_btree2_name_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dx
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_name_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:",
(unsigned)nrecord->hash);
@@ -399,7 +399,7 @@ H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_corder_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Copy user information info native record */
nrecord->corder = udata->common.corder;
@@ -430,7 +430,7 @@ H5G_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec)
const H5G_dense_bt2_corder_rec_t *bt2_rec = (const H5G_dense_bt2_corder_rec_t *)_bt2_rec;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_corder_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(bt2_udata);
@@ -476,7 +476,7 @@ H5G_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void UNUSED *
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_corder_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Encode the record's fields */
INT64ENCODE(raw, nrecord->corder)
@@ -504,7 +504,7 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void UNUSED *
{
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_corder_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Decode the record's fields */
INT64DECODE(raw, nrecord->corder)
@@ -535,7 +535,7 @@ H5G_dense_btree2_corder_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_dense_btree2_corder_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:",
(unsigned long long)nrecord->corder);
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index ff758c4..1d2ad8b 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -130,7 +130,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
const uint8_t *p;
H5G_node_t *ret_value; /*for error handling */
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_load)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -181,7 +181,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
UINT16DECODE(p, sym->nsyms);
/* entries */
- if(H5G_ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0)
+ if(H5G__ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
/* Set return value */
@@ -192,7 +192,7 @@ done:
if(wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
if(!ret_value)
- if(sym && H5G_node_free(sym) < 0)
+ if(sym && H5G__node_free(sym) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, NULL, "unable to destroy symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
@@ -219,7 +219,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
uint8_t node_buf[H5G_NODE_BUF_SIZE]; /* Buffer for node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -260,7 +260,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
UINT16ENCODE(p, sym->nsyms);
/* entries */
- if(H5G_ent_encode_vec(f, &p, sym->entry, sym->nsyms) < 0)
+ if(H5G__ent_encode_vec(f, &p, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
HDmemset(p, 0, sym->node_size - (size_t)(p - node));
@@ -307,7 +307,7 @@ H5G_node_dest(H5F_t *f, H5G_node_t *sym)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -330,7 +330,7 @@ H5G_node_dest(H5F_t *f, H5G_node_t *sym)
} /* end if */
/* Destroy symbol table node */
- if(H5G_node_free(sym) < 0)
+ if(H5G__node_free(sym) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node")
done:
@@ -356,7 +356,7 @@ H5G_node_clear(H5F_t *f, H5G_node_t *sym, hbool_t destroy)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -396,7 +396,7 @@ done:
static herr_t
H5G_node_size(const H5F_t UNUSED *f, const H5G_node_t *sym, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 26773cb..e4de283 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -89,7 +89,7 @@ H5G_compact_build_table_cb(const void *_mesg, unsigned UNUSED idx, void *_udata)
H5G_iter_bt_t *udata = (H5G_iter_bt_t *)_udata; /* 'User data' passed in */
herr_t ret_value=H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_compact_build_table_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(lnk);
@@ -128,7 +128,7 @@ H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_compact_build_table)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(oloc);
@@ -159,7 +159,7 @@ H5G_compact_build_table(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages")
/* Sort link table in correct iteration order */
- if(H5G_link_sort_table(ltable, idx_type, order) < 0)
+ if(H5G__link_sort_table(ltable, idx_type, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
} /* end if */
else
@@ -171,7 +171,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_compact_insert
+ * Function: H5G__compact_insert
*
* Purpose: Insert a new symbol into the table described by GRP_ENT in
* file F. The name of the new symbol is NAME and its symbol
@@ -186,12 +186,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
+H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_insert, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
@@ -203,11 +203,11 @@ H5G_compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_insert() */
+} /* end H5G__compact_insert() */
/*-------------------------------------------------------------------------
- * Function: H5G_compact_get_name_by_idx
+ * Function: H5G__compact_get_name_by_idx
*
* Purpose: Returns the name of objects in the group by giving index.
*
@@ -220,14 +220,14 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_compact_get_name_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
+H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t idx, char* name, size_t size)
{
H5G_link_table_t ltable = {0, NULL}; /* Link table */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_get_name_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
@@ -252,11 +252,11 @@ H5G_compact_get_name_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_get_name_by_idx() */
+} /* end H5G__compact_get_name_by_idx() */
/*-------------------------------------------------------------------------
@@ -280,7 +280,7 @@ H5G_compact_remove_common_cb(const void *_mesg, unsigned UNUSED idx, void *_udat
H5G_iter_rm_t *udata = (H5G_iter_rm_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_compact_remove_common_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(lnk);
@@ -289,7 +289,7 @@ H5G_compact_remove_common_cb(const void *_mesg, unsigned UNUSED idx, void *_udat
/* If we've found the right link, get the object type */
if(HDstrcmp(lnk->name, udata->name) == 0) {
/* Replace path names for link being removed */
- if(H5G_link_name_replace(udata->file, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
+ if(H5G__link_name_replace(udata->file, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object type")
/* Stop the iteration, we found the correct link */
@@ -302,7 +302,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_compact_remove
+ * Function: H5G__compact_remove
*
* Purpose: Remove NAME from links.
*
@@ -314,13 +314,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
const char *name)
{
H5G_iter_rm_t udata; /* Data to pass through OH iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_remove, FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(oloc && oloc->file);
HDassert(name && *name);
@@ -337,11 +337,11 @@ H5G_compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, H5RS_str_t *grp_full_pa
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_remove() */
+} /* end H5G__compact_remove() */
/*-------------------------------------------------------------------------
- * Function: H5G_compact_remove_by_idx
+ * Function: H5G__compact_remove_by_idx
*
* Purpose: Remove link from group, according to an index order.
*
@@ -353,7 +353,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
+H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n)
{
@@ -361,7 +361,7 @@ H5G_compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
H5G_iter_rm_t udata; /* Data to pass through OH iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_remove_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(oloc && oloc->file);
HDassert(linfo);
@@ -386,15 +386,15 @@ H5G_compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_remove_by_idx() */
+} /* end H5G__compact_remove_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5G_compact_iterate
+ * Function: H5G__compact_iterate
*
* Purpose: Iterate over the links in a group
*
@@ -406,14 +406,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data)
{
H5G_link_table_t ltable = {0, NULL}; /* Link table */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_iterate, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
@@ -425,16 +425,16 @@ H5G_compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *lin
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table")
/* Iterate over links in table */
- if((ret_value = H5G_link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_iterate() */
+} /* end H5G__compact_iterate() */
/*-------------------------------------------------------------------------
@@ -458,7 +458,7 @@ H5G_compact_lookup_cb(const void *_mesg, unsigned UNUSED idx, void *_udata)
H5G_iter_lkp_t *udata = (H5G_iter_lkp_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_compact_lookup_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(lnk);
@@ -485,7 +485,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_compact_lookup
+ * Function: H5G__compact_lookup
*
* Purpose: Look up an object relative to a group, using link messages.
*
@@ -498,14 +498,14 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5G_compact_lookup(H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
+H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
hid_t dxpl_id)
{
H5G_iter_lkp_t udata; /* User data for iteration callback */
H5O_mesg_operator_t op; /* Message operator */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_lookup, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(lnk && oloc->file);
@@ -527,11 +527,11 @@ H5G_compact_lookup(H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_lookup() */
+} /* end H5G__compact_lookup() */
/*-------------------------------------------------------------------------
- * Function: H5G_compact_lookup_by_idx
+ * Function: H5G__compact_lookup_by_idx
*
* Purpose: Look up an object in a group using link messages,
* according to the order of an index
@@ -545,13 +545,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_compact_lookup_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
{
H5G_link_table_t ltable = {0, NULL};/* Link table */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_lookup_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(oloc && oloc->file);
@@ -572,16 +572,16 @@ H5G_compact_lookup_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *lin
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_lookup_by_idx() */
+} /* end H5G__compact_lookup_by_idx() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
- * Function: H5G_compact_get_type_by_idx
+ * Function: H5G__compact_get_type_by_idx
*
* Purpose: Returns the type of objects in the group by giving index.
*
@@ -594,13 +594,13 @@ done:
*-------------------------------------------------------------------------
*/
H5G_obj_t
-H5G_compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *linfo,
hsize_t idx)
{
H5G_link_table_t ltable = {0, NULL}; /* Link table */
H5G_obj_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_compact_get_type_by_idx, H5G_UNKNOWN)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
@@ -639,10 +639,10 @@ H5G_compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *l
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, H5G_UNKNOWN, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_get_type_by_idx() */
+} /* end H5G__compact_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index 0bb29d5..841b4d3 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -254,7 +254,7 @@ typedef struct {
/*-------------------------------------------------------------------------
- * Function: H5G_dense_create
+ * Function: H5G__dense_create
*
* Purpose: Creates dense link storage structures for a group
*
@@ -267,7 +267,7 @@ typedef struct {
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
+H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
const H5O_pline_t *pline)
{
H5HF_create_t fheap_cparam; /* Fractal heap creation parameters */
@@ -278,7 +278,7 @@ H5G_dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
size_t fheap_id_len; /* Fractal heap ID length */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_create, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -367,11 +367,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_create() */
+} /* end H5G__dense_create() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_insert
+ * Function: H5G__dense_insert
*
* Purpose: Insert a link into the dense link storage structures for a group
*
@@ -384,7 +384,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
const H5O_link_t *lnk)
{
H5G_bt2_ud_ins_t udata; /* User data for v2 B-tree insertion */
@@ -397,7 +397,7 @@ H5G_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
void *link_ptr = NULL; /* Pointer to serialized link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_insert, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -480,7 +480,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_insert() */
+} /* end H5G__dense_insert() */
/*-------------------------------------------------------------------------
@@ -503,7 +503,7 @@ H5G_dense_lookup_cb(const void *_lnk, void *_user_lnk)
H5O_link_t *user_lnk = (H5O_link_t *)_user_lnk; /* User data from v2 B-tree link lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_lookup_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -521,7 +521,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_lookup
+ * Function: H5G__dense_lookup
*
* Purpose: Look up a link within a group that uses dense link storage
*
@@ -534,7 +534,7 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5G_dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
const char *name, H5O_link_t *lnk)
{
H5G_bt2_ud_common_t udata; /* User data for v2 B-tree link lookup */
@@ -542,7 +542,7 @@ H5G_dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_lookup, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -581,7 +581,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_lookup() */
+} /* end H5G__dense_lookup() */
/*-------------------------------------------------------------------------
@@ -605,7 +605,7 @@ H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t UNUSED obj_len, void *_uda
H5O_link_t *tmp_lnk = NULL; /* Temporary pointer to link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_lookup_by_idx_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information & keep a copy */
if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
@@ -645,7 +645,7 @@ H5G_dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_lbi_t fh_udata; /* User data for fractal heap 'op' callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_lookup_by_idx_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Prepare user data for callback */
/* down */
@@ -664,7 +664,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_lookup_by_idx
+ * Function: H5G__dense_lookup_by_idx
*
* Purpose: Look up a link within a group that uses dense link storage,
* according to the order of an index
@@ -678,7 +678,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_link_t *lnk)
{
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -687,7 +687,7 @@ H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_lookup_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -748,7 +748,7 @@ H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G_dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
@@ -766,11 +766,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_lookup_by_idx() */
+} /* end H5G__dense_lookup_by_idx() */
/*-------------------------------------------------------------------------
@@ -794,7 +794,7 @@ H5G_dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
H5G_dense_bt_ud_t *udata = (H5G_dense_bt_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_build_table_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(lnk);
@@ -814,7 +814,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_build_table
+ * Function: H5G__dense_build_table
*
* Purpose: Builds a table containing a sorted list of links for a group
*
@@ -830,12 +830,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_build_table)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -859,11 +859,11 @@ H5G_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
udata.curr_lnk = 0;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5G_dense_iterate(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_dense_build_table_cb, &udata) < 0)
+ if(H5G__dense_iterate(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_dense_build_table_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Sort link table in correct iteration order */
- if(H5G_link_sort_table(ltable, idx_type, order) < 0)
+ if(H5G__link_sort_table(ltable, idx_type, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
} /* end if */
else
@@ -871,7 +871,7 @@ H5G_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_build_table() */
+} /* end H5G__dense_build_table() */
/*-------------------------------------------------------------------------
@@ -894,7 +894,7 @@ H5G_dense_iterate_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata)
H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_iterate_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information & keep a copy */
/* (we make a copy instead of calling the user/library callback directly in
@@ -931,7 +931,7 @@ H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
H5G_bt2_ud_it_t *bt2_udata = (H5G_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_iterate_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for skipping links */
if(bt2_udata->skip > 0)
@@ -970,7 +970,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_iterate
+ * Function: H5G__dense_iterate
*
* Purpose: Iterate over the objects in a group using dense link storage
*
@@ -983,7 +983,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data)
{
@@ -993,7 +993,7 @@ H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_iterate, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1065,11 +1065,11 @@ H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
} /* end if */
else {
/* Build the table of links for this group */
- if(H5G_dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Iterate over links in table */
- if((ret_value = H5G_link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
@@ -1079,11 +1079,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_iterate() */
+} /* end H5G__dense_iterate() */
/*-------------------------------------------------------------------------
@@ -1107,7 +1107,7 @@ H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t UNUSED obj_len, void *_u
H5O_link_t *lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_get_name_by_idx_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
@@ -1152,7 +1152,7 @@ H5G_dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_gnbi_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_get_name_by_idx_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Prepare user data for callback */
/* down */
@@ -1175,7 +1175,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_get_name_by_idx
+ * Function: H5G__dense_get_name_by_idx
*
* Purpose: Returns the name of objects in the group by giving index.
*
@@ -1189,7 +1189,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
+H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name,
size_t size)
{
@@ -1199,7 +1199,7 @@ H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_get_name_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1263,7 +1263,7 @@ H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G_dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
@@ -1287,11 +1287,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_get_name_by_idx() */
+} /* end H5G__dense_get_name_by_idx() */
/*-------------------------------------------------------------------------
@@ -1315,7 +1315,7 @@ H5G_dense_remove_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata)
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_remove_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
@@ -1340,7 +1340,7 @@ H5G_dense_remove_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata)
/* Replace open objects' names, if requested */
if(udata->replace_names)
- if(H5G_link_name_replace(udata->f, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
+ if(H5G__link_name_replace(udata->f, udata->dxpl_id, udata->grp_full_path_r, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects")
/* Perform the deletion action on the link, if requested */
@@ -1380,7 +1380,7 @@ H5G_dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
H5G_fh_ud_rm_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_remove_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set up the user data for fractal heap 'op' callback */
fh_udata.f = bt2_udata->common.f;
@@ -1405,7 +1405,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove
+ * Function: H5G__dense_remove
*
* Purpose: Remove a link from the dense storage of a group
*
@@ -1418,7 +1418,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5RS_str_t *grp_full_path_r, const char *name)
{
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1426,7 +1426,7 @@ H5G_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_remove, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1468,7 +1468,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove() */
+} /* end H5G__dense_remove() */
/*-------------------------------------------------------------------------
@@ -1490,7 +1490,7 @@ H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t UNUSED obj_len, void *_uda
H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_remove_by_idx_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode link information */
if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, udata->dxpl_id, NULL, H5O_LINK_ID, (const unsigned char *)obj)))
@@ -1525,7 +1525,7 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
const uint8_t *heap_id; /* Heap ID for link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_dense_remove_by_idx_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Determine the index being used */
if(bt2_udata->idx_type == H5_INDEX_NAME) {
@@ -1588,7 +1588,7 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
} /* end if */
/* Replace open objects' names */
- if(H5G_link_name_replace(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->grp_full_path_r, fh_udata.lnk) < 0)
+ if(H5G__link_name_replace(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->grp_full_path_r, fh_udata.lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects")
/* Perform the deletion action on the link */
@@ -1613,7 +1613,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove_by_idx
+ * Function: H5G__dense_remove_by_idx
*
* Purpose: Remove a link from the dense storage of a group, according to
* to the offset in an indexed order
@@ -1627,7 +1627,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5RS_str_t *grp_full_path_r, H5_index_t idx_type, H5_iter_order_t order,
hsize_t n)
{
@@ -1637,7 +1637,7 @@ H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
haddr_t bt2_addr; /* Address of v2 B-tree to use for lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_remove_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1699,7 +1699,7 @@ H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
/* Build the table of links for this group */
- if(H5G_dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
+ if(H5G__dense_build_table(f, dxpl_id, linfo, idx_type, order, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links")
/* Check for going out of bounds */
@@ -1707,7 +1707,7 @@ H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Remove the appropriate link from the dense storage */
- if(H5G_dense_remove(f, dxpl_id, linfo, grp_full_path_r, ltable.lnks[n].name) < 0)
+ if(H5G__dense_remove(f, dxpl_id, linfo, grp_full_path_r, ltable.lnks[n].name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from dense storage")
} /* end else */
@@ -1717,15 +1717,15 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for index")
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove_by_idx() */
+} /* end H5G__dense_remove_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_delete
+ * Function: H5G__dense_delete
*
* Purpose: Delete the dense storage for a group
*
@@ -1738,11 +1738,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
+H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_delete, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1808,12 +1808,12 @@ H5G_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_delete() */
+} /* end H5G__dense_delete() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
- * Function: H5G_dense_get_type_by_idx
+ * Function: H5G__dense_get_type_by_idx
*
* Purpose: Returns the type of objects in the group by giving index.
*
@@ -1833,13 +1833,13 @@ done:
*-------------------------------------------------------------------------
*/
H5G_obj_t
-H5G_dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
+H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
hsize_t idx)
{
H5G_link_table_t ltable = {0, NULL}; /* Table of links */
H5G_obj_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_dense_get_type_by_idx, H5G_UNKNOWN)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1848,7 +1848,7 @@ H5G_dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
HDassert(linfo);
/* Build the table of links for this group */
- if(H5G_dense_build_table(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
+ if(H5G__dense_build_table(f, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_INC, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "error building table of links")
/* Check for going out of bounds */
@@ -1881,10 +1881,10 @@ H5G_dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
done:
/* Release link table */
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, H5G_UNKNOWN, "unable to release link table")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_get_type_by_idx() */
+} /* end H5G__dense_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 1815691..9473011 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -116,15 +116,15 @@ RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
Initializes any interface-specific data or routines. (Just calls
- H5G_init() currently).
+ H5G__init() currently).
--------------------------------------------------------------------------*/
static herr_t
H5G_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI(H5G_init())
+ FUNC_LEAVE_NOAPI(H5G__init())
} /* H5G_init_deprec_interface() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -146,8 +146,8 @@ H5G_map_obj_type(H5O_type_t obj_type)
{
H5G_obj_t ret_value; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_map_obj_type)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Map object type to older "group" object type */
switch(obj_type) {
@@ -206,7 +206,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
hid_t tmp_gcpl = (-1); /* Temporary group creation property list */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Gcreate1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*sz", loc_id, name, size_hint);
/* Check arguments */
@@ -245,7 +245,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
tmp_gcpl = H5P_GROUP_CREATE_DEFAULT;
/* Create the new group & get its ID */
- if(NULL == (grp = H5G_create_named(&loc, name, H5P_LINK_CREATE_DEFAULT,
+ if(NULL == (grp = H5G__create_named(&loc, name, H5P_LINK_CREATE_DEFAULT,
tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
@@ -288,7 +288,7 @@ H5Gopen1(hid_t loc_id, const char *name)
H5G_loc_t loc; /* Location of parent for group */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Gopen1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
@@ -298,7 +298,7 @@ H5Gopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the group */
- if((grp = H5G_open_name(&loc, name, H5P_DEFAULT, H5AC_dxpl_id)) == NULL)
+ if((grp = H5G__open_name(&loc, name, H5P_DEFAULT, H5AC_dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an atom for the group */
@@ -328,7 +328,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Glink, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iLl*s*s", cur_loc_id, type, cur_name, new_name);
/* Check arguments */
@@ -374,7 +374,7 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Glink2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*sLli*s", cur_loc_id, cur_name, type, new_loc_id, new_name);
/* Check arguments */
@@ -435,7 +435,7 @@ H5G_link_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id,
H5G_loc_t new_loc, *new_loc_p; /* Information about new link's group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_link_hard)
+ FUNC_ENTER_NOAPI_NOINIT
/* Finish checking arguments */
if(cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC)
@@ -477,7 +477,7 @@ H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gmove, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", src_loc_id, src_name, dst_name);
/* Call common routine to move the link */
@@ -502,7 +502,7 @@ H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gmove2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*si*s", src_loc_id, src_name, dst_loc_id, dst_name);
/* Call common routine to move the link */
@@ -539,7 +539,7 @@ H5G_move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_t dst_loc, *dst_loc_p; /* Group info for destination location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_move)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC)
@@ -584,7 +584,7 @@ H5Gunlink(hid_t loc_id, const char *name)
H5G_loc_t loc; /* Group's location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gunlink, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* Check arguments */
@@ -616,7 +616,7 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/)
H5G_loc_t loc; /* Group's location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_linkval, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*szx", loc_id, name, size, buf);
/* Check arguments */
@@ -657,7 +657,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
H5G_loc_t loc;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gset_comment, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*s", loc_id, name, comment);
if(H5G_loc(loc_id, &loc) < 0)
@@ -702,7 +702,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
H5G_loc_t loc;
int ret_value;
- FUNC_ENTER_API(H5Gget_comment, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Is", "i*sz*s", loc_id, name, bufsize, buf);
if(H5G_loc(loc_id, &loc) < 0)
@@ -756,7 +756,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
hsize_t idx; /* Internal location to hold index */
herr_t ret_value;
- FUNC_ENTER_API(H5Giterate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*s*Isx*x", loc_id, name, idx_p, op, op_data);
/* Check args */
@@ -812,7 +812,7 @@ H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
H5O_type_t obj_type; /* Type of object at location */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Gget_num_objs, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", loc_id, num_objs);
/* Check args */
@@ -826,7 +826,7 @@ H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
/* Retrieve information about the group */
- if(H5G_obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
/* Set the number of objects [sic: links] in the group */
@@ -861,7 +861,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
H5G_loc_t loc;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Gget_objinfo, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sbx", loc_id, name, follow_link, statbuf);
/* Check arguments */
@@ -899,7 +899,7 @@ H5G_get_objinfo_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_
H5G_trav_goi_t *udata = (H5G_trav_goi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_get_objinfo_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(lnk == NULL && obj_loc == NULL)
@@ -981,7 +981,7 @@ H5G_get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
H5G_trav_goi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_get_objinfo)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(loc);
HDassert(name && *name);
@@ -1058,7 +1058,7 @@ H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size)
H5O_type_t obj_type; /* Type of object at location */
ssize_t ret_value;
- FUNC_ENTER_API(H5Gget_objname_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Zs", "ih*sz", loc_id, idx, name, size);
/* Check args */
@@ -1100,7 +1100,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
H5O_type_t obj_type; /* Type of object at location */
H5G_obj_t ret_value;
- FUNC_ENTER_API(H5Gget_objtype_by_idx, H5G_UNKNOWN)
+ FUNC_ENTER_API(H5G_UNKNOWN)
H5TRACE2("Go", "ih", loc_id, idx);
/* Check args */
@@ -1142,29 +1142,29 @@ H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
htri_t linfo_exists; /* Whether the link info message exists */
H5G_obj_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_get_type_by_idx, dxpl_id, oloc->addr, H5G_UNKNOWN)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oloc->addr, H5G_UNKNOWN)
/* Sanity check */
HDassert(oloc);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't check for link info message")
if(linfo_exists) {
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's name from the dense link storage */
- if((ret_value = H5G_dense_get_type_by_idx(oloc->file, dxpl_id, &linfo, idx)) < 0)
+ if((ret_value = H5G__dense_get_type_by_idx(oloc->file, dxpl_id, &linfo, idx)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end if */
else {
/* Get the object's type from the link messages */
- if((ret_value = H5G_compact_get_type_by_idx(oloc, dxpl_id, &linfo, idx)) < 0)
+ if((ret_value = H5G__compact_get_type_by_idx(oloc, dxpl_id, &linfo, idx)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end else */
} /* end if */
else {
/* Get the object's type from the symbol table */
- if((ret_value = H5G_stab_get_type_by_idx(oloc, idx, dxpl_id)) < 0)
+ if((ret_value = H5G__stab_get_type_by_idx(oloc, idx, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end else */
diff --git a/src/H5Gent.c b/src/H5Gent.c
index cec788c..17893fa 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -17,28 +17,66 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Friday, September 19, 1997
*/
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Gpkg.h" /* Groups */
#include "H5HLprivate.h" /* Local Heaps */
-/* Private macros */
-/* Private prototypes */
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
/* Declare extern the PQ free list for the wrapped strings */
H5FL_BLK_EXTERN(str_buf);
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
/*-------------------------------------------------------------------------
- * Function: H5G_ent_decode_vec
+ * Function: H5G__ent_decode_vec
*
* Purpose: Same as H5G_ent_decode() except it does it for an array of
* symbol table entries.
@@ -55,12 +93,12 @@ H5FL_BLK_EXTERN(str_buf);
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_decode_vec(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, unsigned n)
+H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, unsigned n)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_decode_vec, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -74,7 +112,7 @@ H5G_ent_decode_vec(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, unsigne
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_ent_decode_vec() */
+} /* end H5G__ent_decode_vec() */
/*-------------------------------------------------------------------------
@@ -100,7 +138,7 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
uint32_t tmp;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_decode, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -143,7 +181,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_ent_encode_vec
+ * Function: H5G__ent_encode_vec
*
* Purpose: Same as H5G_ent_encode() except it does it for an array of
* symbol table entries.
@@ -160,12 +198,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsigned n)
+H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsigned n)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_encode_vec, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -179,7 +217,7 @@ H5G_ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsigne
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_ent_encode_vec() */
+} /* H5G__ent_encode_vec() */
/*-------------------------------------------------------------------------
@@ -205,7 +243,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_encode, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -249,7 +287,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
/* fill with zero */
if(*pp < p_ret)
- HDmemset(*pp, 0, (p_ret - *pp));
+ HDmemset(*pp, 0, (size_t)(p_ret - *pp));
*pp = p_ret;
done:
@@ -258,7 +296,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_ent_copy
+ * Function: H5G__ent_copy
*
* Purpose: Do a deep copy of symbol table entries
*
@@ -281,10 +319,10 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
+void
+H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_copy)
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(src);
@@ -300,15 +338,15 @@ H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
;
} else if(depth == H5_COPY_SHALLOW) {
/* Discarding 'const' qualifier OK - QAK */
- H5G_ent_reset((H5G_entry_t *)src);
+ H5G__ent_reset((H5G_entry_t *)src);
} /* end if */
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_ent_copy() */
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5G__ent_copy() */
/*-------------------------------------------------------------------------
- * Function: H5G_ent_reset
+ * Function: H5G__ent_reset
*
* Purpose: Reset a symbol table entry to an empty state
*
@@ -320,10 +358,10 @@ H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5G_ent_reset(H5G_entry_t *ent)
+void
+H5G__ent_reset(H5G_entry_t *ent)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_reset)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(ent);
@@ -332,12 +370,12 @@ H5G_ent_reset(H5G_entry_t *ent)
HDmemset(ent, 0, sizeof(H5G_entry_t));
ent->header = HADDR_UNDEF;
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_ent_reset() */
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5G__ent_reset() */
/*-------------------------------------------------------------------------
- * Function: H5G_ent_convert
+ * Function: H5G__ent_convert
*
* Purpose: Convert a link to a symbol table entry
*
@@ -351,14 +389,14 @@ H5G_ent_reset(H5G_entry_t *ent)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
+H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
const H5O_link_t *lnk, H5O_type_t obj_type, const void *crt_info,
H5G_entry_t *ent)
{
size_t name_offset; /* Offset of name in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_convert, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -367,7 +405,7 @@ H5G_ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
HDassert(lnk);
/* Reset the new entry */
- H5G_ent_reset(ent);
+ H5G__ent_reset(ent);
/*
* Add the new name to the heap.
@@ -485,11 +523,11 @@ H5G_ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, const char *name,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_ent_convert() */
+} /* end H5G__ent_convert() */
/*-------------------------------------------------------------------------
- * Function: H5G_ent_debug
+ * Function: H5G__ent_debug
*
* Purpose: Prints debugging information about a symbol table entry.
*
@@ -502,13 +540,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
+H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
const H5HL_t *heap)
{
const char *lval = NULL;
int nested_indent, nested_fwidth;
- FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_debug)
+ FUNC_ENTER_PACKAGE_NOERR
/* Calculate the indent & field width values for nested information */
nested_indent = indent + 3;
@@ -565,5 +603,5 @@ H5G_ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth,
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_ent_debug() */
+} /* end H5G__ent_debug() */
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 0dc9c03..ad2e57e 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -39,7 +39,10 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5FOprivate.h" /* File objects */
#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Lprivate.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
@@ -52,6 +55,34 @@
/* Local Typedefs */
/******************/
+/* User data for path traversal routine for "insertion file" routine */
+typedef struct {
+ H5G_loc_t *loc; /* Pointer to the location for insertion */
+} H5G_trav_ins_t;
+
+/* User data for application-style iteration over links in a group */
+typedef struct {
+ hid_t gid; /* The group ID for the application callback */
+ H5G_link_iterate_t lnk_op; /* Application callback */
+ void *op_data; /* Application's op data */
+} H5G_iter_appcall_ud_t;
+
+/* User data for recursive traversal over links from a group */
+typedef struct {
+ hid_t gid; /* The group ID for the starting group */
+ H5G_loc_t *curr_loc; /* Location of starting group */
+ hid_t lapl_id; /* LAPL for walking across links */
+ hid_t dxpl_id; /* DXPL for operations */
+ H5_index_t idx_type; /* Index to use */
+ H5_iter_order_t order; /* Iteration order within index */
+ H5SL_t *visited; /* Skip list for tracking visited nodes */
+ char *path; /* Path name of the link */
+ size_t curr_path_len; /* Current length of the path in the buffer */
+ size_t path_buf_size; /* Size of path buffer */
+ H5L_iterate_t op; /* Application callback */
+ void *op_data; /* Application's op data */
+} H5G_iter_visit_ud_t;
+
/********************/
/* Package Typedefs */
@@ -62,11 +93,20 @@
/* Local Prototypes */
/********************/
+static herr_t H5G_open_oid(H5G_t *grp, hid_t dxpl_id);
+
/*********************/
/* Package Variables */
/*********************/
+/* Declare a free list to manage the H5G_t struct */
+H5FL_DEFINE(H5G_t);
+H5FL_DEFINE(H5G_shared_t);
+
+/* Declare the free list to manage H5_obj_t's */
+H5FL_DEFINE(H5_obj_t);
+
/*****************************/
/* Library Private Variables */
@@ -88,7 +128,7 @@ RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
Initializes any interface-specific data or routines. (Just calls
- H5G_init() currently).
+ H5G__init() currently).
--------------------------------------------------------------------------*/
static herr_t
@@ -96,10 +136,10 @@ H5G_init_int_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_init_int_interface, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
- /* Funnel all work to H5G_init() */
- if(H5G_init() < 0)
+ /* Funnel all work to H5G__init() */
+ if(H5G__init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "interface initialization failed")
done:
@@ -108,16 +148,71 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_component
+ * Function: H5G__create_named
+ *
+ * Purpose: Internal routine to create a new "named" group.
+ *
+ * Return: Success: Non-NULL, pointer to new group object.
+ *
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * April 5, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+H5G_t *
+H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id,
+ hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id)
+{
+ H5O_obj_create_t ocrt_info; /* Information for object creation */
+ H5G_obj_create_t gcrt_info; /* Information for group creation */
+ H5G_t *ret_value; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check arguments */
+ HDassert(loc);
+ HDassert(name && *name);
+ HDassert(lcpl_id != H5P_DEFAULT);
+ HDassert(gcpl_id != H5P_DEFAULT);
+ HDassert(gapl_id != H5P_DEFAULT);
+ HDassert(dxpl_id != H5P_DEFAULT);
+
+ /* Set up group creation info */
+ gcrt_info.gcpl_id = gcpl_id;
+ gcrt_info.cache_type = H5G_NOTHING_CACHED;
+ HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
+
+ /* Set up object creation information */
+ ocrt_info.obj_type = H5O_TYPE_GROUP;
+ ocrt_info.crt_info = &gcrt_info;
+ ocrt_info.new_obj = NULL;
+
+ /* Create the new group and link it to its parent group */
+ if(H5L_link_object(loc, name, &ocrt_info, lcpl_id, gapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
+ HDassert(ocrt_info.new_obj);
+
+ /* Set the return value */
+ ret_value = (H5G_t *)ocrt_info.new_obj;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G__create_named() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G__create
*
- * Purpose: Returns the pointer to the first component of the
- * specified name by skipping leading slashes. Returns
- * the size in characters of the component through SIZE_P not
- * counting leading slashes or the null terminator.
+ * Purpose: Creates a new empty group with the specified name. The name
+ * is either an absolute name or is relative to LOC.
*
- * Return: Success: Ptr into NAME.
+ * Return: Success: A handle for the group. The group is opened
+ * and should eventually be close by calling
+ * H5G_close().
*
- * Failure: Ptr to the null terminator of NAME.
+ * Failure: NULL
*
* Programmer: Robb Matzke
* matzke@llnl.gov
@@ -125,83 +220,974 @@ done:
*
*-------------------------------------------------------------------------
*/
-const char *
-H5G_component(const char *name, size_t *size_p)
+H5G_t *
+H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_component)
+ H5G_t *grp = NULL; /*new group */
+ unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */
+ H5G_t *ret_value; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* check args */
+ HDassert(file);
+ HDassert(gcrt_info->gcpl_id != H5P_DEFAULT);
+ HDassert(dxpl_id != H5P_DEFAULT);
+
+ /* create an open group */
+ if(NULL == (grp = H5FL_CALLOC(H5G_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+
+ /* Create the group object header */
+ if(H5G__obj_create(file, dxpl_id, gcrt_info, &(grp->oloc)/*out*/) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header")
+ oloc_init = 1; /* Indicate that the object location information is valid */
+
+ /* Add group to list of open objects in file */
+ if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count")
+ if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
- assert(name);
+ /* Set the count of times the object is opened */
+ grp->shared->fo_count = 1;
- while ('/' == *name)
- name++;
- if (size_p)
- *size_p = HDstrcspn(name, "/");
+ /* Set return value */
+ ret_value = grp;
+
+done:
+ if(ret_value == NULL) {
+ /* Check if we need to release the file-oriented symbol table info */
+ if(oloc_init) {
+ if(H5O_dec_rc_by_loc(&(grp->oloc), dxpl_id) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTDEC, NULL, "unable to decrement refcount on newly created object")
+ if(H5O_close(&(grp->oloc)) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, NULL, "unable to release object header")
+ if(H5O_delete(file, dxpl_id, grp->oloc.addr) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTDELETE, NULL, "unable to delete object header")
+ } /* end if */
+ if(grp != NULL) {
+ if(grp->shared != NULL)
+ grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
+ grp = H5FL_FREE(H5G_t, grp);
+ } /* end if */
+ } /* end if */
- FUNC_LEAVE_NOAPI(name)
-} /* end H5G_component() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G__create() */
/*-------------------------------------------------------------------------
- * Function: H5G_normalize
+ * Function: H5G__open_name
*
- * Purpose: Returns a pointer to a new string which has duplicate and
- * trailing slashes removed from it.
+ * Purpose: Opens an existing group by name.
*
- * Return: Success: Ptr to normalized name.
+ * Return: Success: Ptr to a new group.
* Failure: NULL
*
* Programmer: Quincey Koziol
- * Saturday, August 16, 2003
+ * Monday, August 27, 2007
*
*-------------------------------------------------------------------------
*/
-char *
-H5G_normalize(const char *name)
+H5G_t *
+H5G__open_name(const H5G_loc_t *loc, const char *name, hid_t gapl_id,
+ hid_t dxpl_id)
{
- char *norm; /* Pointer to the normalized string */
- size_t s,d; /* Positions within the strings */
- unsigned last_slash; /* Flag to indicate last character was a slash */
- char *ret_value; /* Return value */
+ H5G_t *grp = NULL; /* Group to open */
+ H5G_loc_t grp_loc; /* Location used to open group */
+ H5G_name_t grp_path; /* Opened object group hier. path */
+ H5O_loc_t grp_oloc; /* Opened object object location */
+ hbool_t loc_found = FALSE; /* Location at 'name' found */
+ H5O_type_t obj_type; /* Type of object at location */
+ H5G_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_normalize)
+ FUNC_ENTER_PACKAGE
- /* Sanity check */
+ /* Check args */
+ HDassert(loc);
HDassert(name);
- /* Duplicate the name, to return */
- if(NULL == (norm = H5MM_strdup(name)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string")
-
- /* Walk through the characters, omitting duplicated '/'s */
- s = d = 0;
- last_slash = 0;
- while(name[s] != '\0') {
- if(name[s] == '/')
- if(last_slash)
- ;
- else {
- norm[d++] = name[s];
- last_slash = 1;
- } /* end else */
- else {
- norm[d++] = name[s];
- last_slash = 0;
- } /* end else */
- s++;
- } /* end while */
-
- /* Terminate normalized string */
- norm[d] = '\0';
-
- /* Check for final '/' on normalized name & eliminate it */
- if(d > 1 && last_slash)
- norm[d - 1] = '\0';
+ /* Set up opened group location to fill in */
+ grp_loc.oloc = &grp_oloc;
+ grp_loc.path = &grp_path;
+ H5G_loc_reset(&grp_loc);
+
+ /* Find the group object using the gapl passed in */
+ if(H5G_loc_find(loc, name, &grp_loc/*out*/, gapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found")
+ loc_found = TRUE;
+
+ /* Check that the object found is the correct type */
+ if(H5O_obj_type(&grp_oloc, &obj_type, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type")
+ if(obj_type != H5O_TYPE_GROUP)
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group")
+
+ /* Open the group */
+ if((grp = H5G_open(&grp_loc, dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group")
+
+ /* Set return value */
+ ret_value = grp;
+
+done:
+ if(!ret_value) {
+ if(loc_found && H5G_loc_free(&grp_loc) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, NULL, "can't free location")
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G__open_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_open
+ *
+ * Purpose: Opens an existing group. The group should eventually be
+ * closed by calling H5G_close().
+ *
+ * Return: Success: Ptr to a new group.
+ *
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+H5G_t *
+H5G_open(const H5G_loc_t *loc, hid_t dxpl_id)
+{
+ H5G_t *grp = NULL; /* Group opened */
+ H5G_shared_t *shared_fo; /* Shared group object */
+ H5G_t *ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* Check args */
+ HDassert(loc);
+
+ /* Allocate the group structure */
+ if(NULL == (grp = H5FL_CALLOC(H5G_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group")
+
+ /* Shallow copy (take ownership) of the group location object */
+ if(H5O_loc_copy(&(grp->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location")
+ if(H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path")
+
+ /* Check if group was already open */
+ if((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) {
+
+ /* Clear any errors from H5FO_opened() */
+ H5E_clear_stack(NULL);
+
+ /* Open the group object */
+ if(H5G_open_oid(grp, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found")
+
+ /* Add group to list of open objects in file */
+ if(H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
+ grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
+ } /* end if */
+
+ /* Increment object count for the object in the top file */
+ if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
+
+ /* Set open object count */
+ grp->shared->fo_count = 1;
+ } /* end if */
+ else {
+ /* Point to shared group info */
+ grp->shared = shared_fo;
+
+ /* Increment shared reference count */
+ shared_fo->fo_count++;
+
+ /* Check if the object has been opened through the top file yet */
+ if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
+ /* Open the object through this top file */
+ if(H5O_open(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header")
+ } /* end if */
+
+ /* Increment object count for the object in the top file */
+ if(H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
+ } /* end else */
/* Set return value */
- ret_value = norm;
+ ret_value = grp;
done:
+ if(!ret_value && grp) {
+ H5O_loc_free(&(grp->oloc));
+ H5G_name_free(&(grp->path));
+ grp = H5FL_FREE(H5G_t, grp);
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_open() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_open_oid
+ *
+ * Purpose: Opens an existing group. The group should eventually be
+ * closed by calling H5G_close().
+ *
+ * Return: Success: Ptr to a new group.
+ *
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, March 17, 1999
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5G_open_oid(H5G_t *grp, hid_t dxpl_id)
+{
+ hbool_t obj_opened = FALSE;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Check args */
+ HDassert(grp);
+
+ /* Allocate the shared information for the group */
+ if(NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+
+ /* Grab the object header */
+ if(H5O_open(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ obj_opened = TRUE;
+
+ /* Check if this object has the right message(s) to be treated as a group */
+ if((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID, dxpl_id) <= 0)
+ && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID, dxpl_id) <= 0))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group")
+
+done:
+ if(ret_value < 0) {
+ if(obj_opened)
+ H5O_close(&(grp->oloc));
+ if(grp->shared)
+ grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_open_oid() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_close
+ *
+ * Purpose: Closes the specified group.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Robb Matzke
+ * Monday, January 5, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_close(H5G_t *grp)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check args */
+ HDassert(grp && grp->shared);
+ HDassert(grp->shared->fo_count > 0);
+
+ --grp->shared->fo_count;
+
+ if(0 == grp->shared->fo_count) {
+ HDassert(grp != H5G_rootof(H5G_fileof(grp)));
+
+ /* Remove the group from the list of opened objects in the file */
+ if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
+ if(H5FO_delete(grp->oloc.file, H5AC_dxpl_id, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects")
+ if(H5O_close(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+ grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
+ } else {
+ /* Decrement the ref. count for this object in the top file */
+ if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
+
+ /* Check reference count for this object in the top file */
+ if(H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
+ if(H5O_close(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+ } /* end if */
+ else
+ /* Free object location (i.e. "unhold" the file if appropriate) */
+ if(H5O_loc_free(&(grp->oloc)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
+
+ /* If this group is a mount point and the mount point is the last open
+ * reference to the group, then attempt to close down the file hierarchy
+ */
+ if(grp->shared->mounted && grp->shared->fo_count == 1) {
+ /* Attempt to close down the file hierarchy */
+ if(H5F_try_close(grp->oloc.file) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
+ } /* end if */
+ } /* end else */
+
+ if(H5G_name_free(&(grp->path)) < 0) {
+ grp = H5FL_FREE(H5G_t, grp);
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name")
+ } /* end if */
+
+ grp = H5FL_FREE(H5G_t, grp);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_close() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_oloc
+ *
+ * Purpose: Returns a pointer to the object location for a group.
+ *
+ * Return: Success: Ptr to group entry
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, March 24, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+H5O_loc_t *
+H5G_oloc(H5G_t *grp)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ FUNC_LEAVE_NOAPI(grp ? &(grp->oloc) : NULL)
+} /* end H5G_oloc() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_nameof
+ *
+ * Purpose: Returns a pointer to the hier. name for a group.
+ *
+ * Return: Success: Ptr to hier. name
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * Monday, September 12, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+H5G_name_t *
+H5G_nameof(H5G_t *grp)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ FUNC_LEAVE_NOAPI(grp ? &(grp->path) : NULL)
+} /* end H5G_nameof() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_fileof
+ *
+ * Purpose: Returns the file to which the specified group belongs.
+ *
+ * Return: Success: File pointer.
+ *
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, March 24, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+H5F_t *
+H5G_fileof(H5G_t *grp)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(grp);
+
+ FUNC_LEAVE_NOAPI(grp->oloc.file)
+} /* end H5G_fileof() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_get_shared_count
+ *
+ * Purpose: Queries the group object's "shared count"
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 5, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_get_shared_count(H5G_t *grp)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check args */
+ HDassert(grp && grp->shared);
+
+ FUNC_LEAVE_NOAPI(grp->shared->fo_count)
+} /* end H5G_get_shared_count() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_mount
+ *
+ * Purpose: Sets the 'mounted' flag for a group
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 19, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_mount(H5G_t *grp)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check args */
+ HDassert(grp && grp->shared);
+ HDassert(grp->shared->mounted == FALSE);
+
+ /* Set the 'mounted' flag */
+ grp->shared->mounted = TRUE;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5G_mount() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_mounted
+ *
+ * Purpose: Retrieves the 'mounted' flag for a group
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 15, 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5G_mounted(H5G_t *grp)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check args */
+ HDassert(grp && grp->shared);
+
+ FUNC_LEAVE_NOAPI(grp->shared->mounted)
+} /* end H5G_mounted() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_unmount
+ *
+ * Purpose: Resets the 'mounted' flag for a group
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 19, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_unmount(H5G_t *grp)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Check args */
+ HDassert(grp && grp->shared);
+ HDassert(grp->shared->mounted == TRUE);
+
+ /* Reset the 'mounted' flag */
+ grp->shared->mounted = FALSE;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5G_unmount() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_iterate_cb
+ *
+ * Purpose: Callback function for iterating over links in a group
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Oct 3, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
+{
+ H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
+ herr_t ret_value = H5_ITER_ERROR; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Sanity check */
+ HDassert(lnk);
+ HDassert(udata);
+
+ switch(udata->lnk_op.op_type) {
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ case H5G_LINK_OP_OLD:
+ /* Make the old-type application callback */
+ ret_value = (udata->lnk_op.op_func.op_old)(udata->gid, lnk->name, udata->op_data);
+ break;
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ case H5G_LINK_OP_NEW:
+ {
+ H5L_info_t info; /* Link info */
+
+ /* Retrieve the info for the link */
+ if(H5G_link_to_info(lnk, &info) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
+
+ /* Make the application callback */
+ ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data);
+ }
+ break;
+
+ default:
+ HDassert(0 && "Unknown link op type?!?");
+ } /* end switch */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_iterate_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_iterate
+ *
+ * Purpose: Private function for iterating over links in a group
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Oct 3, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_iterate(hid_t loc_id, const char *group_name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
+ const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id)
+{
+ H5G_loc_t loc; /* Location of parent for group */
+ hid_t gid = -1; /* ID of group to iterate over */
+ H5G_t *grp = NULL; /* Pointer to group data structure to iterate over */
+ H5G_iter_appcall_ud_t udata; /* User data for callback */
+ herr_t ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity check */
+ HDassert(group_name);
+ HDassert(last_lnk);
+ HDassert(lnk_op && lnk_op->op_func.op_new);
+
+ /*
+ * Open the group on which to operate. We also create a group ID which
+ * we can pass to the application-defined operator.
+ */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(NULL == (grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+
+ /* Set up user data for callback */
+ udata.gid = gid;
+ udata.lnk_op = *lnk_op;
+ udata.op_data = op_data;
+
+ /* Call the real group iteration routine */
+ if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G_iterate_cb, &udata, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links")
+
+done:
+ /* Release the group opened */
+ if(gid > 0) {
+ if(H5I_dec_app_ref(gid) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
+ } /* end if */
+ else if(grp && H5G_close(grp) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_iterate() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_free_visit_visited
+ *
+ * Purpose: Free the key for an object visited during a group traversal
+ *
+ * Return: Non-negative on success, negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Nov 4, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5G_free_visit_visited(void *item, void UNUSED *key, void UNUSED *operator_data/*in,out*/)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ item = H5FL_FREE(H5_obj_t, item);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5G_free_visit_visited() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_visit_cb
+ *
+ * Purpose: Callback function for recursively visiting links from a group
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Nov 4, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
+{
+ H5G_iter_visit_ud_t *udata = (H5G_iter_visit_ud_t *)_udata; /* User data for callback */
+ H5L_info_t info; /* Link info */
+ H5G_loc_t obj_loc; /* Location of object */
+ H5G_name_t obj_path; /* Object's group hier. path */
+ H5O_loc_t obj_oloc; /* Object's object location */
+ hbool_t obj_found = FALSE; /* Object at 'name' found */
+ size_t old_path_len = udata->curr_path_len; /* Length of path before appending this link's name */
+ size_t link_name_len; /* Length of link's name */
+ size_t len_needed; /* Length of path string needed */
+ herr_t ret_value = H5_ITER_CONT; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Sanity check */
+ HDassert(lnk);
+ HDassert(udata);
+
+ /* Check if we will need more space to store this link's relative path */
+ /* ("+2" is for string terminator and possible '/' for group separator later) */
+ link_name_len = HDstrlen(lnk->name);
+ len_needed = udata->curr_path_len + link_name_len + 2;
+ if(len_needed > udata->path_buf_size) {
+ void *new_path; /* Pointer to new path buffer */
+
+ /* Attempt to allocate larger buffer for path */
+ if(NULL == (new_path = H5MM_realloc(udata->path, len_needed)))
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string")
+ udata->path = (char *)new_path;
+ udata->path_buf_size = len_needed;
+ } /* end if */
+
+ /* Build the link's relative path name */
+ HDassert(udata->path[old_path_len] == '\0');
+ HDstrcpy(&(udata->path[old_path_len]), lnk->name);
+ udata->curr_path_len += link_name_len;
+
+ /* Construct the link info from the link message */
+ if(H5G_link_to_info(lnk, &info) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
+
+ /* Make the application callback */
+ ret_value = (udata->op)(udata->gid, udata->path, &info, udata->op_data);
+
+ /* Check for doing more work */
+ if(ret_value == H5_ITER_CONT && lnk->type == H5L_TYPE_HARD) {
+ H5_obj_t obj_pos; /* Object "position" for this object */
+
+ /* Set up opened group location to fill in */
+ obj_loc.oloc = &obj_oloc;
+ obj_loc.path = &obj_path;
+ H5G_loc_reset(&obj_loc);
+
+ /* Find the object using the LAPL passed in */
+ /* (Correctly handles mounted files) */
+ if(H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
+ obj_found = TRUE;
+
+ /* Construct unique "position" for this object */
+ H5F_GET_FILENO(obj_oloc.file, obj_pos.fileno);
+ obj_pos.addr = obj_oloc.addr;
+
+ /* Check if we've seen the object the link references before */
+ if(NULL == H5SL_search(udata->visited, &obj_pos)) {
+ H5O_type_t otype; /* Basic object type (group, dataset, etc.) */
+ unsigned rc; /* Reference count of object */
+
+ /* Get the object's reference count and type */
+ if(H5O_get_rc_and_type(&obj_oloc, udata->dxpl_id, &rc, &otype) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
+
+ /* If its ref count is > 1, we add it to the list of visited objects */
+ /* (because it could come up again during traversal) */
+ if(rc > 1) {
+ H5_obj_t *new_node; /* New object node for visited list */
+
+ /* Allocate new object "position" node */
+ if((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node")
+
+ /* Set node information */
+ *new_node = obj_pos;
+
+ /* Add to list of visited objects */
+ if(H5SL_insert(udata->visited, new_node, new_node) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert object node into visited list")
+ } /* end if */
+
+ /* If it's a group, we recurse into it */
+ if(otype == H5O_TYPE_GROUP) {
+ H5G_loc_t *old_loc = udata->curr_loc; /* Pointer to previous group location info */
+ H5_index_t idx_type = udata->idx_type; /* Type of index to use */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+
+ /* Add the path separator to the current path */
+ HDassert(udata->path[udata->curr_path_len] == '\0');
+ HDstrcpy(&(udata->path[udata->curr_path_len]), "/");
+ udata->curr_path_len++;
+
+ /* Attempt to get the link info for this group */
+ if((linfo_exists = H5G__obj_get_linfo(&obj_oloc, &linfo, udata->dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message")
+ if(linfo_exists) {
+ /* Check for creation order tracking, if creation order index lookup requested */
+ if(idx_type == H5_INDEX_CRT_ORDER) {
+ /* Check if creation order is tracked */
+ if(!linfo.track_corder)
+ /* Switch to name order for this group */
+ idx_type = H5_INDEX_NAME;
+ } /* end if */
+ else
+ HDassert(idx_type == H5_INDEX_NAME);
+ } /* end if */
+ else {
+ /* Can only perform name lookups on groups with symbol tables */
+ if(idx_type != H5_INDEX_NAME)
+ /* Switch to name order for this group */
+ idx_type = H5_INDEX_NAME;
+ } /* end if */
+
+ /* Point to this group's location info */
+ udata->curr_loc = &obj_loc;
+
+ /* Iterate over links in group */
+ ret_value = H5G__obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL, H5G_visit_cb, udata, udata->dxpl_id);
+
+ /* Restore location */
+ udata->curr_loc = old_loc;
+ } /* end if */
+ } /* end if */
+ } /* end if */
+
+done:
+ /* Reset path back to incoming path */
+ udata->path[old_path_len] = '\0';
+ udata->curr_path_len = old_path_len;
+
+ /* Release resources */
+ if(obj_found && H5G_loc_free(&obj_loc) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_visit_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_visit
+ *
+ * Purpose: Recursively visit all the links in a group and all
+ * the groups that are linked to from that group. Links within
+ * each group are visited according to the order within the
+ * specified index (unless the specified index does not exist for
+ * a particular group, then the "name" index is used).
+ *
+ * NOTE: Each _link_ reachable from the initial group will only be
+ * visited once. However, because an object may be reached from
+ * more than one link, the visitation may call the application's
+ * callback with more than one link that points to a particular
+ * _object_.
+ *
+ * Return: Success: The return value of the first operator that
+ * returns non-zero, or zero if all members were
+ * processed with no operator returning non-zero.
+ *
+ * Failure: Negative if something goes wrong within the
+ * library, or the negative value returned by one
+ * of the operators.
+ *
+ *
+ *
+ * Programmer: Quincey Koziol
+ * November 4 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5G_visit(hid_t loc_id, const char *group_name, H5_index_t idx_type,
+ H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id,
+ hid_t dxpl_id)
+{
+ H5G_iter_visit_ud_t udata; /* User data for callback */
+ H5O_linfo_t linfo; /* Link info message */
+ htri_t linfo_exists; /* Whether the link info message exists */
+ hid_t gid = (-1); /* Group ID */
+ H5G_t *grp = NULL; /* Group opened */
+ H5G_loc_t loc; /* Location of group passed in */
+ H5G_loc_t start_loc; /* Location of starting group */
+ unsigned rc; /* Reference count of object */
+ herr_t ret_value; /* Return value */
+
+ /* Portably clear udata struct (before FUNC_ENTER) */
+ HDmemset(&udata, 0, sizeof(udata));
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check args */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+
+ /* Open the group to begin visiting within */
+ if((grp = H5G__open_name(&loc, group_name, lapl_id, dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+
+ /* Register an ID for the starting group */
+ if((gid = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+
+ /* Get the location of the starting group */
+ if(H5G_loc(gid, &start_loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+
+ /* Set up user data */
+ udata.gid = gid;
+ udata.curr_loc = &start_loc;
+ udata.lapl_id = lapl_id;
+ udata.dxpl_id = dxpl_id;
+ udata.idx_type = idx_type;
+ udata.order = order;
+ udata.op = op;
+ udata.op_data = op_data;
+
+ /* Allocate space for the path name */
+ if(NULL == (udata.path = H5MM_strdup("")))
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer")
+ udata.path_buf_size = 1;
+ udata.curr_path_len = 0;
+
+ /* Create skip list to store visited object information */
+ if((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
+
+ /* Get the group's reference count */
+ if(H5O_get_rc_and_type(&grp->oloc, dxpl_id, &rc, NULL) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info")
+
+ /* If its ref count is > 1, we add it to the list of visited objects */
+ /* (because it could come up again during traversal) */
+ if(rc > 1) {
+ H5_obj_t *obj_pos; /* New object node for visited list */
+
+ /* Allocate new object "position" node */
+ if((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node")
+
+ /* Construct unique "position" for this object */
+ H5F_GET_FILENO(grp->oloc.file, obj_pos->fileno);
+ obj_pos->addr = grp->oloc.addr;
+
+ /* Add to list of visited objects */
+ if(H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list")
+ } /* end if */
+
+ /* Attempt to get the link info for this group */
+ if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
+ if(linfo_exists) {
+ /* Check for creation order tracking, if creation order index lookup requested */
+ if(idx_type == H5_INDEX_CRT_ORDER) {
+ /* Check if creation order is tracked */
+ if(!linfo.track_corder)
+ /* Switch to name order for this group */
+ idx_type = H5_INDEX_NAME;
+ } /* end if */
+ else
+ HDassert(idx_type == H5_INDEX_NAME);
+ } /* end if */
+ else {
+ /* Can only perform name lookups on groups with symbol tables */
+ if(idx_type != H5_INDEX_NAME)
+ /* Switch to name order for this group */
+ idx_type = H5_INDEX_NAME;
+ } /* end if */
+
+ /* Call the link iteration routine */
+ if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G_visit_cb, &udata, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links")
+
+done:
+ /* Release user data resources */
+ H5MM_xfree(udata.path);
+ if(udata.visited)
+ H5SL_destroy(udata.visited, H5G_free_visit_visited, NULL);
+
+ /* Release the group opened */
+ if(gid > 0) {
+ if(H5I_dec_app_ref(gid) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
+ } /* end if */
+ else if(grp && H5G_close(grp) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to release group")
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_normalize() */
+} /* end H5G_visit() */
diff --git a/src/H5Glink.c b/src/H5Glink.c
index 0049bfd..f934052 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -63,6 +63,11 @@
/* Local Prototypes */
/********************/
+static int H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2);
+static int H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2);
+static int H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2);
+static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
+
/*********************/
/* Package Variables */
@@ -98,10 +103,10 @@
*
*-------------------------------------------------------------------------
*/
-int
+static int
H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_link_cmp_name_inc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
} /* end H5G_link_cmp_name_inc() */
@@ -125,10 +130,10 @@ H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
*
*-------------------------------------------------------------------------
*/
-int
+static int
H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_link_cmp_name_dec)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
} /* end H5G_link_cmp_name_dec() */
@@ -151,12 +156,12 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
*
*-------------------------------------------------------------------------
*/
-int
+static int
H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_link_cmp_corder_inc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = -1;
@@ -186,12 +191,12 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
*
*-------------------------------------------------------------------------
*/
-int
+static int
H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_link_cmp_corder_dec)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = 1;
@@ -205,7 +210,7 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
/*-------------------------------------------------------------------------
- * Function: H5G_ent_to_link
+ * Function: H5G__ent_to_link
*
* Purpose: Convert a symbol table entry to a link
*
@@ -218,10 +223,10 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
+H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
const H5G_entry_t *ent, const char *name)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_to_link)
+ FUNC_ENTER_PACKAGE_NOERR
/* check arguments */
HDassert(lnk);
@@ -258,7 +263,7 @@ H5G_ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_ent_to_link() */
+} /* end H5G__ent_to_link() */
/*-------------------------------------------------------------------------
@@ -278,7 +283,7 @@ H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_link_to_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(lnk);
@@ -338,7 +343,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_link_to_loc
+ * Function: H5G__link_to_loc
*
* Purpose: Build group location from group and link object
*
@@ -350,12 +355,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
+H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
H5G_loc_t *obj_loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_link_to_loc, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(grp_loc);
@@ -382,145 +387,11 @@ H5G_link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_to_loc() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_link_copy_file
- *
- * Purpose: Copy a link and the object it points to from one file to
- * another.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Sep 29 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
- const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info)
-{
- H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */
- const H5O_link_t *src_lnk = _src_lnk; /* Source link */
- hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
- hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */
- H5G_loc_t tmp_src_loc; /* Group location holding target object */
- H5G_name_t tmp_src_path; /* Path for target object */
- H5O_loc_t tmp_src_oloc; /* Object location for target object */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_link_copy_file, FAIL)
-
- /* check arguments */
- HDassert(dst_file);
- HDassert(src_lnk);
- HDassert(dst_lnk);
- HDassert(cpy_info);
-
- /* Expand soft or external link, if requested */
- if((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link)
- || (H5L_TYPE_EXTERNAL == src_lnk->type
- && cpy_info->expand_ext_link)) {
- H5G_loc_t lnk_grp_loc; /* Group location holding link */
- H5G_name_t lnk_grp_path; /* Path for link */
- htri_t tar_exists; /* Whether the target object exists */
-
- /* Set up group location for link */
- H5G_name_reset(&lnk_grp_path);
- lnk_grp_loc.path = &lnk_grp_path;
- lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */
-
- /* Check if the target object exists */
- if((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name, H5P_DEFAULT,
- dxpl_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to check if target object exists")
-
- if(tar_exists) {
- /* Make a temporary copy of the link, so that it will not change the
- * info in the cache when we change it to a hard link */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
-
- /* Set up group location for target object. Let H5G_traverse expand
- * the link. */
- tmp_src_loc.path = &tmp_src_path;
- tmp_src_loc.oloc = &tmp_src_oloc;
- if(H5G_loc_reset(&tmp_src_loc) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to reset location")
-
- /* Find the target object */
- if(H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc,
- H5P_DEFAULT, dxpl_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to find target object")
- expanded_link_open = TRUE;
-
- /* Convert symbolic link to hard link */
- if(tmp_src_lnk.type == H5L_TYPE_SOFT)
- tmp_src_lnk.u.soft.name =
- (char *)H5MM_xfree(tmp_src_lnk.u.soft.name);
- else if(tmp_src_lnk.u.ud.size > 0)
- tmp_src_lnk.u.ud.udata = H5MM_xfree(tmp_src_lnk.u.ud.udata);
- tmp_src_lnk.type = H5L_TYPE_HARD;
- tmp_src_lnk.u.hard.addr = tmp_src_oloc.addr;
- src_lnk = &tmp_src_lnk;
- } /* end if */
- } /* end if */
-
- /* Copy src link information to dst link information */
- if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
- dst_lnk_init = TRUE;
-
- /* Check if object in source group is a hard link & copy it */
- if(H5L_TYPE_HARD == src_lnk->type) {
- H5O_loc_t new_dst_oloc; /* Copied object location in destination */
-
- /* Set up copied object location to fill in */
- H5O_loc_reset(&new_dst_oloc);
- new_dst_oloc.file = dst_file;
-
- if(!expanded_link_open) {
- /* Build temporary object location for source */
- H5O_loc_reset(&tmp_src_oloc);
- tmp_src_oloc.file = src_oloc->file;
- tmp_src_oloc.addr = src_lnk->u.hard.addr;
- } /* end if */
- HDassert(H5F_addr_defined(tmp_src_oloc.addr));
-
- /* Copy the shared object from source to destination */
- /* Don't care about obj_type or udata because those are only important
- * for old style groups */
- if(H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info,
- TRUE, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
-
- /* Copy new destination object's information for eventual insertion */
- dst_lnk->u.hard.addr = new_dst_oloc.addr;
- } /* end if */
-
-done:
- /* Check if we used a temporary src link */
- if(src_lnk != _src_lnk) {
- HDassert(src_lnk == &tmp_src_lnk);
- H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk);
- } /* end if */
- if(ret_value < 0)
- if(dst_lnk_init)
- H5O_msg_reset(H5O_LINK_ID, dst_lnk);
- /* Check if we need to free the temp source oloc */
- if(expanded_link_open)
- if(H5G_loc_free(&tmp_src_loc) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_copy_file() */
+} /* end H5G__link_to_loc() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_sort_table
+ * Function: H5G__link_sort_table
*
* Purpose: Sort table containing a list of links for a group
*
@@ -533,10 +404,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
+H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
H5_iter_order_t order)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_link_sort_table)
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ltable);
@@ -561,11 +432,11 @@ H5G_link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_link_sort_table() */
+} /* end H5G__link_sort_table() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_iterate_table
+ * Function: H5G__link_iterate_table
*
* Purpose: Iterate over table containing a list of links for a group,
* making appropriate callbacks
@@ -579,13 +450,13 @@ H5G_link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
*-------------------------------------------------------------------------
*/
herr_t
-H5G_link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
+H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data)
{
size_t u; /* Local index variable */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOERR(H5G_link_iterate_table, -)
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(ltable);
@@ -611,11 +482,11 @@ H5G_link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_iterate_table() */
+} /* end H5G__link_iterate_table() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_release_table
+ * Function: H5G__link_release_table
*
* Purpose: Release table containing a list of links for a group
*
@@ -628,12 +499,12 @@ H5G_link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip,
*-------------------------------------------------------------------------
*/
herr_t
-H5G_link_release_table(H5G_link_table_t *ltable)
+H5G__link_release_table(H5G_link_table_t *ltable)
{
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_link_release_table)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ltable);
@@ -653,11 +524,11 @@ H5G_link_release_table(H5G_link_table_t *ltable)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_release_table() */
+} /* end H5G__link_release_table() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_name_replace
+ * Function: H5G__link_name_replace
*
* Purpose: Determine the type of object referred to (for hard links) or
* the link type (for soft links and user-defined links).
@@ -671,13 +542,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
const H5O_link_t *lnk)
{
H5RS_str_t *obj_path_r = NULL; /* Full path for link being removed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_link_name_replace, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(file);
@@ -694,5 +565,5 @@ done:
H5RS_decr(obj_path_r);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_name_replace() */
+} /* end H5G__link_name_replace() */
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 23db587..0da71bc 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -161,7 +161,7 @@ H5G_loc(hid_t loc_id, H5G_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(H5I_get_type(loc_id)) {
case H5I_FILE:
@@ -275,7 +275,7 @@ H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(dst);
@@ -309,7 +309,7 @@ H5G_loc_reset(H5G_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_reset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -342,7 +342,7 @@ H5G_loc_free(H5G_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_free, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -378,7 +378,7 @@ H5G_loc_find_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name,
H5G_loc_fnd_t *udata = (H5G_loc_fnd_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_loc_find_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid object */
if(obj_loc == NULL)
@@ -415,7 +415,7 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc/*out*/,
H5G_loc_fnd_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_find, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -460,7 +460,7 @@ H5G_loc_find_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
hbool_t obj_exists = FALSE; /* Whether the object exists (unused) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_loc_find_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -473,14 +473,14 @@ H5G_loc_find_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
lnk_copied = TRUE;
/* Build the initial object location for the link */
- if(H5G_link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
+ if(H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location")
obj_loc_valid = TRUE;
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
/* (may modify the object location) */
- if(H5G_traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc, &obj_exists, udata->lapl_id, udata->dxpl_id) < 0)
+ if(H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, &links_left, TRUE, udata->loc, &obj_exists, udata->lapl_id, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed")
done:
@@ -521,7 +521,7 @@ H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
H5G_loc_fbi_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_find_by_idx, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -546,7 +546,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_loc_insert
+ * Function: H5G__loc_insert
*
* Purpose: Insert an object at a location
*
@@ -558,13 +558,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc,
+H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc,
H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id)
{
H5O_link_t lnk; /* Link for object to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_insert, FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args. */
HDassert(grp_loc);
@@ -591,7 +591,7 @@ H5G_loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_loc_insert() */
+} /* end H5G__loc_insert() */
/*-------------------------------------------------------------------------
@@ -613,7 +613,7 @@ H5G_loc_exists_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
{
H5G_loc_exists_t *udata = (H5G_loc_exists_t *)_udata; /* User data passed in */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_loc_exists_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check if the name in this group resolved to a valid object */
if(obj_loc == NULL)
@@ -651,7 +651,7 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl
H5G_loc_exists_t udata; /* User data for traversal callback */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_exists, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -691,7 +691,7 @@ H5G_loc_info_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, const
H5G_loc_info_t *udata = (H5G_loc_info_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_loc_info_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -730,7 +730,7 @@ H5G_loc_info(H5G_loc_t *loc, const char *name, hbool_t want_ih_info, H5O_info_t
H5G_loc_info_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -772,7 +772,7 @@ H5G_loc_set_comment_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
htri_t exists; /* Whether a "comment" message already exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_loc_set_comment_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -824,7 +824,7 @@ H5G_loc_set_comment(H5G_loc_t *loc, const char *name, const char *comment,
H5G_loc_sc_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_set_comment, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
@@ -863,7 +863,7 @@ H5G_loc_get_comment_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
H5O_name_t comment; /* Object header "comment" message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_loc_get_comment_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -915,7 +915,7 @@ H5G_loc_get_comment(H5G_loc_t *loc, const char *name, char *comment/*out*/,
H5G_loc_gc_t udata; /* User data for traversal callback */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_loc_get_comment, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args. */
HDassert(loc);
diff --git a/src/H5Gname.c b/src/H5Gname.c
index c7feb62..62875dc 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -23,22 +23,36 @@
*
*-------------------------------------------------------------------------
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Gpkg.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
#include "H5MMprivate.h" /* Memory wrappers */
-/* Private typedefs */
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
/* Struct used by change name callback function */
typedef struct H5G_names_t {
@@ -60,14 +74,15 @@ typedef struct H5G_gnba_iter_t {
char *path; /* Name of the object */
} H5G_gnba_iter_t;
-/* Private macros */
+/********************/
+/* Package Typedefs */
+/********************/
-/* Local variables */
-/* Declare extern the PQ free list for the wrapped strings */
-H5FL_BLK_EXTERN(str_buf);
+/********************/
+/* Local Prototypes */
+/********************/
-/* PRIVATE PROTOTYPES */
static htri_t H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r);
static H5RS_str_t *H5G_build_fullpath(const char *prefix, const char *name);
#ifdef NOT_YET
@@ -77,6 +92,123 @@ static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr,
const char *full_suffix, const char *src_path, const char *dst_path);
static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+/* Declare extern the PQ free list for the wrapped strings */
+H5FL_BLK_EXTERN(str_buf);
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G__component
+ *
+ * Purpose: Returns the pointer to the first component of the
+ * specified name by skipping leading slashes. Returns
+ * the size in characters of the component through SIZE_P not
+ * counting leading slashes or the null terminator.
+ *
+ * Return: Success: Ptr into NAME.
+ *
+ * Failure: Ptr to the null terminator of NAME.
+ *
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Aug 11 1997
+ *
+ *-------------------------------------------------------------------------
+ */
+const char *
+H5G__component(const char *name, size_t *size_p)
+{
+ FUNC_ENTER_PACKAGE_NOERR
+
+ assert(name);
+
+ while ('/' == *name)
+ name++;
+ if (size_p)
+ *size_p = HDstrcspn(name, "/");
+
+ FUNC_LEAVE_NOAPI(name)
+} /* end H5G__component() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5G_normalize
+ *
+ * Purpose: Returns a pointer to a new string which has duplicate and
+ * trailing slashes removed from it.
+ *
+ * Return: Success: Ptr to normalized name.
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, August 16, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+H5G_normalize(const char *name)
+{
+ char *norm; /* Pointer to the normalized string */
+ size_t s,d; /* Positions within the strings */
+ unsigned last_slash; /* Flag to indicate last character was a slash */
+ char *ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Sanity check */
+ HDassert(name);
+
+ /* Duplicate the name, to return */
+ if(NULL == (norm = H5MM_strdup(name)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string")
+
+ /* Walk through the characters, omitting duplicated '/'s */
+ s = d = 0;
+ last_slash = 0;
+ while(name[s] != '\0') {
+ if(name[s] == '/')
+ if(last_slash)
+ ;
+ else {
+ norm[d++] = name[s];
+ last_slash = 1;
+ } /* end else */
+ else {
+ norm[d++] = name[s];
+ last_slash = 0;
+ } /* end else */
+ s++;
+ } /* end while */
+
+ /* Terminate normalized string */
+ norm[d] = '\0';
+
+ /* Check for final '/' on normalized name & eliminate it */
+ if(d > 1 && last_slash)
+ norm[d - 1] = '\0';
+
+ /* Set return value */
+ ret_value = norm;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_normalize() */
+
/*-------------------------------------------------------------------------
* Function: H5G_common_path
@@ -100,16 +232,16 @@ H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
size_t nchars1,nchars2; /* Number of characters in components */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_common_path)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get component of each name */
fullpath=H5RS_get_str(fullpath_r);
assert(fullpath);
- fullpath=H5G_component(fullpath,&nchars1);
+ fullpath=H5G__component(fullpath,&nchars1);
assert(fullpath);
prefix=H5RS_get_str(prefix_r);
assert(prefix);
- prefix=H5G_component(prefix,&nchars2);
+ prefix=H5G__component(prefix,&nchars2);
assert(prefix);
/* Check if we have a real string for each component */
@@ -123,9 +255,9 @@ H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
prefix+=nchars2;
/* Get next component of each name */
- fullpath=H5G_component(fullpath,&nchars1);
+ fullpath=H5G__component(fullpath,&nchars1);
assert(fullpath);
- prefix=H5G_component(prefix,&nchars2);
+ prefix=H5G__component(prefix,&nchars2);
assert(prefix);
} /* end if */
else
@@ -165,7 +297,7 @@ H5G_build_fullpath(const char *prefix, const char *name)
unsigned need_sep; /* Flag to indicate if separator is needed */
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_build_fullpath)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(prefix);
@@ -221,7 +353,7 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
const char *prefix; /* Pointer to raw string for path */
H5RS_str_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_build_fullpath_refstr_str)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(prefix_r);
HDassert(name);
@@ -259,7 +391,7 @@ H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *n
const char *name; /* Pointer to raw string of name */
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_build_fullpath_refstr_refstr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get the pointer to the prefix */
prefix = H5RS_get_str(prefix_r);
@@ -276,7 +408,7 @@ H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *n
/*-------------------------------------------------------------------------
- * Function: H5G_name_init
+ * Function: H5G__name_init
*
* Purpose: Set the initial path for a group hierarchy name
*
@@ -289,9 +421,9 @@ H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *n
*-------------------------------------------------------------------------
*/
herr_t
-H5G_name_init(H5G_name_t *name, const char *path)
+H5G__name_init(H5G_name_t *name, const char *path)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_name_init)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(name);
@@ -304,7 +436,7 @@ H5G_name_init(H5G_name_t *name, const char *path)
name->obj_hidden = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_name_init() */
+} /* end H5G__name_init() */
/*-------------------------------------------------------------------------
@@ -321,11 +453,11 @@ H5G_name_init(H5G_name_t *name, const char *path)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_name_set(H5G_name_t *loc, H5G_name_t *obj, const char *name)
+H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5G_name_set, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(loc);
HDassert(obj);
@@ -379,7 +511,7 @@ done:
herr_t
H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_name_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(src);
@@ -432,7 +564,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
ssize_t len = 0; /* Length of object's name */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_get_name, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(loc);
@@ -499,7 +631,7 @@ done:
herr_t
H5G_name_reset(H5G_name_t *name)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_name_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(name);
@@ -527,7 +659,7 @@ H5G_name_reset(H5G_name_t *name)
herr_t
H5G_name_free(H5G_name_t *name)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_name_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(name);
@@ -568,7 +700,7 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
size_t full_suffix_len; /* Length of full suffix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_name_move_path)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(path_r_ptr && *path_r_ptr);
@@ -670,7 +802,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_name_replace_cb)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_ptr);
@@ -719,30 +851,30 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
/* Find the top file in object's mount hier. */
- if(oloc->file->parent) {
+ if(H5F_PARENT(oloc->file)) {
/* Check if object is in child file (for mount & unmount operations) */
- if(names->dst_file && oloc->file->shared == names->dst_file->shared)
+ if(names->dst_file && H5F_SAME_SHARED(oloc->file, names->dst_file))
obj_in_child = TRUE;
/* Find the "top" file in the chain of mounted files */
- top_obj_file = oloc->file->parent;
- while(top_obj_file->parent != NULL) {
+ top_obj_file = H5F_PARENT(oloc->file);
+ while(H5F_PARENT(top_obj_file) != NULL) {
/* Check if object is in child mount hier. (for mount & unmount operations) */
- if(names->dst_file && top_obj_file->shared == names->dst_file->shared)
+ if(names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
obj_in_child = TRUE;
- top_obj_file = top_obj_file->parent;
+ top_obj_file = H5F_PARENT(top_obj_file);
} /* end while */
} /* end if */
else
top_obj_file = oloc->file;
/* Check if object is in top of child mount hier. (for mount & unmount operations) */
- if(names->dst_file && top_obj_file->shared == names->dst_file->shared)
+ if(names->dst_file && H5F_SAME_SHARED(top_obj_file, names->dst_file))
obj_in_child = TRUE;
/* Check if the object is in same file mount hier. */
- if(top_obj_file->shared != names->src_file->shared)
+ if(!H5F_SAME_SHARED(top_obj_file, names->src_file))
HGOTO_DONE(SUCCEED) /* No need to look at object, it's path is already invalid */
switch(names->op) {
@@ -938,7 +1070,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5G_name_replace, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
HDassert(src_file);
@@ -1022,8 +1154,8 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
H5G_names_t names; /* Structure to hold operation information for callback */
/* Find top file in src location's mount hierarchy */
- while(src_file->parent)
- src_file = src_file->parent;
+ while(H5F_PARENT(src_file))
+ src_file = H5F_PARENT(src_file);
/* Set up common information for callback */
names.src_file = src_file;
@@ -1076,7 +1208,7 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
hbool_t obj_found = FALSE; /* Object at 'path' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_get_name_by_addr_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(path);
@@ -1105,7 +1237,8 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
/* Check for object in same file (handles mounted files) */
/* (re-verify address, in case we traversed a file mount) */
if(udata->loc->addr == obj_loc.oloc->addr && udata->loc->file == obj_loc.oloc->file) {
- udata->path = H5MM_strdup(path);
+ if(NULL == (udata->path = H5MM_strdup(path)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, H5_ITER_ERROR, "can't duplicate path string")
/* We found a match so we return immediately */
HGOTO_DONE(H5_ITER_STOP)
@@ -1145,7 +1278,10 @@ H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *
herr_t status; /* Status from iteration */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_get_name_by_addr, FAIL)
+ /* Portably clear udata struct (before FUNC_ENTER) */
+ HDmemset(&udata, 0, sizeof(udata));
+
+ FUNC_ENTER_NOAPI(FAIL)
/* Construct the link info for the file's root group */
if(H5G_loc(file, &root_loc) < 0)
@@ -1153,7 +1289,8 @@ H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *
/* Check for root group being the object looked for */
if(root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) {
- udata.path = H5MM_strdup("");
+ if(NULL == (udata.path = H5MM_strdup("")))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string")
found_obj = TRUE;
} /* end if */
else {
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 9da5a6e..904def4 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -26,15 +26,21 @@
*
*-------------------------------------------------------------------------
*/
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Gpkg.h" /* Groups */
#include "H5HLprivate.h" /* Local Heaps */
@@ -42,7 +48,15 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppublic.h" /* Property Lists */
-/* Private typedefs */
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
/*
* Each key field of the B-link tree that points to symbol table
@@ -53,9 +67,14 @@ typedef struct H5G_node_key_t {
} H5G_node_key_t;
-/* Private macros */
+/********************/
+/* Package Typedefs */
+/********************/
+
-/* PRIVATE PROTOTYPES */
+/********************/
+/* Local Prototypes */
+/********************/
/* B-tree callbacks */
static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata);
@@ -79,6 +98,11 @@ static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, cons
static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth,
const void *key, const void *udata);
+
+/*********************/
+/* Package Variables */
+/*********************/
+
/* H5G inherits B-tree like properties from H5B */
H5B_class_t H5B_SNODE[1] = {{
H5B_SNODE_ID, /*id */
@@ -106,6 +130,16 @@ H5FL_DEFINE(H5G_node_t);
/* Declare a free list to manage sequences of H5G_entry_t's */
H5FL_SEQ_DEFINE(H5G_entry_t);
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
* Function: H5G_node_get_shared
@@ -127,7 +161,7 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
static H5RC_t *
H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_get_shared)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
@@ -154,7 +188,7 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_decode_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(shared);
HDassert(raw);
@@ -184,7 +218,7 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_encode_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(shared);
HDassert(raw);
@@ -215,7 +249,7 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
const H5G_bt_common_t *udata = (const H5G_bt_common_t *) _udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_debug_key)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(key);
@@ -238,7 +272,7 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
/*-------------------------------------------------------------------------
- * Function: H5G_node_free
+ * Function: H5G__node_free
*
* Purpose: Destroy a symbol table node in memory.
*
@@ -251,9 +285,9 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
*-------------------------------------------------------------------------
*/
herr_t
-H5G_node_free(H5G_node_t *sym)
+H5G__node_free(H5G_node_t *sym)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_free)
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -268,7 +302,7 @@ H5G_node_free(H5G_node_t *sym)
sym = H5FL_FREE(H5G_node_t, sym);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_node_free() */
+} /* end H5G__node_free() */
/*-------------------------------------------------------------------------
@@ -299,7 +333,7 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t UNUSED op, void *_lt_key,
H5G_node_t *sym = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -374,7 +408,7 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
const char *base; /* Base of heap */
int ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_cmp2)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -433,7 +467,7 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
const char *base; /* Base of heap */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_cmp3)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -497,7 +531,7 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *_lt_key
const char *base; /* Base of heap */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_found)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -600,7 +634,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
H5G_entry_t ent; /* Entry to insert in node */
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_insert)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -642,7 +676,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
idx += cmp > 0 ? 1 : 0;
/* Convert link information & name to symbol table entry */
- if(H5G_ent_convert(f, dxpl_id, udata->common.heap, udata->common.name,
+ if(H5G__ent_convert(f, dxpl_id, udata->common.heap, udata->common.name,
udata->lnk, udata->obj_type, udata->crt_info, &ent) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link")
@@ -703,11 +737,12 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
} /* end else */
/* Move entries down to make room for new entry */
+ HDassert(idx >= 0);
HDmemmove(insert_into->entry + idx + 1, insert_into->entry + idx,
- (insert_into->nsyms - idx) * sizeof(H5G_entry_t));
+ (insert_into->nsyms - (unsigned)idx) * sizeof(H5G_entry_t));
/* Copy new entry into table */
- H5G_ent_copy(&(insert_into->entry[idx]), &ent, H5_COPY_SHALLOW);
+ H5G__ent_copy(&(insert_into->entry[idx]), &ent, H5_COPY_SHALLOW);
/* Increment # of symbols in table */
insert_into->nsyms += 1;
@@ -765,7 +800,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
int cmp = 1;
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI_NOINIT(H5G_node_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -824,7 +859,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
} /* end else */
/* Replace any object names */
- if(H5G_link_name_replace(f, dxpl_id, udata->grp_full_path_r, &lnk) < 0)
+ if(H5G__link_name_replace(f, dxpl_id, udata->grp_full_path_r, &lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get object type")
/* Decrement the ref. count for hard links */
@@ -936,7 +971,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_node_iterate
+ * Function: H5G__node_iterate
*
* Purpose: This function gets called during a group iterate operation.
*
@@ -949,7 +984,7 @@ done:
*-------------------------------------------------------------------------
*/
int
-H5G_node_iterate(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
+H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
const void UNUSED *_rt_key, void *_udata)
{
H5G_bt_it_it_t *udata = (H5G_bt_it_it_t *)_udata;
@@ -958,7 +993,7 @@ H5G_node_iterate(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t ad
unsigned u; /* Local index variable */
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_iterate, H5_ITER_ERROR)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -986,7 +1021,7 @@ H5G_node_iterate(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t ad
HDassert(name);
/* Convert the entry to a link */
- if(H5G_ent_to_link(&lnk, udata->heap, &ents[u], name) < 0)
+ if(H5G__ent_to_link(&lnk, udata->heap, &ents[u], name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, "unable to convert symbol table entry to link")
/* Make the callback */
@@ -1011,11 +1046,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_iterate() */
+} /* end H5G__node_iterate() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_sumup
+ * Function: H5G__node_sumup
*
* Purpose: This function gets called during a group iterate operation
* to return total number of members in the group.
@@ -1028,14 +1063,14 @@ done:
*-------------------------------------------------------------------------
*/
int
-H5G_node_sumup(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
+H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
const void UNUSED *_rt_key, void *_udata)
{
hsize_t *num_objs = (hsize_t *)_udata;
H5G_node_t *sn = NULL;
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_sumup, H5_ITER_ERROR)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1055,11 +1090,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_sumup() */
+} /* end H5G__node_sumup() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_name
+ * Function: H5G__node_by_idx
*
* Purpose: This function gets called during a group iterate operation
* to return object name by giving idx.
@@ -1073,14 +1108,14 @@ done:
*-------------------------------------------------------------------------
*/
int
-H5G_node_by_idx(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
+H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
const void UNUSED *_rt_key, void *_udata)
{
H5G_bt_it_idx_common_t *udata = (H5G_bt_it_idx_common_t *)_udata;
H5G_node_t *sn = NULL;
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_by_idx, H5_ITER_ERROR)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1116,11 +1151,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_by_idx() */
+} /* end H5G__node_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_init
+ * Function: H5G__node_init
*
* Purpose: This function gets called during a file opening to initialize
* global information about group B-tree nodes for file.
@@ -1134,13 +1169,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_node_init(H5F_t *f)
+H5G__node_init(H5F_t *f)
{
H5B_shared_t *shared; /* Shared B-tree node info */
size_t sizeof_rkey; /* Size of raw (disk) key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_init, FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(f);
@@ -1156,12 +1191,12 @@ H5G_node_init(H5F_t *f)
/* <none> */
/* Make shared B-tree info reference counted */
- if(NULL == (f->shared->grp_btree_shared = H5RC_create(shared, H5B_shared_free)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info")
+ if(H5F_SET_GRP_BTREE_SHARED(f, H5RC_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:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_init() */
+} /* end H5G__node_init() */
/*-------------------------------------------------------------------------
@@ -1182,7 +1217,7 @@ done:
herr_t
H5G_node_close(const H5F_t *f)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_close)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(f);
@@ -1196,7 +1231,7 @@ H5G_node_close(const H5F_t *f)
/*-------------------------------------------------------------------------
- * Function: H5G_node_copy
+ * Function: H5G__node_copy
*
* Purpose: This function gets called during a group iterate operation
* to copy objects of this node into a new location.
@@ -1209,7 +1244,7 @@ H5G_node_close(const H5F_t *f)
*-------------------------------------------------------------------------
*/
int
-H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
+H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
const void UNUSED *_rt_key, void *_udata)
{
H5G_bt_it_cpy_t *udata = (H5G_bt_it_cpy_t *)_udata;
@@ -1220,7 +1255,7 @@ H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
unsigned int i; /* Local index variable */
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_copy, H5_ITER_ERROR)
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(f);
@@ -1331,7 +1366,7 @@ H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
/* Insert the new object in the destination file's group */
/* (Don't increment the link count - that's already done above for hard links) */
- if(H5G_stab_insert_real(udata->dst_file, udata->dst_stab, name, &lnk,
+ if(H5G__stab_insert_real(udata->dst_file, udata->dst_stab, name, &lnk,
obj_type, (obj_type == H5O_TYPE_GROUP ? &gcrt_info : NULL),
dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name")
@@ -1349,11 +1384,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_copy() */
+} /* end H5G__node_copy() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_build_table
+ * Function: H5G__node_build_table
*
* Purpose: B-link tree callback for building table of links
*
@@ -1366,7 +1401,7 @@ done:
*-------------------------------------------------------------------------
*/
int
-H5G_node_build_table(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
+H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
const void UNUSED *_rt_key, void *_udata)
{
H5G_bt_it_bt_t *udata = (H5G_bt_it_bt_t *)_udata;
@@ -1374,7 +1409,7 @@ H5G_node_build_table(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_
unsigned u; /* Local index variable */
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_build_table, H5_ITER_ERROR)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1414,7 +1449,7 @@ H5G_node_build_table(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_
linkno = udata->ltable->nlinks++;
/* Convert the entry to a link */
- if(H5G_ent_to_link(&udata->ltable->lnks[linkno], udata->heap, &sn->entry[u], name) < 0)
+ if(H5G__ent_to_link(&udata->ltable->lnks[linkno], udata->heap, &sn->entry[u], name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, "unable to convert symbol table entry to link")
} /* end for */
@@ -1424,11 +1459,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_build_table() */
+} /* end H5G__node_build_table() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_iterate_size
+ * Function: H5G__node_iterate_size
*
* Purpose: This function gets called by H5B_iterate_helper()
* to gather storage info for SNODs.
@@ -1441,12 +1476,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_node_iterate_size(H5F_t *f, hid_t UNUSED dxpl_id, const void UNUSED *_lt_key, haddr_t UNUSED addr,
+H5G__node_iterate_size(H5F_t *f, hid_t UNUSED dxpl_id, const void UNUSED *_lt_key, haddr_t UNUSED addr,
const void UNUSED *_rt_key, void *_udata)
{
hsize_t *stab_size = (hsize_t *)_udata; /* User data */
- FUNC_ENTER_NOAPI_NOFUNC(H5G_node_iterate_size)
+ FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
HDassert(f);
@@ -1455,7 +1490,7 @@ H5G_node_iterate_size(H5F_t *f, hid_t UNUSED dxpl_id, const void UNUSED *_lt_key
*stab_size += H5G_NODE_SIZE(f);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_node_iterate_size() */
+} /* end H5G__node_iterate_size() */
/*-------------------------------------------------------------------------
@@ -1481,7 +1516,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1534,7 +1569,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
else
fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Warning: Invalid heap address given, name not displayed!");
- H5G_ent_debug(sn->entry + u, stream, indent, fwidth, heap);
+ H5G__ent_debug(sn->entry + u, stream, indent, fwidth, heap);
} /* end for */
} /* end if */
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index b0add06..021f4e1 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -28,7 +28,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
@@ -37,7 +36,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Gpkg.h" /* Groups */
#include "H5HLprivate.h" /* Local Heaps */
#include "H5Iprivate.h" /* IDs */
@@ -82,6 +81,7 @@ typedef struct {
hid_t dxpl_id; /* DXPL during insertion */
} H5G_obj_stab_it_ud1_t;
+
/********************/
/* Package Typedefs */
/********************/
@@ -92,7 +92,7 @@ typedef struct {
/********************/
static herr_t H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned idx,
void *_udata);
-static herr_t H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo,
+static herr_t H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo,
hid_t dxpl_id);
@@ -113,7 +113,7 @@ static herr_t H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo,
/*-------------------------------------------------------------------------
- * Function: H5G_obj_create
+ * Function: H5G__obj_create
*
* Purpose: Create an object header for a group and update object location info
*
@@ -126,7 +126,7 @@ static herr_t H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo,
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
+H5G__obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
H5O_loc_t *oloc/*out*/)
{
H5P_genplist_t *gc_plist; /* Group creation property list */
@@ -135,7 +135,7 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
H5O_pline_t pline; /* Pipeline */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_obj_create, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -160,16 +160,16 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5G_obj_create_t *gcrt_info,
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info")
/* Call the "real" group creation routine now */
- if(H5G_obj_create_real(f, dxpl_id, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0)
+ if(H5G__obj_create_real(f, dxpl_id, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_create() */
+} /* end H5G__obj_create() */
/*-------------------------------------------------------------------------
- * Function: H5G_obj_create_real
+ * Function: H5G__obj_create_real
*
* Purpose: Create an object header for a group and update object location info
*
@@ -182,7 +182,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
+H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
const H5O_linfo_t *linfo, const H5O_pline_t *pline,
H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/)
{
@@ -191,7 +191,7 @@ H5G_obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
hid_t gcpl_id = gcrt_info->gcpl_id; /* Group creation property list ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_obj_create_real, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -203,7 +203,7 @@ H5G_obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
HDassert(oloc);
/* Check for invalid access request */
- if(0 == (f->intent & H5F_ACC_RDWR))
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file")
/* Check for using the latest version of the group format */
@@ -269,23 +269,26 @@ H5G_obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
/* Check for format of group to create */
if(use_latest_format) {
/* Insert link info message */
- if(H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, linfo, dxpl_id) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Insert group info message */
- if(H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, ginfo, dxpl_id) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
/* Insert pipeline message */
if(pline && pline->nused)
- if(H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, pline, dxpl_id) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
} /* end if */
else {
H5O_stab_t stab; /* Symbol table message */
/* The group doesn't currently have a 'stab' message, go create one */
- if(H5G_stab_create(oloc, dxpl_id, ginfo, &stab) < 0)
+ if(H5G__stab_create(oloc, dxpl_id, ginfo, &stab) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table")
/* Cache the symbol table information */
@@ -296,11 +299,11 @@ H5G_obj_create_real(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_create_real() */
+} /* end H5G__obj_create_real() */
/*-------------------------------------------------------------------------
- * Function: H5G_obj_get_linfo
+ * Function: H5G__obj_get_linfo
*
* Purpose: Retrieves the "link info" message for an object. Also
* sets the number of links correctly, if it isn't set up yet.
@@ -315,12 +318,12 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5G_obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
+H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
{
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_get_linfo, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* check arguments */
HDassert(grp_oloc);
@@ -361,7 +364,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_obj_get_linfo() */
+} /* end H5G__obj_get_linfo() */
/*-------------------------------------------------------------------------
@@ -385,14 +388,14 @@ H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned UNUSED idx, void *_udata
H5G_obj_oh_it_ud1_t *udata = (H5G_obj_oh_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5G_obj_compact_to_dense_cb, udata->dxpl_id, udata->oh_addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(udata->dxpl_id, udata->oh_addr, FAIL)
/* check arguments */
HDassert(lnk);
HDassert(udata);
/* Insert link into dense link storage */
- if(H5G_dense_insert(udata->f, udata->dxpl_id, udata->linfo, lnk) < 0)
+ if(H5G__dense_insert(udata->f, udata->dxpl_id, udata->linfo, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage")
done:
@@ -420,7 +423,7 @@ H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
H5G_obj_stab_it_ud1_t *udata = (H5G_obj_stab_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_obj_stab_to_new_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(lnk);
@@ -466,7 +469,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_insert, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
@@ -475,7 +478,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
/* Check if we have information about the number of objects in this group */
/* (by attempting to get the link info message for this group) */
- if((linfo_exists = H5G_obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
H5O_ginfo_t ginfo; /* Group info message */
@@ -525,7 +528,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
} /* end if */
/* The group doesn't currently have "dense" storage for links */
- if(H5G_dense_create(grp_oloc->file, dxpl_id, &linfo, pline) < 0)
+ if(H5G__dense_create(grp_oloc->file, dxpl_id, &linfo, pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group")
/* Set up user data for object header message iteration */
@@ -569,7 +572,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
udata.dxpl_id = dxpl_id;
/* Iterate through all links in "old format" group and insert them into new format */
- if(H5G_stab_iterate(grp_oloc, dxpl_id, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_obj_stab_to_new_cb, &udata) < 0)
+ if(H5G__stab_iterate(grp_oloc, dxpl_id, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_obj_stab_to_new_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links")
/* Remove the symbol table message from the group */
@@ -594,19 +597,19 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
/* Insert into symbol table or "dense" storage */
if(use_old_format) {
/* Insert into symbol table */
- if(H5G_stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info, dxpl_id)
+ if(H5G__stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info, dxpl_id)
< 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table")
} /* end if */
else {
if(use_new_dense) {
/* Insert into dense link storage */
- if(H5G_dense_insert(grp_oloc->file, dxpl_id, &linfo, obj_lnk) < 0)
+ if(H5G__dense_insert(grp_oloc->file, dxpl_id, &linfo, obj_lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage")
} /* end if */
else {
/* Insert with link message */
- if(H5G_compact_insert(grp_oloc, obj_lnk, dxpl_id) < 0)
+ if(H5G__compact_insert(grp_oloc, obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message")
} /* end else */
} /* end else */
@@ -642,7 +645,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_obj_iterate
+ * Function: H5G__obj_iterate
*
* Purpose: Private function for H5Giterate.
* Iterates over objects in a group
@@ -657,7 +660,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_iterate(const H5O_loc_t *grp_oloc,
+H5G__obj_iterate(const H5O_loc_t *grp_oloc,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id)
{
@@ -665,14 +668,14 @@ H5G_obj_iterate(const H5O_loc_t *grp_oloc,
htri_t linfo_exists; /* Whether the link info message exists */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_iterate, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* Sanity check */
HDassert(grp_oloc);
HDassert(op);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Check for going out of bounds */
@@ -688,12 +691,12 @@ H5G_obj_iterate(const H5O_loc_t *grp_oloc,
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Iterate over the links in the group, building a table of the link messages */
- if((ret_value = H5G_dense_iterate(grp_oloc->file, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__dense_iterate(grp_oloc->file, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links")
} /* end if */
else {
/* Get the object's name from the link messages */
- if((ret_value = H5G_compact_iterate(grp_oloc, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__compact_iterate(grp_oloc, dxpl_id, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links")
} /* end else */
} /* end if */
@@ -703,17 +706,17 @@ H5G_obj_iterate(const H5O_loc_t *grp_oloc,
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Iterate over symbol table */
- if((ret_value = H5G_stab_iterate(grp_oloc, dxpl_id, order, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__stab_iterate(grp_oloc, dxpl_id, order, skip, last_lnk, op, op_data)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table")
} /* end else */
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_obj_iterate() */
+} /* end H5G__obj_iterate() */
/*-------------------------------------------------------------------------
- * Function: H5G_obj_info
+ * Function: H5G__obj_info
*
* Purpose: Retrieve information about a group
*
@@ -726,7 +729,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
+H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
{
H5G_t *grp = NULL; /* Group to query */
H5G_loc_t grp_loc; /* Entry of group to be queried */
@@ -736,7 +739,7 @@ H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
htri_t linfo_exists; /* Whether the link info message exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_obj_info, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(oloc);
@@ -759,7 +762,7 @@ H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
grp_info->mounted = H5G_MOUNTED(grp);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Retrieve the information about the links */
@@ -774,7 +777,7 @@ H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id)
} /* end if */
else {
/* Get the number of objects in this group by iterating over symbol table */
- if(H5G_stab_count(oloc, &grp_info->nlinks, dxpl_id) < 0)
+ if(H5G__stab_count(oloc, &grp_info->nlinks, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects")
/* Set the other information about the group */
@@ -788,7 +791,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "unable to close queried group")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_info() */
+} /* end H5G__obj_info() */
/*-------------------------------------------------------------------------
@@ -805,20 +808,20 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_obj_get_name_by_idx(H5O_loc_t *oloc, H5_index_t idx_type,
+H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, char* name, size_t size, hid_t dxpl_id)
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_get_name_by_idx, dxpl_id, oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oloc->addr, FAIL)
/* Sanity check */
HDassert(oloc && oloc->file);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
@@ -831,12 +834,12 @@ H5G_obj_get_name_by_idx(H5O_loc_t *oloc, H5_index_t idx_type,
/* Check for dense link storage */
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's name from the dense link storage */
- if((ret_value = H5G_dense_get_name_by_idx(oloc->file, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
+ if((ret_value = H5G__dense_get_name_by_idx(oloc->file, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end if */
else {
/* Get the object's name from the link messages */
- if((ret_value = H5G_compact_get_name_by_idx(oloc, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
+ if((ret_value = H5G__compact_get_name_by_idx(oloc, dxpl_id, &linfo, idx_type, order, n, name, size)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end else */
} /* end if */
@@ -846,7 +849,7 @@ H5G_obj_get_name_by_idx(H5O_loc_t *oloc, H5_index_t idx_type,
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Get the object's name from the symbol table */
- if((ret_value = H5G_stab_get_name_by_idx(oloc, order, n, name, size, dxpl_id)) < 0)
+ if((ret_value = H5G__stab_get_name_by_idx(oloc, order, n, name, size, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end else */
@@ -869,11 +872,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
+H5G_obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_obj_remove_update_linfo)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(oloc);
@@ -891,7 +894,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
/* Check if there's no more links */
if(linfo->nlinks == 0) {
/* Delete the dense storage */
- if(H5G_dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
+ if(H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage")
} /* end if */
/* Check for switching back to compact storage */
@@ -910,7 +913,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
size_t u; /* Local index */
/* Build the table of links for this group */
- if(H5G_dense_build_table(oloc->file, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, &ltable) < 0)
+ if(H5G__dense_build_table(oloc->file, dxpl_id, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, &ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Pin the object header */
@@ -940,7 +943,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
} /* end if */
/* Remove the dense storage */
- if(H5G_dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
+ if(H5G__dense_delete(oloc->file, dxpl_id, linfo, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage")
} /* end if */
@@ -949,7 +952,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
/* Free link table information */
- if(H5G_link_release_table(&ltable) < 0)
+ if(H5G__link_release_table(&ltable) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
} /* end if */
} /* end else */
@@ -978,21 +981,21 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_remove(H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name, hid_t dxpl_id)
+H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name, hid_t dxpl_id)
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_remove, dxpl_id, oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oloc->addr, FAIL)
/* Sanity check */
HDassert(oloc);
HDassert(name && *name);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Using the new format for groups */
@@ -1001,12 +1004,12 @@ H5G_obj_remove(H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name, h
/* Check for dense or compact storage */
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Remove object from the dense link storage */
- if(H5G_dense_remove(oloc->file, dxpl_id, &linfo, grp_full_path_r, name) < 0)
+ if(H5G__dense_remove(oloc->file, dxpl_id, &linfo, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end if */
else {
/* Remove object from the link messages */
- if(H5G_compact_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
+ if(H5G__compact_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
} /* end if */
@@ -1015,7 +1018,7 @@ H5G_obj_remove(H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *name, h
use_old_format = TRUE;
/* Remove object from the symbol table */
- if(H5G_stab_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
+ if(H5G__stab_remove(oloc, dxpl_id, grp_full_path_r, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
@@ -1043,7 +1046,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
+H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
{
H5O_linfo_t linfo; /* Link info message */
@@ -1051,13 +1054,13 @@ H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for deletion or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_remove_by_idx, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* Sanity check */
HDassert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info for this group */
- if((linfo_exists = H5G_obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
@@ -1073,12 +1076,12 @@ H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
/* Check for dense or compact storage */
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Remove object from the dense link storage */
- if(H5G_dense_remove_by_idx(grp_oloc->file, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
+ if(H5G__dense_remove_by_idx(grp_oloc->file, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end if */
else {
/* Remove object from compact link storage */
- if(H5G_compact_remove_by_idx(grp_oloc, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
+ if(H5G__compact_remove_by_idx(grp_oloc, dxpl_id, &linfo, grp_full_path_r, idx_type, order, n) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
} /* end if */
@@ -1091,7 +1094,7 @@ H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
use_old_format = TRUE;
/* Remove object from the symbol table */
- if(H5G_stab_remove_by_idx(grp_oloc, dxpl_id, grp_full_path_r, order, n) < 0)
+ if(H5G__stab_remove_by_idx(grp_oloc, dxpl_id, grp_full_path_r, order, n) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end else */
@@ -1107,7 +1110,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_obj_lookup
+ * Function: H5G__obj_lookup
*
* Purpose: Look up a link in a group, using the name as the key.
*
@@ -1120,44 +1123,44 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5G_obj_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
+H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
hid_t dxpl_id)
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_lookup, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
HDassert(name && *name);
/* Attempt to get the link info message for this group */
- if((linfo_exists = H5G_obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Check for dense link storage */
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Get the object's info from the dense link storage */
- if((ret_value = H5G_dense_lookup(grp_oloc->file, dxpl_id, &linfo, name, lnk)) < 0)
+ if((ret_value = H5G__dense_lookup(grp_oloc->file, dxpl_id, &linfo, name, lnk)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end if */
else {
/* Get the object's info from the link messages */
- if((ret_value = H5G_compact_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
+ if((ret_value = H5G__compact_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
} /* end if */
else {
/* Get the object's info from the symbol table */
- if((ret_value = H5G_stab_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
+ if((ret_value = H5G__stab_lookup(grp_oloc, name, lnk, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_obj_lookup() */
+} /* end H5G__obj_lookup() */
/*-------------------------------------------------------------------------
@@ -1175,20 +1178,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_lookup_by_idx(H5O_loc_t *grp_oloc, H5_index_t idx_type,
+H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5O_link_t *lnk, hid_t dxpl_id)
{
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info message exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_obj_lookup_by_idx, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
/* Attempt to get the link info message for this group */
- if((linfo_exists = H5G_obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
if(linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
@@ -1201,12 +1204,12 @@ H5G_obj_lookup_by_idx(H5O_loc_t *grp_oloc, H5_index_t idx_type,
/* Check for dense link storage */
if(H5F_addr_defined(linfo.fheap_addr)) {
/* Get the link from the dense storage */
- if(H5G_dense_lookup_by_idx(grp_oloc->file, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
+ if(H5G__dense_lookup_by_idx(grp_oloc->file, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end if */
else {
/* Get the link from the link messages */
- if(H5G_compact_lookup_by_idx(grp_oloc, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
+ if(H5G__compact_lookup_by_idx(grp_oloc, dxpl_id, &linfo, idx_type, order, n, lnk) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
} /* end if */
@@ -1216,7 +1219,7 @@ H5G_obj_lookup_by_idx(H5O_loc_t *grp_oloc, H5_index_t idx_type,
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query")
/* Get the object's info from the symbol table */
- if(H5G_stab_lookup_by_idx(grp_oloc, order, n, lnk, dxpl_id) < 0)
+ if(H5G__stab_lookup_by_idx(grp_oloc, order, n, lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end else */
diff --git a/src/H5Goh.c b/src/H5Goh.c
index fc7a1df..194e3ec 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -108,7 +108,7 @@ H5O_group_get_copy_file_udata(void)
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_group_get_copy_file_udata)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for the 'copy file' user data for copying groups.
* Currently this is only a ginfo, so there is no specific struct type for
@@ -139,7 +139,7 @@ H5O_group_free_copy_file_udata(void *_udata)
{
H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_group_free_copy_file_udata)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(udata);
@@ -178,7 +178,7 @@ H5O_group_isa(struct H5O_t *oh)
htri_t linfo_exists; /* Whether the 'linfo' message is in the object header */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_group_isa)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oh);
@@ -214,7 +214,7 @@ H5O_group_open(const H5G_loc_t *obj_loc, hid_t UNUSED lapl_id, hid_t dxpl_id, hb
H5G_t *grp = NULL; /* Group opened */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_group_open)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_loc);
@@ -255,7 +255,7 @@ H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
H5G_t *grp = NULL; /* New group created */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_group_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -263,7 +263,7 @@ H5O_group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
HDassert(obj_loc);
/* Create the the group */
- if(NULL == (grp = H5G_create(f, crt_info, dxpl_id)))
+ if(NULL == (grp = H5G__create(f, crt_info, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group")
/* Set up the new group's location */
@@ -303,7 +303,7 @@ H5O_group_get_oloc(hid_t obj_id)
H5G_t *grp; /* Group opened */
H5O_loc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_group_get_oloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the group */
if(NULL == (grp = (H5G_t *)H5I_object(obj_id)))
@@ -340,7 +340,7 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_group_bh_info, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* Sanity check */
HDassert(f);
@@ -398,7 +398,7 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages")
/* Get symbol table size info */
- if(H5G_stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
+ if(H5G__stab_bh_size(f, dxpl_id, &stab, bh_info) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info")
} /* end else */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index c966e16..9f41cb9 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -46,18 +46,6 @@
/* Standard length of fractal heap ID for link */
#define H5G_DENSE_FHEAP_ID_LEN 7
-/*
- * During name lookups (see H5G_traverse()) we sometimes want information about
- * a symbolic link or a mount point. The normal operation is to follow the
- * symbolic link or mount point and return information about its target.
- */
-#define H5G_TARGET_NORMAL 0x0000
-#define H5G_TARGET_SLINK 0x0001
-#define H5G_TARGET_MOUNT 0x0002
-#define H5G_TARGET_UDLINK 0x0004
-#define H5G_TARGET_EXISTS 0x0008
-#define H5G_CRT_INTMD_GROUP 0x0010
-
/* Size of a symbol table node on disk */
#define H5G_NODE_SIZE(f) ( \
/* General metadata fields */ \
@@ -95,7 +83,7 @@ typedef enum H5G_cache_type_t {
* messages... The values are entered into the symbol table when an object
* header is created (by hand) and are extracted from the symbol table with a
* callback function registered in H5O_init_interface(). Be sure to update
- * H5G_ent_decode(), H5G_ent_encode(), and H5G_ent_debug() as well.
+ * H5G_ent_decode(), H5G_ent_encode(), and H5G__ent_debug() as well.
*/
typedef union H5G_cache_t {
struct {
@@ -156,24 +144,6 @@ struct H5G_t {
/* Link iteration operator for internal library callbacks */
typedef herr_t (*H5G_lib_iterate_t)(const H5O_link_t *lnk, void *op_data);
-/* Describe kind of callback to make for each link */
-typedef enum H5G_link_iterate_op_type_t {
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5G_LINK_OP_OLD, /* "Old" application callback */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5G_LINK_OP_NEW /* "New" application callback */
-} H5G_link_iterate_op_type_t;
-
-typedef struct {
- H5G_link_iterate_op_type_t op_type;
- union {
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- H5G_iterate_t op_old; /* "Old" application callback for each link */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
- H5L_iterate_t op_new; /* "New" application callback for each link */
- } op_func;
-} H5G_link_iterate_t;
-
/* Data structure to hold table of links for a group */
typedef struct {
size_t nlinks; /* # of links in table */
@@ -252,7 +222,7 @@ typedef struct H5G_bt_it_cpy_t {
const H5O_loc_t *src_oloc; /* Source object location */
haddr_t src_heap_addr; /* Heap address of the source symbol table */
H5F_t *dst_file; /* File of destination group */
- H5O_stab_t *dst_stab; /* Symbol table message for destination group */
+ const H5O_stab_t *dst_stab; /* Symbol table message for destination group */
H5O_copy_t *cpy_info; /* Information for copy operation */
} H5G_bt_it_cpy_t;
@@ -318,20 +288,6 @@ typedef struct H5G_bt2_ud_ins_t {
uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID of link to insert */
} H5G_bt2_ud_ins_t;
-/* Typedef for path traversal operations */
-/* grp_loc is the location of the group in which the targeted object is located.
- * name is the last component of the object's name
- * lnk is the link between the group and the object
- * obj_loc is the target of the traversal (or NULL if the object doesn't exist)
- * operator_data is whatever udata was supplied when H5G_traverse was called
- * own_loc should be set to H5G_OWN_OBJ_LOC if this callback takes ownership of obj_loc,
- * H5G_OWN_GRP_LOC if it takes ownership of grp_loc, and H5G_OWN_NONE if obj_loc and
- * grp_loc need to be deleted.
- */
-typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc/*in*/, const char *name,
- const H5O_link_t *lnk/*in*/, H5G_loc_t *obj_loc/*out*/, void *operator_data/*in,out*/,
- H5G_own_loc_t *own_loc/*out*/);
-
/* Typedef for group creation operation */
typedef struct H5G_obj_create_t{
hid_t gcpl_id; /* Group creation property list */
@@ -378,69 +334,62 @@ H5FL_EXTERN(H5G_shared_t);
/*
* General group routines
*/
-H5_DLL H5G_t *H5G_create(H5F_t *file, H5G_obj_create_t *gcrt_info,
+H5_DLL H5G_t *H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info,
hid_t dxpl_id);
-H5_DLL H5G_t *H5G_create_named(const H5G_loc_t *loc, const char *name,
+H5_DLL H5G_t *H5G__create_named(const H5G_loc_t *loc, const char *name,
hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id);
-H5_DLL H5G_t *H5G_open_name(const H5G_loc_t *loc, const char *name,
+H5_DLL H5G_t *H5G__open_name(const H5G_loc_t *loc, const char *name,
hid_t gapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_iterate(hid_t loc_id, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
- const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
/*
* Group hierarchy traversal routines
*/
-H5_DLL herr_t H5G_traverse_special(const H5G_loc_t *grp_loc,
+H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc,
const H5O_link_t *lnk, unsigned target, size_t *nlinks, hbool_t last_comp,
H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
-H5_DLL herr_t H5G_traverse(const H5G_loc_t *loc, const char *name,
- unsigned target, H5G_traverse_t op, void *op_data, hid_t lapl_id,
- hid_t dxpl_id);
/*
* Utility functions
*/
-H5_DLL herr_t H5G_init(void);
-H5_DLL char *H5G_normalize(const char *name);
-H5_DLL const char *H5G_component(const char *name, size_t *size_p);
+H5_DLL herr_t H5G__init(void);
+H5_DLL const char *H5G__component(const char *name, size_t *size_p);
/*
* Functions that understand symbol tables but not names. The
* functions that understand names are exported to the rest of
* the library and appear in H5Gprivate.h.
*/
-H5_DLL herr_t H5G_stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id,
const H5O_ginfo_t *ginfo, H5O_stab_t *stab);
-H5_DLL herr_t H5G_stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_insert(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
- hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_insert_real(H5F_t *f, H5O_stab_t *stab, const char *name,
+H5_DLL herr_t H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab);
-H5_DLL herr_t H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
+H5_DLL herr_t H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab,
+ const char *name, H5O_link_t *obj_lnk, H5O_type_t obj_type,
+ const void *crt_info, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab);
+H5_DLL herr_t H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
-H5_DLL herr_t H5G_stab_count(struct H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
+H5_DLL herr_t H5G__stab_count(struct H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id);
+H5_DLL herr_t H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
H5_ih_info_t *bh_info);
-H5_DLL ssize_t H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order,
+H5_DLL ssize_t H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order,
hsize_t n, char* name, size_t size, hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_remove(H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__stab_remove(const H5O_loc_t *oloc, hid_t dxpl_id,
H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G_stab_remove_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__stab_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
H5RS_str_t *grp_full_path_r, H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G_stab_lookup(H5O_loc_t *grp_oloc, const char *name,
+H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL herr_t H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order,
+H5_DLL herr_t H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order,
hsize_t n, H5O_link_t *lnk, hid_t dxpl_id);
#ifndef H5_STRICT_FORMAT_CHECKS
-H5_DLL herr_t H5G_stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id,
H5O_stab_t *alt_stab);
#endif /* H5_STRICT_FORMAT_CHECKS */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G_stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
+H5_DLL H5G_obj_t H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -448,167 +397,140 @@ H5_DLL H5G_obj_t H5G_stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx,
/*
* Functions that understand symbol table entries.
*/
-H5_DLL herr_t H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src,
+H5_DLL void H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src,
H5_copy_depth_t depth);
-H5_DLL herr_t H5G_ent_reset(H5G_entry_t *ent);
-H5_DLL herr_t H5G_ent_decode_vec(const H5F_t *f, const uint8_t **pp,
+H5_DLL void H5G__ent_reset(H5G_entry_t *ent);
+H5_DLL herr_t H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp,
H5G_entry_t *ent, unsigned n);
-H5_DLL herr_t H5G_ent_encode_vec(const H5F_t *f, uint8_t **pp,
+H5_DLL herr_t H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp,
const H5G_entry_t *ent, unsigned n);
-H5_DLL herr_t H5G_ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap,
+H5_DLL herr_t H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap,
const char *name, const H5O_link_t *lnk, H5O_type_t obj_type,
const void *crt_info, H5G_entry_t *ent);
-H5_DLL herr_t H5G_ent_debug(const H5G_entry_t *ent, FILE * stream, int indent,
+H5_DLL herr_t H5G__ent_debug(const H5G_entry_t *ent, FILE * stream, int indent,
int fwidth, const H5HL_t *heap);
/* Functions that understand symbol table nodes */
-H5_DLL herr_t H5G_node_init(H5F_t *f);
-H5_DLL int H5G_node_iterate(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL herr_t H5G__node_init(H5F_t *f);
+H5_DLL int H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL int H5G_node_sumup(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL int H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL int H5G_node_by_idx(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL int H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL int H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL int H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL int H5G_node_build_table(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL int H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL herr_t H5G_node_iterate_size(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
+H5_DLL herr_t H5G__node_iterate_size(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
-H5_DLL herr_t H5G_node_free(H5G_node_t *sym);
+H5_DLL herr_t H5G__node_free(H5G_node_t *sym);
/* Functions that understand links in groups */
-H5_DLL int H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2);
-H5_DLL int H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2);
-H5_DLL int H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2);
-H5_DLL int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
-H5_DLL herr_t H5G_ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
+H5_DLL herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap,
const H5G_entry_t *ent, const char *name);
-H5_DLL herr_t H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *linfo);
-H5_DLL herr_t H5G_link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
+H5_DLL herr_t H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
H5G_loc_t *obj_loc);
-H5_DLL herr_t H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id,
- const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk,
- H5O_copy_t *cpy_info);
-H5_DLL herr_t H5G_link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
+H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
H5_iter_order_t order);
-H5_DLL herr_t H5G_link_iterate_table(const H5G_link_table_t *ltable,
+H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable,
hsize_t skip, hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data);
-H5_DLL herr_t H5G_link_release_table(H5G_link_table_t *ltable);
-H5_DLL herr_t H5G_link_name_replace(H5F_t *file, hid_t dxpl_id,
+H5_DLL herr_t H5G__link_release_table(H5G_link_table_t *ltable);
+H5_DLL herr_t H5G__link_name_replace(H5F_t *file, hid_t dxpl_id,
H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk);
/* Functions that understand "compact" link storage */
-H5_DLL herr_t H5G_compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
+H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk,
hid_t dxpl_id);
-H5_DLL ssize_t H5G_compact_get_name_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL ssize_t H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t idx, char *name, size_t size);
-H5_DLL herr_t H5G_compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id,
H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G_compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G_compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data);
-H5_DLL htri_t H5G_compact_lookup(H5O_loc_t *grp_oloc, const char *name,
+H5_DLL htri_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL herr_t H5G_compact_lookup_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL herr_t H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t n, H5O_link_t *lnk);
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G_compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
+H5_DLL H5G_obj_t H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id,
const H5O_linfo_t *linfo, hsize_t idx);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Functions that understand "dense" link storage */
-H5_DLL herr_t H5G_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5_DLL herr_t H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable);
-H5_DLL herr_t H5G_dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
+H5_DLL herr_t H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
const H5O_pline_t *pline);
-H5_DLL herr_t H5G_dense_insert(H5F_t *f, hid_t dxpl_id,
+H5_DLL herr_t H5G__dense_insert(H5F_t *f, hid_t dxpl_id,
const H5O_linfo_t *linfo, const H5O_link_t *lnk);
-H5_DLL htri_t H5G_dense_lookup(H5F_t *f, hid_t dxpl_id,
+H5_DLL htri_t H5G__dense_lookup(H5F_t *f, hid_t dxpl_id,
const H5O_linfo_t *linfo, const char *name, H5O_link_t *lnk);
-H5_DLL herr_t H5G_dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id,
+H5_DLL herr_t H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t n, H5O_link_t *lnk);
-H5_DLL herr_t H5G_dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5_DLL herr_t H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data);
-H5_DLL ssize_t H5G_dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id,
+H5_DLL ssize_t H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id,
H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
char *name, size_t size);
-H5_DLL herr_t H5G_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
+H5_DLL herr_t H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
H5RS_str_t *grp_full_path_r, const char *name);
-H5_DLL herr_t H5G_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id,
+H5_DLL herr_t H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id,
const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5G_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
+H5_DLL herr_t H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
hbool_t adj_link);
#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL H5G_obj_t H5G_dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id,
+H5_DLL H5G_obj_t H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id,
H5O_linfo_t *linfo, hsize_t idx);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Functions that understand group objects */
-H5_DLL herr_t H5G_obj_create(H5F_t *f, hid_t dxpl_id,
+H5_DLL herr_t H5G__obj_create(H5F_t *f, hid_t dxpl_id,
H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/);
-H5_DLL herr_t H5G_obj_create_real(H5F_t *f, hid_t dxpl_id,
+H5_DLL herr_t H5G__obj_create_real(H5F_t *f, hid_t dxpl_id,
const H5O_ginfo_t *ginfo, const H5O_linfo_t *linfo,
const H5O_pline_t *pline, H5G_obj_create_t *gcrt_info,
H5O_loc_t *oloc/*out*/);
-H5_DLL htri_t H5G_obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo,
+H5_DLL htri_t H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo,
hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name,
- H5O_link_t *obj_lnk, hbool_t adj_link, H5O_type_t obj_type,
- const void *crt_info, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_iterate(const H5O_loc_t *grp_oloc,
+H5_DLL herr_t H5G__obj_iterate(const H5O_loc_t *grp_oloc,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id);
-H5_DLL ssize_t H5G_obj_get_name_by_idx(H5O_loc_t *oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, char* name, size_t size, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_remove(H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r,
- const char *name, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
-H5_DLL htri_t H5G_obj_lookup(H5O_loc_t *grp_oloc, const char *name,
+H5_DLL herr_t H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id);
+H5_DLL htri_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *lnk, hid_t dxpl_id);
-H5_DLL herr_t H5G_obj_lookup_by_idx(H5O_loc_t *grp_oloc, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, H5O_link_t *lnk, hid_t dxpl_id);
/*
* These functions operate on group hierarchy names.
*/
-H5_DLL herr_t H5G_name_init(H5G_name_t *name, const char *path);
-H5_DLL herr_t H5G_name_set(H5G_name_t *loc, H5G_name_t *obj, const char *name);
-H5_DLL H5RS_str_t *H5G_build_fullpath_refstr_str(H5RS_str_t *path_r, const char *name);
+H5_DLL herr_t H5G__name_init(H5G_name_t *name, const char *path);
/*
* These functions operate on group "locations"
*/
-H5_DLL herr_t H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth);
-H5_DLL herr_t H5G_loc_insert(H5G_loc_t *grp_loc, const char *name,
+H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, const char *name,
H5G_loc_t *obj_loc, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id);
-/*
- * These functions operate on the root group
- */
-H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc);
-
/* Testing functions */
#ifdef H5G_TESTING
-H5_DLL htri_t H5G_is_empty_test(hid_t gid);
-H5_DLL htri_t H5G_has_links_test(hid_t gid, unsigned *nmsgs);
-H5_DLL htri_t H5G_has_stab_test(hid_t gid);
-H5_DLL htri_t H5G_is_new_dense_test(hid_t gid);
-H5_DLL herr_t H5G_new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count);
-H5_DLL herr_t H5G_lheap_size_test(hid_t gid, size_t *lheap_size);
-H5_DLL herr_t H5G_user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *user_path_hidden);
-H5_DLL herr_t H5G_verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent);
-H5_DLL herr_t H5G_verify_cached_stabs_test(hid_t gid);
+H5_DLL htri_t H5G__is_empty_test(hid_t gid);
+H5_DLL htri_t H5G__has_links_test(hid_t gid, unsigned *nmsgs);
+H5_DLL htri_t H5G__has_stab_test(hid_t gid);
+H5_DLL htri_t H5G__is_new_dense_test(hid_t gid);
+H5_DLL herr_t H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count);
+H5_DLL herr_t H5G__lheap_size_test(hid_t gid, size_t *lheap_size);
+H5_DLL herr_t H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *user_path_hidden);
+H5_DLL herr_t H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent);
+H5_DLL herr_t H5G__verify_cached_stabs_test(hid_t gid);
#endif /* H5G_TESTING */
#endif /* _H5Gpkg_H */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 140e22f..0c01cd2 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -105,6 +105,18 @@
#define H5G_MOUNTED(G) (H5G_mounted(G))
#endif /* H5G_PACKAGE */
+/*
+ * During name lookups (see H5G_traverse()) we sometimes want information about
+ * a symbolic link or a mount point. The normal operation is to follow the
+ * symbolic link or mount point and return information about its target.
+ */
+#define H5G_TARGET_NORMAL 0x0000
+#define H5G_TARGET_SLINK 0x0001
+#define H5G_TARGET_MOUNT 0x0002
+#define H5G_TARGET_UDLINK 0x0004
+#define H5G_TARGET_EXISTS 0x0008
+#define H5G_CRT_INTMD_GROUP 0x0010
+
/* Type of operation being performed for call to H5G_name_replace() */
typedef enum {
H5G_NAME_MOVE = 0, /* H5*move call */
@@ -141,6 +153,38 @@ typedef struct {
H5G_name_t *path; /* Group hierarchy path */
} H5G_loc_t;
+/* Typedef for path traversal operations */
+/* grp_loc is the location of the group in which the targeted object is located.
+ * name is the last component of the object's name
+ * lnk is the link between the group and the object
+ * obj_loc is the target of the traversal (or NULL if the object doesn't exist)
+ * operator_data is whatever udata was supplied when H5G_traverse was called
+ * own_loc should be set to H5G_OWN_OBJ_LOC if this callback takes ownership of obj_loc,
+ * H5G_OWN_GRP_LOC if it takes ownership of grp_loc, and H5G_OWN_NONE if obj_loc and
+ * grp_loc need to be deleted.
+ */
+typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc/*in*/, const char *name,
+ const struct H5O_link_t *lnk/*in*/, H5G_loc_t *obj_loc/*out*/, void *operator_data/*in,out*/,
+ H5G_own_loc_t *own_loc/*out*/);
+
+/* Describe kind of callback to make for each link */
+typedef enum H5G_link_iterate_op_type_t {
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ H5G_LINK_OP_OLD, /* "Old" application callback */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5G_LINK_OP_NEW /* "New" application callback */
+} H5G_link_iterate_op_type_t;
+
+typedef struct {
+ H5G_link_iterate_op_type_t op_type;
+ union {
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ H5G_iterate_t op_old; /* "Old" application callback for each link */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5L_iterate_t op_new; /* "New" application callback for each link */
+ } op_func;
+} H5G_link_iterate_t;
+
typedef struct H5G_t H5G_t;
typedef struct H5G_shared_t H5G_shared_t;
typedef struct H5G_entry_t H5G_entry_t;
@@ -150,9 +194,6 @@ typedef struct H5G_entry_t H5G_entry_t;
* call.
*/
H5_DLL struct H5O_loc_t *H5G_oloc(H5G_t *grp);
-H5_DLL herr_t H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root);
-H5_DLL herr_t H5G_root_free(H5G_t *grp);
-H5_DLL H5G_t *H5G_rootof(H5F_t *f);
H5_DLL H5G_name_t * H5G_nameof(H5G_t *grp);
H5_DLL H5F_t *H5G_fileof(H5G_t *grp);
H5_DLL H5G_t *H5G_open(const H5G_loc_t *loc, hid_t dxpl_id);
@@ -164,10 +205,45 @@ H5_DLL herr_t H5G_unmount(H5G_t *grp);
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL H5G_obj_t H5G_map_obj_type(H5O_type_t obj_type);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+/*
+ * Utility functions
+ */
+H5_DLL char *H5G_normalize(const char *name);
+
+/*
+ * Group hierarchy traversal routines
+ */
+H5_DLL herr_t H5G_traverse(const H5G_loc_t *loc, const char *name,
+ unsigned target, H5G_traverse_t op, void *op_data, hid_t lapl_id,
+ hid_t dxpl_id);
+H5_DLL herr_t H5G_iterate(hid_t loc_id, const char *group_name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
+ const H5G_link_iterate_t *lnk_op, void *op_data, hid_t lapl_id, hid_t dxpl_id);
H5_DLL herr_t H5G_visit(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, void *op_data,
hid_t lapl_id, hid_t dxpl_id);
+/*
+ * Functions that understand links in groups
+ */
+H5_DLL herr_t H5G_link_to_info(const struct H5O_link_t *lnk, H5L_info_t *linfo);
+
+/*
+ * Functions that understand group objects
+ */
+H5_DLL herr_t H5G_obj_insert(const struct H5O_loc_t *grp_oloc, const char *name,
+ struct H5O_link_t *obj_lnk, hbool_t adj_link, H5O_type_t obj_type,
+ const void *crt_info, hid_t dxpl_id);
+H5_DLL ssize_t H5G_obj_get_name_by_idx(const struct H5O_loc_t *oloc, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, char* name, size_t size, hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_remove(const struct H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r,
+ const char *name, hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_remove_by_idx(const struct H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
+H5_DLL herr_t H5G_obj_lookup_by_idx(const struct H5O_loc_t *grp_oloc, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t n, struct H5O_link_t *lnk, hid_t dxpl_id);
+
/*
* These functions operate on symbol table nodes.
*/
@@ -184,6 +260,7 @@ H5_DLL herr_t H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *en
/*
* These functions operate on group hierarchy names.
*/
+H5_DLL herr_t H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name);
H5_DLL herr_t H5G_name_replace(const struct H5O_link_t *lnk, H5G_names_op_t op,
H5F_t *src_file, H5RS_str_t *src_full_path_r, H5F_t *dst_file,
H5RS_str_t *dst_full_path_r, hid_t dxpl_id);
@@ -194,11 +271,13 @@ H5_DLL ssize_t H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size
hbool_t *cached, hid_t lapl_id, hid_t dxpl_id);
H5_DLL ssize_t H5G_get_name_by_addr(hid_t fid, hid_t lapl_id, hid_t dxpl_id,
const struct H5O_loc_t *loc, char* name, size_t size);
+H5_DLL H5RS_str_t *H5G_build_fullpath_refstr_str(H5RS_str_t *path_r, const char *name);
/*
* These functions operate on group "locations"
*/
H5_DLL herr_t H5G_loc(hid_t loc_id, H5G_loc_t *loc);
+H5_DLL herr_t H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth);
H5_DLL herr_t H5G_loc_find(const H5G_loc_t *loc, const char *name,
H5G_loc_t *obj_loc/*out*/, hid_t lapl_id, hid_t dxpl_id);
H5_DLL herr_t H5G_loc_find_by_idx(H5G_loc_t *loc, const char *group_name,
@@ -216,5 +295,13 @@ H5_DLL ssize_t H5G_loc_get_comment(H5G_loc_t *loc, const char *name,
H5_DLL herr_t H5G_loc_reset(H5G_loc_t *loc);
H5_DLL herr_t H5G_loc_free(H5G_loc_t *loc);
+/*
+ * These functions operate on the root group
+ */
+H5_DLL herr_t H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root);
+H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc);
+H5_DLL herr_t H5G_root_free(H5G_t *grp);
+H5_DLL H5G_t *H5G_rootof(H5F_t *f);
+
#endif /* _H5Gprivate_H */
diff --git a/src/H5Groot.c b/src/H5Groot.c
index a7d7e29..5ec9d3a 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -44,6 +44,41 @@
#include "H5Pprivate.h" /* Property Lists */
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
/*-------------------------------------------------------------------------
* Function: H5G_rootof
@@ -66,7 +101,7 @@
H5G_t *
H5G_rootof(H5F_t *f)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_rootof)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -119,7 +154,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
hbool_t path_init = FALSE; /* Whether path was initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_mkroot, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -131,7 +166,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
HGOTO_DONE(SUCCEED)
/* Create information needed for group nodes */
- if(H5G_node_init(f) < 0)
+ if(H5G__node_init(f) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info")
/*
@@ -159,7 +194,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
/* (Pass the FCPL which is a sub-class of the group creation property class) */
gcrt_info.gcpl_id = f->shared->fcpl_id;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
- if(H5G_obj_create(f, dxpl_id, &gcrt_info, root_loc.oloc/*out*/) < 0)
+ if(H5G__obj_create(f, dxpl_id, &gcrt_info, root_loc.oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
if(1 != H5O_link(root_loc.oloc, 1, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)")
@@ -220,7 +255,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
/* Check if the symbol table message is valid, and replace with the
* cached symbol table if necessary */
- if(H5G_stab_valid(root_loc.oloc, dxpl_id, &cached_stab) < 0)
+ if(H5G__stab_valid(root_loc.oloc, dxpl_id, &cached_stab) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table")
} /* end if */
#endif /* H5_STRICT_FORMAT_CHECKS */
@@ -258,7 +293,7 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root)
} /* end if */
/* Create the path names for the root group's entry */
- H5G_name_init(root_loc.path, "/");
+ H5G__name_init(root_loc.path, "/");
path_init = TRUE;
f->shared->root_grp->shared->fo_count = 1;
@@ -312,7 +347,7 @@ done:
herr_t
H5G_root_free(H5G_t *grp)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5G_root_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(grp && grp->shared);
@@ -348,7 +383,7 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc)
H5G_t *root_grp; /* Pointer to root group's info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_root_loc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(loc);
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 37c54e4..bbbbfcf 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -17,19 +17,34 @@
* Friday, September 19, 1997
*
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Gpkg.h" /* Groups */
#include "H5HLprivate.h" /* Local Heaps */
#include "H5MMprivate.h" /* Memory management */
-/* Private typedefs */
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
/* User data for finding link information from B-tree */
typedef struct {
/* downward */
@@ -74,11 +89,35 @@ typedef struct H5G_bt_it_lbi_t {
hbool_t found; /*whether we found the link */
} H5G_bt_it_lbi_t;
-/* Private prototypes */
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
- * Function: H5G_stab_create_components
+ * Function: H5G__stab_create_components
*
* Purpose: Creates the components for a new, empty, symbol table (name heap
* and B-tree). The caller can specify an initial size for the
@@ -97,13 +136,13 @@ typedef struct H5G_bt_it_lbi_t {
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id)
+H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
size_t name_offset; /* Offset of "" name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_create_components, FAIL)
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -140,11 +179,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_create_components() */
+} /* end H5G__stab_create_components() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_create
+ * Function: H5G__stab_create
*
* Purpose: Creates a new empty symbol table (object header, name heap,
* and B-tree). The caller can specify an initial size for the
@@ -164,14 +203,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
+H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
H5O_stab_t *stab)
{
size_t heap_hint; /* Local heap size hint */
size_t size_hint; /* Local heap size hint */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_stab_create, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/*
* Check arguments.
@@ -189,7 +228,7 @@ H5G_stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
size_hint = MAX(heap_hint, H5HL_SIZEOF_FREE(grp_oloc->file) + 2);
/* Go create the B-tree & local heap */
- if(H5G_stab_create_components(grp_oloc->file, stab, size_hint, dxpl_id) < 0)
+ if(H5G__stab_create_components(grp_oloc->file, stab, size_hint, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components")
/*
@@ -201,11 +240,11 @@ H5G_stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, const H5O_ginfo_t *ginfo,
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_stab_create() */
+} /* end H5G__stab_create() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_insert_real
+ * Function: H5G__stab_insert_real
*
* Purpose: Insert a new symbol into a table.
* The name of the new symbol is NAME and its symbol
@@ -220,7 +259,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_insert_real(H5F_t *f, H5O_stab_t *stab, const char *name,
+H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name,
H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
hid_t dxpl_id)
{
@@ -228,7 +267,7 @@ H5G_stab_insert_real(H5F_t *f, H5O_stab_t *stab, const char *name,
H5G_bt_ins_t udata; /* Data to pass through B-tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_insert_real, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(f);
@@ -257,11 +296,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_insert_real() */
+} /* end H5G__stab_insert_real() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_insert
+ * Function: H5G__stab_insert
*
* Purpose: Insert a new symbol into the table described by GRP_ENT in
* file F. The name of the new symbol is NAME and its symbol
@@ -276,14 +315,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_insert(const H5O_loc_t *grp_oloc, const char *name,
+H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info,
hid_t dxpl_id)
{
H5O_stab_t stab; /* Symbol table message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_stab_insert, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
@@ -294,17 +333,17 @@ H5G_stab_insert(const H5O_loc_t *grp_oloc, const char *name,
if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table")
- if(H5G_stab_insert_real(grp_oloc->file, &stab, name, obj_lnk, obj_type,
+ if(H5G__stab_insert_real(grp_oloc->file, &stab, name, obj_lnk, obj_type,
crt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name")
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, H5_ITER_ERROR)
-} /* end H5G_stab_insert() */
+} /* end H5G__stab_insert() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_remove
+ * Function: H5G__stab_remove
*
* Purpose: Remove NAME from a symbol table.
*
@@ -316,7 +355,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_remove(H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+H5G__stab_remove(const H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
const char *name)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
@@ -324,7 +363,7 @@ H5G_stab_remove(H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
H5G_bt_rm_t udata; /*data to pass through B-tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_remove, FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(loc && loc->file);
HDassert(name && *name);
@@ -352,11 +391,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_remove() */
+} /* end H5G__stab_remove() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_remove_by_idx
+ * Function: H5G__stab_remove_by_idx
*
* Purpose: Remove NAME from a symbol table, according to the name index.
*
@@ -368,7 +407,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_remove_by_idx(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
+H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
H5_iter_order_t order, hsize_t n)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
@@ -378,12 +417,12 @@ H5G_stab_remove_by_idx(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_
hbool_t lnk_copied = FALSE; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_remove_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(grp_oloc && grp_oloc->file);
/* Look up name of link to remove, by index */
- if(H5G_stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk, dxpl_id) < 0)
+ if(H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get link information")
lnk_copied = TRUE;
@@ -414,11 +453,11 @@ done:
H5O_msg_reset(H5O_LINK_ID, &obj_lnk);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_remove_by_idx() */
+} /* end H5G__stab_remove_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_delete
+ * Function: H5G__stab_delete
*
* Purpose: Delete entire symbol table information from file
*
@@ -432,13 +471,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
+H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
H5G_bt_rm_t udata; /*data to pass through B-tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_delete, FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(f);
HDassert(stab);
@@ -472,11 +511,11 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_delete() */
+} /* end H5G__stab_delete() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_iterate
+ * Function: H5G__stab_iterate
*
* Purpose: Iterate over the objects in a group
*
@@ -488,7 +527,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
+H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data)
{
H5HL_t *heap = NULL; /* Local heap for group */
@@ -496,7 +535,7 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
H5G_link_table_t ltable = {0, NULL}; /* Link table */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_stab_iterate, dxpl_id, oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, oloc->addr, FAIL)
/* Sanity check */
HDassert(oloc);
@@ -515,7 +554,7 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
if(order != H5_ITER_DEC) {
H5G_bt_it_it_t udata; /* User data to pass to B-tree callback */
- /* Build udata to pass through H5B_iterate() to H5G_node_iterate() */
+ /* Build udata to pass through H5B_iterate() to H5G__node_iterate() */
udata.heap = heap;
udata.skip = skip;
udata.final_ent = last_lnk;
@@ -523,7 +562,7 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
udata.op_data = op_data;
/* Iterate over the group members */
- if((ret_value = H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_iterate, &udata, NULL)) < 0)
+ if((ret_value = H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_iterate, &udata, NULL)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
/* Check for too high of a starting index (ex post facto :-) */
@@ -534,13 +573,13 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
else {
H5G_bt_it_bt_t udata; /* User data to pass to B-tree callback */
- /* Build udata to pass through H5B_iterate() to H5G_node_build_table() */
+ /* Build udata to pass through H5B_iterate() to H5G__node_build_table() */
udata.alloc_nlinks = 0;
udata.heap = heap;
udata.ltable = &ltable;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_build_table, &udata, NULL) < 0)
+ if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_build_table, &udata, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to build link table")
/* Check for skipping out of bounds */
@@ -548,11 +587,11 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound")
/* Sort link table in correct iteration order */
- if(H5G_link_sort_table(&ltable, H5_INDEX_NAME, order) < 0)
+ if(H5G__link_sort_table(&ltable, H5_INDEX_NAME, order) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages")
/* Iterate over links in table */
- if((ret_value = H5G_link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
+ if((ret_value = H5G__link_iterate_table(&ltable, skip, last_lnk, op, op_data)) < 0)
HERROR(H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
} /* end else */
@@ -560,15 +599,15 @@ done:
/* Release resources */
if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
- if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
+ if(ltable.lnks && H5G__link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_stab_iterate() */
+} /* end H5G__stab_iterate() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_count
+ * Function: H5G__stab_count
*
* Purpose: Count the # of links in a group
*
@@ -580,12 +619,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
+H5G__stab_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
{
H5O_stab_t stab; /* Info about symbol table */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_TAG(H5G_stab_count, dxpl_id, oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, oloc->addr, FAIL)
/* Sanity check */
HDassert(oloc);
@@ -599,16 +638,16 @@ H5G_stab_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_sumup, num_objs, NULL) < 0)
+ if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, num_objs, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_stab_count() */
+} /* end H5G__stab_count() */
/*-------------------------------------------------------------------------
- * Function: H5G_stab_bh_size
+ * Function: H5G__stab_bh_size
*
* Purpose: Retrieve storage for btree and heap (1.6)
*
@@ -620,14 +659,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
+H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
H5_ih_info_t *bh_info)
{
hsize_t snode_size; /* Symbol table node size */
H5B_info_t bt_info; /* B-tree node info */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5G_stab_bh_size, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -638,7 +677,7 @@ H5G_stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
snode_size = 0;
/* Get the B-tree & symbol table node size info */
- if(H5B_get_info(f, dxpl_id, H5B_SNODE, stab->btree_addr, &bt_info, H5G_node_iterate_size, &snode_size, NULL) < 0)
+ if(H5B_get_info(f, dxpl_id, H5B_SNODE, stab->btree_addr, &bt_info, H5G__node_iterate_size, &snode_size, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Add symbol table & B-tree node sizes to index info */
@@ -650,7 +689,7 @@ H5G_stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_bh_size() */
+} /* end H5G__stab_bh_size() */
/*-------------------------------------------------------------------------
@@ -674,7 +713,7 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
size_t name_off; /* Offset of name in heap */
const char *name; /* Pointer to name string in heap */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_stab_get_name_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ent);
@@ -692,7 +731,7 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
/*-------------------------------------------------------------------------
- * Function: H5G_stab_get_name_by_idx
+ * Function: H5G__stab_get_name_by_idx
*
* Purpose: Returns the name of objects in the group by giving index.
*
@@ -705,7 +744,7 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
+H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
char* name, size_t size, hid_t dxpl_id)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
@@ -714,7 +753,10 @@ H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
hbool_t udata_valid = FALSE; /* Whether iteration information is valid */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_get_name_by_idx, FAIL)
+ /* Portably clear udata struct (before FUNC_ENTER) */
+ HDmemset(&udata, 0, sizeof(udata));
+
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(oloc);
@@ -732,7 +774,7 @@ H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
hsize_t nlinks = 0; /* Number of links in group */
/* Iterate over the symbol table nodes, to count the links */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_sumup, &nlinks, NULL) < 0)
+ if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Map decreasing iteration order index to increasing iteration order index */
@@ -748,7 +790,7 @@ H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
udata_valid = TRUE;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_by_idx, &udata, NULL) < 0)
+ if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata, NULL) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
/* If we don't know the name now, we almost certainly went out of bounds */
@@ -775,7 +817,7 @@ done:
H5MM_xfree(udata.name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_get_name_by_idx() */
+} /* end H5G__stab_get_name_by_idx() */
/*-------------------------------------------------------------------------
@@ -798,12 +840,12 @@ H5G_stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
H5G_stab_fnd_ud_t *udata = (H5G_stab_fnd_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_stab_lookup_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for setting link info */
if(udata->lnk)
/* Convert the entry to a link */
- if(H5G_ent_to_link(udata->lnk, udata->heap, ent, udata->name) < 0)
+ if(H5G__ent_to_link(udata->lnk, udata->heap, ent, udata->name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link")
done:
@@ -812,7 +854,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_stab_lookup
+ * Function: H5G__stab_lookup
*
* Purpose: Look up an object relative to a group, using symbol table
*
@@ -825,7 +867,7 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5G_stab_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
+H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
hid_t dxpl_id)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
@@ -834,7 +876,7 @@ H5G_stab_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
H5O_stab_t stab; /* Symbol table message */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_lookup, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
@@ -870,7 +912,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_lookup() */
+} /* end H5G__stab_lookup() */
/*-------------------------------------------------------------------------
@@ -894,7 +936,7 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
const char *name; /* Pointer to name string in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_stab_lookup_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(ent);
@@ -905,7 +947,7 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
HDassert(name);
/* Convert the entry to a link */
- if(H5G_ent_to_link(udata->lnk, udata->heap, ent, name) < 0)
+ if(H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link")
udata->found = TRUE;
@@ -915,7 +957,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_stab_lookup_by_idx
+ * Function: H5G__stab_lookup_by_idx
*
* Purpose: Look up an object in a group, according to the name index
*
@@ -928,7 +970,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
+H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
H5O_link_t *lnk, hid_t dxpl_id)
{
H5HL_t *heap = NULL; /* Pointer to local heap */
@@ -936,7 +978,7 @@ H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
H5O_stab_t stab; /* Symbol table message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_stab_lookup_by_idx, FAIL)
+ FUNC_ENTER_PACKAGE
/* check arguments */
HDassert(grp_oloc && grp_oloc->file);
@@ -955,7 +997,7 @@ H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
hsize_t nlinks = 0; /* Number of links in group */
/* Iterate over the symbol table nodes, to count the links */
- if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_sumup, &nlinks, NULL) < 0)
+ if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
/* Map decreasing iteration order index to increasing iteration order index */
@@ -971,7 +1013,7 @@ H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
udata.found = FALSE;
/* Iterate over the group members */
- if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_by_idx, &udata, NULL) < 0)
+ if(H5B_iterate(grp_oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata, NULL) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed")
/* If we didn't find the link, we almost certainly went out of bounds */
@@ -984,18 +1026,24 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_lookup_by_idx() */
+} /* end H5G__stab_lookup_by_idx() */
#ifndef H5_STRICT_FORMAT_CHECKS
/*-------------------------------------------------------------------------
- * Function: H5G_stab_valid
+ * Function: H5G__stab_valid
*
* Purpose: Verify that a group's symbol table message is valid. If
* provided, the addresses in alt_stab will be tried if the
* addresses in the group's stab message are invalid, and
* the stab message will be updated if necessary.
*
+ * NOTE: This function is only called when strict format
+ * checks are disabled. This is so that, when strict
+ * format checks are enabled, errors in the symbol table
+ * messages are not fixed by this function and are instead
+ * reported by the library.
+ *
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
@@ -1005,14 +1053,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab)
+H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab)
{
H5O_stab_t stab; /* Current symbol table */
H5HL_t *heap = NULL; /* Pointer to local heap */
hbool_t changed = FALSE; /* Whether stab has been modified */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_stab_valid, dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
/* Read the symbol table message */
if(NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab, dxpl_id))
@@ -1059,7 +1107,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_stab_valid */
+} /* end H5G__stab_valid */
#endif /* H5_STRICT_FORMAT_CHECKS */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1084,7 +1132,7 @@ H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata)
H5G_bt_it_gtbi_t *udata = (H5G_bt_it_gtbi_t *)_udata;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_stab_get_type_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(ent);
@@ -1124,7 +1172,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_get_objtype_by_idx
+ * Function: H5G__stab_get_type_by_idx
*
* Purpose: Private function for H5Gget_objtype_by_idx.
* Returns the type of objects in the group by giving index.
@@ -1139,13 +1187,13 @@ done:
*-------------------------------------------------------------------------
*/
H5G_obj_t
-H5G_stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
+H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
{
H5O_stab_t stab; /* Info about local heap & B-tree */
H5G_bt_it_gtbi_t udata; /* User data for B-tree callback */
H5G_obj_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5G_stab_get_type_by_idx, dxpl_id, oloc->addr, H5G_UNKNOWN)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, oloc->addr, H5G_UNKNOWN)
/* Sanity check */
HDassert(oloc);
@@ -1163,7 +1211,7 @@ H5G_stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
udata.type = H5G_UNKNOWN;
/* Iterate over the group members */
- if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G_node_by_idx, &udata, NULL) < 0)
+ if(H5B_iterate(oloc->file, dxpl_id, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata, NULL) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "iteration operator failed")
/* If we don't know the type now, we almost certainly went out of bounds */
@@ -1175,6 +1223,6 @@ H5G_stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, H5G_UNKNOWN)
-} /* end H5G_stab_get_type_by_idx() */
+} /* end H5G__stab_get_type_by_idx() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index b6e3e141..dfdefda 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -74,11 +74,11 @@
/*--------------------------------------------------------------------------
NAME
- H5G_is_empty_test
+ H5G__is_empty_test
PURPOSE
Determine whether a group contains no objects
USAGE
- htri_t H5G_is_empty_test(gid)
+ htri_t H5G__is_empty_test(gid)
hid_t gid; IN: group to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -92,14 +92,14 @@
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5G_is_empty_test(hid_t gid)
+H5G__is_empty_test(hid_t gid)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = FALSE; /* Indicate that a header message is present */
htri_t linfo_exists = FALSE;/* Indicate that the 'link info' message is present */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5G_is_empty_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -133,7 +133,7 @@ H5G_is_empty_test(hid_t gid)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found")
/* Get the link info */
- if(H5G_obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
+ if(H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
@@ -171,7 +171,7 @@ H5G_is_empty_test(hid_t gid)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read symbol table message")
/* Get the count of links in the group */
- if(H5G_stab_count(&(grp->oloc), &nlinks, H5AC_dxpl_id) < 0)
+ if(H5G__stab_count(&(grp->oloc), &nlinks, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to count links")
/* Check for link count */
@@ -181,16 +181,16 @@ H5G_is_empty_test(hid_t gid)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_is_empty_test() */
+} /* H5G__is_empty_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_has_links_test
+ H5G__has_links_test
PURPOSE
Determine whether a group contains link messages
USAGE
- htri_t H5G_has_links_test(gid)
+ htri_t H5G__has_links_test(gid)
hid_t gid; IN: group to check
unsigned *nmsgs; OUT: # of link messages in header
RETURNS
@@ -204,13 +204,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5G_has_links_test(hid_t gid, unsigned *nmsgs)
+H5G__has_links_test(hid_t gid, unsigned *nmsgs)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5G_has_links_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -240,16 +240,16 @@ H5G_has_links_test(hid_t gid, unsigned *nmsgs)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_has_links_test() */
+} /* H5G__has_links_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_has_stab_test
+ H5G__has_stab_test
PURPOSE
Determine whether a group contains a symbol table message
USAGE
- htri_t H5G_has_stab_test(gid)
+ htri_t H5G__has_stab_test(gid)
hid_t gid; IN: group to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -262,13 +262,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5G_has_stab_test(hid_t gid)
+H5G__has_stab_test(hid_t gid)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5G_has_stab_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -288,16 +288,16 @@ H5G_has_stab_test(hid_t gid)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_has_stab_test() */
+} /* H5G__has_stab_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_is_new_dense_test
+ H5G__is_new_dense_test
PURPOSE
Determine whether a group is in the "new" format and dense
USAGE
- htri_t H5G_is_new_dense_test(gid)
+ htri_t H5G__is_new_dense_test(gid)
hid_t gid; IN: group to check
RETURNS
Non-negative TRUE/FALSE on success, negative on failure
@@ -312,13 +312,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5G_is_new_dense_test(hid_t gid)
+H5G__is_new_dense_test(hid_t gid)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5G_is_new_dense_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -343,7 +343,7 @@ H5G_is_new_dense_test(hid_t gid)
H5O_linfo_t linfo; /* Link info message */
/* Get the link info */
- if(H5G_obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
+ if(H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
@@ -355,16 +355,16 @@ H5G_is_new_dense_test(hid_t gid)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_is_new_dense_test() */
+} /* H5G__is_new_dense_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_new_dense_info_test
+ H5G__new_dense_info_test
PURPOSE
Retrieve information about the state of the new "dense" storage for groups
USAGE
- herr_t H5G_new_dense_info_test(gid, name_count, corder_count)
+ herr_t H5G__new_dense_info_test(gid, name_count, corder_count)
hid_t gid; IN: group to check
hsize_t *name_count; OUT: Number of links in name index
hsize_t *corder_count; OUT: Number of links in creation order index
@@ -380,7 +380,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5G_new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
+H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
{
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
@@ -388,7 +388,7 @@ H5G_new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
H5G_t *grp = NULL; /* Pointer to group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_new_dense_info_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -398,7 +398,7 @@ H5G_new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
H5_BEGIN_TAG(H5AC_dxpl_id, grp->oloc.addr, FAIL);
/* Get the link info */
- if(H5G_obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
+ if(H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info")
/* Check for 'dense' link storage file addresses being defined */
@@ -428,6 +428,9 @@ H5G_new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
else
*corder_count = 0;
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
done:
/* Release resources */
if(bt2_name && H5B2_close(bt2_name, H5AC_dxpl_id) < 0)
@@ -435,20 +438,17 @@ done:
if(bt2_corder && H5B2_close(bt2_corder, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
- /* Reset metadata tag in dxpl_id */
- H5_END_TAG(FAIL);
-
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_new_dense_info_test() */
+} /* H5G__new_dense_info_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_lheap_size_test
+ H5G__lheap_size_test
PURPOSE
Determine the size of a local heap for a group
USAGE
- herr_t H5G_lheap_size_test(gid, lheap_size)
+ herr_t H5G__lheap_size_test(gid, lheap_size)
hid_t gid; IN: group to check
size_t *lheap_size; OUT: Size of local heap
RETURNS
@@ -462,13 +462,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5G_lheap_size_test(hid_t gid, size_t *lheap_size)
+H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
{
H5G_t *grp = NULL; /* Pointer to group */
H5O_stab_t stab; /* Symbol table message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_lheap_size_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Get group structure */
if(NULL == (grp = (H5G_t *)H5I_object_verify(gid, H5I_GROUP)))
@@ -484,16 +484,16 @@ H5G_lheap_size_test(hid_t gid, size_t *lheap_size)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_lheap_size_test() */
+} /* H5G__lheap_size_test() */
/*--------------------------------------------------------------------------
NAME
- H5G_user_path_test
+ H5G__user_path_test
PURPOSE
Retrieve the user path for an ID
USAGE
- herr_t H5G_user_path_test(obj_id, user_path, user_path_len)
+ herr_t H5G__user_path_test(obj_id, user_path, user_path_len)
hid_t obj_id; IN: ID to check
char *user_path; OUT: Pointer to buffer for User path
size_t *user_path_len; OUT: Size of user path
@@ -510,13 +510,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5G_user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *obj_hidden)
+H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *obj_hidden)
{
void *obj_ptr; /* Pointer to object for ID */
H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_user_path_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(user_path_len);
@@ -583,11 +583,11 @@ H5G_user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigne
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_user_path_test() */
+} /* H5G__user_path_test() */
/*-------------------------------------------------------------------------
- * Function: H5G_verify_cached_stab_test
+ * Function: H5G__verify_cached_stab_test
*
* Purpose: Check that a that the provided group entry contains a
* cached symbol table entry, that the entry matches that in
@@ -603,13 +603,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
+H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
{
H5O_stab_t stab; /* Symbol table */
H5HL_t *heap = NULL; /* Pointer to local heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5G_verify_cached_stab_test, H5AC_ind_dxpl_id, grp_oloc->addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(H5AC_ind_dxpl_id, grp_oloc->addr, FAIL)
/* Verify that stab info is cached in ent */
if(ent->type != H5G_CACHED_STAB)
@@ -639,7 +639,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5G_verify_cached_stab_test() */
+} /* end H5G__verify_cached_stab_test() */
/*-------------------------------------------------------------------------
@@ -670,7 +670,7 @@ H5G_verify_cached_stabs_test_cb(H5F_t *f, hid_t dxpl_id,
unsigned i;
int ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_verify_cached_stabs_test_cb, H5_ITER_ERROR)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -738,7 +738,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_verify_cached_stabs_test
+ * Function: H5G__verify_cached_stabs_test
*
* Purpose: If the provided group contains a symbol table, verifies
* that all links in the group contain cached symbol table
@@ -756,7 +756,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_verify_cached_stabs_test(hid_t gid)
+H5G__verify_cached_stabs_test(hid_t gid)
{
H5G_t *grp = NULL; /* Group */
htri_t stab_exists;
@@ -765,7 +765,7 @@ H5G_verify_cached_stabs_test(hid_t gid)
haddr_t prev_tag = HADDR_UNDEF; /* Previous metadata tag */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_verify_cached_stabs_test, FAIL)
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(gid >= 0);
@@ -804,5 +804,5 @@ H5G_verify_cached_stabs_test(hid_t gid)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_verify_cached_stabs_test() */
+} /* end H5G__verify_cached_stabs_test() */
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 4397d1c..291734e 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -23,15 +23,21 @@
*
*-------------------------------------------------------------------------
*/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Gpkg.h" /* Groups */
#include "H5HLprivate.h" /* Local Heaps */
#include "H5Iprivate.h" /* IDs */
@@ -40,7 +46,15 @@
#include "H5Ppublic.h" /* Property Lists */
#include "H5WBprivate.h" /* Wrapped Buffers */
-/* Private typedefs */
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
/* User data for path traversal routine */
typedef struct {
@@ -52,11 +66,15 @@ typedef struct {
hbool_t exists; /* Indicate if object exists */
} H5G_trav_slink_t;
-/* Private macros */
-/* Local variables */
+/********************/
+/* Package Typedefs */
+/********************/
-/* PRIVATE PROTOTYPES */
+
+/********************/
+/* Local Prototypes */
+/********************/
static herr_t H5G_traverse_slink_cb(H5G_loc_t *grp_loc, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/);
@@ -66,11 +84,26 @@ static herr_t H5G_traverse_ud(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
static herr_t H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
H5G_loc_t *obj_loc/*in,out*/, unsigned target, size_t *nlinks/*in,out*/,
hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id);
-static herr_t H5G_traverse_mount(H5G_loc_t *loc/*in,out*/);
static herr_t H5G_traverse_real(const H5G_loc_t *loc, const char *name,
unsigned target, size_t *nlinks, H5G_traverse_t op, void *op_data,
hid_t lapl_id, hid_t dxpl_id);
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
/*-------------------------------------------------------------------------
* Function: H5G_traverse_slink_cb
@@ -93,7 +126,7 @@ H5G_traverse_slink_cb(H5G_loc_t UNUSED *grp_loc, const char UNUSED *name,
H5G_trav_slink_t *udata = (H5G_trav_slink_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_slink_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for dangling soft link */
if(obj_loc == NULL) {
@@ -149,7 +182,7 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
hid_t cur_grp = (-1);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_ud)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(grp_loc);
@@ -291,7 +324,7 @@ H5G_traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
hbool_t tmp_grp_loc_set = FALSE; /* Flag to indicate that tmp group location is initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_slink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(grp_loc);
@@ -347,87 +380,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_traverse_mount
- *
- * Purpose: If LNK is a mount point then copy the entry for the root
- * group of the mounted file into LNK.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Tuesday, October 6, 1998
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5G_traverse_mount(H5G_loc_t *obj_loc/*in,out*/)
-{
- H5F_t *parent = obj_loc->oloc->file, /* File of object */
- *child = NULL; /* Child file */
- unsigned lt, rt, md = 0; /* Binary search indices */
- int cmp;
- H5O_loc_t *oloc = NULL; /* Object location for mount points */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_traverse_mount, FAIL)
-
- /* Sanity check */
- HDassert(obj_loc);
-
- /*
- * The loop is necessary because we might have file1 mounted at the root
- * of file2, which is mounted somewhere in file3.
- */
- do {
- /*
- * Use a binary search to find the potential mount point in the mount
- * table for the parent
- */
- lt = 0;
- rt = parent->shared->mtab.nmounts;
- cmp = -1;
- while(lt < rt && cmp) {
- md = (lt + rt) / 2;
- oloc = H5G_oloc(parent->shared->mtab.child[md].group);
- cmp = H5F_addr_cmp(obj_loc->oloc->addr, oloc->addr);
- if(cmp < 0)
- rt = md;
- else
- lt = md + 1;
- } /* end while */
-
- /* Copy root info over to ENT */
- if(0 == cmp) {
- /* Get the child file */
- child = parent->shared->mtab.child[md].file;
-
- /* Get the location for the root group in the child's file */
- oloc = H5G_oloc(child->shared->root_grp);
-
- /* Release the mount point */
- if(H5O_loc_free(obj_loc->oloc) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location")
-
- /* Copy the entry for the root group */
- if(H5O_loc_copy(obj_loc->oloc, oloc, H5_COPY_DEEP) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location")
-
- /* In case the shared root group info points to a different file handle
- * than the child, modify obj_loc */
- obj_loc->oloc->file = child;
-
- /* Switch to child's file */
- parent = child;
- } /* end if */
- } while(!cmp);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_traverse_mount() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_traverse_special
+ * Function: H5G__traverse_special
*
* Purpose: Handle traversing special link situations
*
@@ -440,13 +393,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
+H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
unsigned target, size_t *nlinks, hbool_t last_comp,
H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_traverse_special, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(grp_loc);
@@ -493,7 +446,7 @@ H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
*/
if(H5F_addr_defined(obj_loc->oloc->addr) &&
(0 == (target & H5G_TARGET_MOUNT) || !last_comp)) {
- if(H5G_traverse_mount(obj_loc/*in,out*/) < 0)
+ if(H5F_traverse_mount(obj_loc->oloc/*in,out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "mount point traversal failed")
} /* end if */
@@ -507,7 +460,7 @@ H5G_traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_traverse_special() */
+} /* end H5G__traverse_special() */
/*-------------------------------------------------------------------------
@@ -549,7 +502,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
hbool_t last_comp = FALSE; /* Flag to indicate that a component is the last component in the name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_traverse_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check parameters */
HDassert(_loc);
@@ -608,7 +561,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Traverse the path */
- while((name = H5G_component(name, &nchars)) && *name) {
+ while((name = H5G__component(name, &nchars)) && *name) {
const char *s; /* Temporary string pointer */
htri_t lookup_status; /* Status from object lookup */
hbool_t obj_exists; /* Whether the object exists */
@@ -629,7 +582,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
} /* end if */
/* Check if this is the last component of the name */
- if(!((s = H5G_component(name + nchars, NULL)) && *s))
+ if(!((s = H5G__component(name + nchars, NULL)) && *s))
last_comp = TRUE;
/* If there's valid information in the link, reset it */
@@ -639,7 +592,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
} /* end if */
/* Get information for object in current group */
- if((lookup_status = H5G_obj_lookup(grp_loc.oloc, comp, &lnk/*out*/, dxpl_id)) < 0)
+ if((lookup_status = H5G__obj_lookup(grp_loc.oloc, comp, &lnk/*out*/, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component")
obj_exists = FALSE;
@@ -651,7 +604,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
link_valid = TRUE;
/* Build object location from the link */
- if(H5G_link_to_loc(&grp_loc, &lnk, &obj_loc) < 0)
+ if(H5G__link_to_loc(&grp_loc, &lnk, &obj_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location")
obj_loc_valid = TRUE;
@@ -660,7 +613,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
- if(H5G_traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, &obj_exists, lapl_id, dxpl_id) < 0)
+ if(H5G__traverse_special(&grp_loc, &lnk, target, nlinks, last_comp, &obj_loc, &obj_exists, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed")
} /* end if */
@@ -726,7 +679,7 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Check for the parent group having a link info message */
/* (OK if not found) */
/* Get the link info for parent group */
- if((exists = H5G_obj_get_linfo(grp_loc.oloc, &par_linfo, dxpl_id)) < 0)
+ if((exists = H5G__obj_get_linfo(grp_loc.oloc, &par_linfo, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
if(exists) {
/* Only keep the creation order information from the parent
@@ -762,11 +715,11 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
gcrt_info.gcpl_id = H5P_GROUP_CREATE_DEFAULT;
gcrt_info.cache_type = H5G_NOTHING_CACHED;
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
- if(H5G_obj_create_real(grp_oloc.file, dxpl_id, ginfo, linfo, pline, &gcrt_info, obj_loc.oloc/*out*/) < 0)
+ if(H5G__obj_create_real(grp_oloc.file, dxpl_id, ginfo, linfo, pline, &gcrt_info, obj_loc.oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
/* Insert new group into current group's symbol table */
- if(H5G_loc_insert(&grp_loc, comp, &obj_loc, H5O_TYPE_GROUP, &gcrt_info, dxpl_id) < 0)
+ if(H5G__loc_insert(&grp_loc, comp, &obj_loc, H5O_TYPE_GROUP, &gcrt_info, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert intermediate group")
/* Decrement refcount on intermediate group's object header in memory */
@@ -786,13 +739,16 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* Reset any non-default object header messages */
if(ginfo != &def_ginfo)
- if(H5O_msg_reset(H5O_GINFO_ID, ginfo) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_reset(H5O_GINFO_ID, (void *)ginfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message")
if(linfo != &def_linfo)
- if(H5O_msg_reset(H5O_LINFO_ID, linfo) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_reset(H5O_LINFO_ID, (void *)linfo) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message")
if(pline != &def_pline)
- if(H5O_msg_reset(H5O_PLINE_ID, pline) < 0)
+ /* (Casting away const OK - QAK) */
+ if(H5O_msg_reset(H5O_PLINE_ID, (void *)pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message")
} /* end if */
else
@@ -879,7 +835,7 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver
H5P_genplist_t *lapl; /* Property list with value for nlinks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_traverse, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
if(!name || !*name)
diff --git a/src/H5HF.c b/src/H5HF.c
index 23e15c2..801fa8c 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -99,7 +99,7 @@ H5FL_DEFINE_STATIC(H5HF_t);
herr_t
H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_op_read)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Perform "read", using memcpy() */
HDmemcpy(op_data, obj, obj_len);
@@ -124,7 +124,7 @@ H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
herr_t
H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_op_write)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Perform "write", using memcpy() */
HDmemcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
@@ -155,7 +155,7 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
haddr_t fh_addr; /* Heap header address */
H5HF_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
@@ -225,7 +225,7 @@ H5HF_open(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
H5HF_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -293,7 +293,7 @@ done:
herr_t
H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5HF_get_id_len)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -324,7 +324,7 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
herr_t
H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5HF_get_heap_addr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -360,7 +360,8 @@ H5HF_insert(H5HF_t *fh, hid_t dxpl_id, size_t size, const void *obj,
H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5HF_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
+
#ifdef QAK
HDfprintf(stderr, "%s: size = %Zu\n", FUNC, size);
#endif /* QAK */
@@ -433,7 +434,7 @@ H5HF_get_obj_len(H5HF_t *fh, hid_t dxpl_id, const void *_id, size_t *obj_len_p)
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_get_obj_len, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -501,7 +502,7 @@ H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj/*out*/)
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_read, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -579,7 +580,7 @@ H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *_id, hbool_t UNUSED *id_changed,
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
@@ -654,7 +655,7 @@ H5HF_op(H5HF_t *fh, hid_t dxpl_id, const void *_id, H5HF_operator_t op,
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_op, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -719,7 +720,7 @@ H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *_id)
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
@@ -787,7 +788,7 @@ H5HF_close(H5HF_t *fh, hid_t dxpl_id)
haddr_t heap_addr = HADDR_UNDEF; /* Address of heap (for deletion) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -891,7 +892,7 @@ H5HF_delete(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr)
H5HF_hdr_t *hdr = NULL; /* The fractal heap header information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index bce58b7..023344c 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -211,7 +211,7 @@ H5HF_huge_bt2_crt_context(void *_f)
H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -252,7 +252,7 @@ H5HF_huge_bt2_dst_context(void *_ctx)
{
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -283,7 +283,7 @@ H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED add
H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -321,7 +321,7 @@ done:
herr_t
H5HF_huge_bt2_indir_found(const void *nrecord, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_found)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %Hu}\n", "H5HF_huge_bt2_indir_found",
@@ -355,7 +355,7 @@ H5HF_huge_bt2_indir_remove(const void *nrecord, void *_udata)
H5HF_huge_remove_ud1_t *udata = (H5HF_huge_remove_ud1_t *)_udata; /* User callback data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_indir_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
@@ -385,7 +385,7 @@ done:
static herr_t
H5HF_huge_bt2_indir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5HF_huge_bt2_indir_rec_t *)nrecord = *(const H5HF_huge_bt2_indir_rec_t *)udata;
@@ -410,7 +410,7 @@ H5HF_huge_bt2_indir_store(void *nrecord, const void *udata)
static herr_t
H5HF_huge_bt2_indir_compare(const void *_rec1, const void *_rec2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
{
@@ -444,7 +444,7 @@ H5HF_huge_bt2_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -477,7 +477,7 @@ H5HF_huge_bt2_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_indir_rec_t *nrecord = (H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -511,7 +511,7 @@ H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl
{
const H5HF_huge_bt2_indir_rec_t *nrecord = (const H5HF_huge_bt2_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_indir_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->id);
@@ -537,7 +537,7 @@ H5HF_huge_bt2_indir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl
herr_t
H5HF_huge_bt2_filt_indir_found(const void *nrecord, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_found)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu, %Hu}\n", "H5HF_huge_bt2_filt_indir_found",
@@ -573,7 +573,7 @@ H5HF_huge_bt2_filt_indir_remove(const void *nrecord, void *_udata)
H5HF_huge_remove_ud1_t *udata = (H5HF_huge_remove_ud1_t *)_udata; /* User callback data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_filt_indir_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->len) < 0)
@@ -603,7 +603,7 @@ done:
static herr_t
H5HF_huge_bt2_filt_indir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5HF_huge_bt2_filt_indir_rec_t *)nrecord = *(const H5HF_huge_bt2_filt_indir_rec_t *)udata;
@@ -628,7 +628,7 @@ H5HF_huge_bt2_filt_indir_store(void *nrecord, const void *udata)
static herr_t
H5HF_huge_bt2_filt_indir_compare(const void *_rec1, const void *_rec2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
{
@@ -662,7 +662,7 @@ H5HF_huge_bt2_filt_indir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -697,7 +697,7 @@ H5HF_huge_bt2_filt_indir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_indir_rec_t *nrecord = (H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -733,7 +733,7 @@ H5HF_huge_bt2_filt_indir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED
{
const H5HF_huge_bt2_filt_indir_rec_t *nrecord = (const H5HF_huge_bt2_filt_indir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_indir_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu, %Hu}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size, nrecord->id);
@@ -762,7 +762,7 @@ H5HF_huge_bt2_dir_remove(const void *nrecord, void *_udata)
H5HF_huge_remove_ud1_t *udata = (H5HF_huge_remove_ud1_t *)_udata; /* User callback data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_dir_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0)
@@ -792,7 +792,7 @@ done:
static herr_t
H5HF_huge_bt2_dir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dir_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5HF_huge_bt2_dir_rec_t *)nrecord = *(const H5HF_huge_bt2_dir_rec_t *)udata;
@@ -821,7 +821,7 @@ H5HF_huge_bt2_dir_compare(const void *_rec1, const void *_rec2)
const H5HF_huge_bt2_dir_rec_t *rec2 = (const H5HF_huge_bt2_dir_rec_t *)_rec2;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dir_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
HDfprintf(stderr, "%s: rec1 = {%a, %Hu}\n", "H5HF_huge_bt2_dir_compare", rec1->addr, rec1->len);
@@ -861,7 +861,7 @@ H5HF_huge_bt2_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dir_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -893,7 +893,7 @@ H5HF_huge_bt2_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_dir_rec_t *nrecord = (H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dir_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -926,7 +926,7 @@ H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_i
{
const H5HF_huge_bt2_dir_rec_t *nrecord = (const H5HF_huge_bt2_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_dir_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len);
@@ -952,7 +952,7 @@ H5HF_huge_bt2_dir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_i
herr_t
H5HF_huge_bt2_filt_dir_found(const void *nrecord, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_found)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
HDfprintf(stderr, "%s: nrecord = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_found",
@@ -987,7 +987,7 @@ H5HF_huge_bt2_filt_dir_remove(const void *nrecord, void *_udata)
H5HF_huge_remove_ud1_t *udata = (H5HF_huge_remove_ud1_t *)_udata; /* User callback data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_filt_dir_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Free the space in the file for the object being removed */
if(H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, udata->dxpl_id, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->len) < 0)
@@ -1017,7 +1017,7 @@ done:
static herr_t
H5HF_huge_bt2_filt_dir_store(void *nrecord, const void *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
*(H5HF_huge_bt2_filt_dir_rec_t *)nrecord = *(const H5HF_huge_bt2_filt_dir_rec_t *)udata;
@@ -1046,7 +1046,7 @@ H5HF_huge_bt2_filt_dir_compare(const void *_rec1, const void *_rec2)
const H5HF_huge_bt2_filt_dir_rec_t *rec2 = (const H5HF_huge_bt2_filt_dir_rec_t *)_rec2;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef QAK
HDfprintf(stderr, "%s: rec1 = {%a, %Hu, %x, %Hu}\n", "H5HF_huge_bt2_filt_dir_compare", rec1->addr, rec1->len, rec1->filter_mask, rec1->obj_size);
@@ -1086,7 +1086,7 @@ H5HF_huge_bt2_filt_dir_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -1120,7 +1120,7 @@ H5HF_huge_bt2_filt_dir_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5HF_huge_bt2_ctx_t *ctx = (H5HF_huge_bt2_ctx_t *)_ctx; /* Callback context structure */
H5HF_huge_bt2_filt_dir_rec_t *nrecord = (H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -1154,7 +1154,7 @@ H5HF_huge_bt2_filt_dir_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED d
{
const H5HF_huge_bt2_filt_dir_rec_t *nrecord = (const H5HF_huge_bt2_filt_dir_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_bt2_filt_dir_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu}\n", indent, "", fwidth, "Record:",
nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size);
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index f8829f2..ddff0e0 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -166,7 +166,7 @@ H5FL_BLK_DEFINE(direct_block);
static herr_t
H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(f);
@@ -216,7 +216,7 @@ H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
static herr_t
H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(f);
@@ -277,7 +277,7 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
uint8_t heap_flags; /* Status flags for heap */
H5HF_hdr_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_hdr_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -457,7 +457,7 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
uint8_t hdr_buf[H5HF_HDR_BUF_SIZE]; /* Buffer for header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_hdr_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -589,7 +589,7 @@ H5HF_cache_hdr_dest(H5F_t *f, H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_hdr_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -635,7 +635,7 @@ H5HF_cache_hdr_clear(H5F_t *f, H5HF_hdr_t *hdr, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_hdr_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -672,7 +672,7 @@ done:
static herr_t
H5HF_cache_hdr_size(const H5F_t UNUSED *f, const H5HF_hdr_t *hdr, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_cache_hdr_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(f);
@@ -717,7 +717,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
unsigned u; /* Local index variable */
H5HF_indirect_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_iblock_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -909,7 +909,7 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
uint8_t iblock_buf[H5HF_IBLOCK_BUF_SIZE]; /* Buffer for indirect block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_iblock_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -1094,7 +1094,7 @@ H5HF_cache_iblock_dest(H5F_t *f, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_iblock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1145,7 +1145,7 @@ H5HF_cache_iblock_clear(H5F_t *f, H5HF_indirect_t *iblock, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_iblock_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1182,7 +1182,7 @@ done:
static herr_t
H5HF_cache_iblock_size(const H5F_t UNUSED *f, const H5HF_indirect_t *iblock, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_cache_iblock_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(iblock);
@@ -1221,7 +1221,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
haddr_t heap_addr; /* Address of heap header in the file */
H5HF_direct_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_dblock_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -1391,7 +1391,7 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_dblock_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -1664,7 +1664,7 @@ H5HF_cache_dblock_dest(H5F_t *f, H5HF_direct_t *dblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_dblock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1716,7 +1716,7 @@ H5HF_cache_dblock_clear(H5F_t *f, H5HF_direct_t *dblock, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_cache_dblock_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1753,7 +1753,7 @@ done:
static herr_t
H5HF_cache_dblock_size(const H5F_t UNUSED *f, const H5HF_direct_t *dblock, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_cache_dblock_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(dblock);
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 68b30d9..4289c02 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -115,7 +115,7 @@ static herr_t H5HF_dtable_debug(H5HF_dtable_t *dtable, FILE *stream,
static herr_t
H5HF_dtable_debug(H5HF_dtable_t *dtable, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -190,7 +190,7 @@ H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_hdr_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -310,7 +310,7 @@ H5HF_dblock_debug_cb(const H5FS_section_info_t *_sect, void *_udata)
haddr_t sect_start, sect_end; /* Section's beginning and ending offsets */
haddr_t dblock_start, dblock_end; /* Direct block's beginning and ending offsets */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dblock_debug_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -397,7 +397,7 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
uint8_t *marker = NULL; /* Track free space for block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_dblock_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -524,7 +524,7 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
size_t u, v; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_iblock_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -653,7 +653,7 @@ H5HF_sects_debug_cb(const H5FS_section_info_t *_sect, void *_udata)
H5HF_debug_iter_ud2_t *udata = (H5HF_debug_iter_ud2_t *)_udata; /* User data for callbacks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sects_debug_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -708,7 +708,7 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr,
H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_sects_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 5cd035a..afc7f25 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -102,7 +102,7 @@ H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo
size_t free_space; /* Free space in new block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -228,7 +228,7 @@ H5HF_man_dblock_destroy(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_direct_t *dblock,
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting indirect block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_destroy)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -342,7 +342,7 @@ H5HF_man_dblock_new(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t request,
size_t min_dblock_size; /* Min. size of direct block to allocate */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_new)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -441,7 +441,7 @@ H5HF_man_dblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr,
H5HF_dblock_cache_ud_t udata; /* parent and other infor for deserializing direct block */
H5HF_direct_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_protect)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -520,7 +520,7 @@ H5HF_man_dblock_locate(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t obj_off,
unsigned entry; /* Entry of block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_locate)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -621,7 +621,7 @@ H5HF_man_dblock_delete(H5F_t *f, hid_t dxpl_id, haddr_t dblock_addr,
unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -688,7 +688,7 @@ H5HF_man_dblock_dest(H5HF_direct_t *dblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_dblock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 29af47f..a7d95bc 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -96,7 +96,7 @@ H5HF_dtable_init(H5HF_dtable_t *dtable)
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_dtable_init)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -153,7 +153,7 @@ done:
herr_t
H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_lookup)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -201,7 +201,7 @@ HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", h
herr_t
H5HF_dtable_dest(H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_dest)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -242,7 +242,7 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
{
unsigned row; /* Row where block will fit */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_size_to_row)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -276,7 +276,7 @@ H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
{
unsigned rows; /* # of rows required for indirect block */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_size_to_rows)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -312,7 +312,7 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned end_entry; /* Entry for last block covered */
hsize_t acc_span_size; /* Accumulated span size */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_dtable_span_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 684c171..e4b89ba 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -112,7 +112,7 @@ H5HF_hdr_alloc(H5F_t *f)
H5HF_hdr_t *hdr = NULL; /* Shared fractal heap header */
H5HF_hdr_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_alloc)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -160,7 +160,7 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
unsigned curr_row; /* Current row in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_hdr_compute_free_space)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -210,7 +210,7 @@ H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_finish_init_phase1)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -250,7 +250,7 @@ H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_finish_init_phase2)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -304,7 +304,7 @@ H5HF_hdr_finish_init(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_finish_init)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -344,7 +344,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
size_t dblock_overhead; /* Direct block's overhead */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -535,7 +535,7 @@ H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
H5HF_hdr_t *hdr; /* Fractal heap header */
H5HF_hdr_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_protect)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -581,7 +581,7 @@ H5HF_hdr_incr(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_incr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -617,7 +617,7 @@ H5HF_hdr_decr(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -654,7 +654,7 @@ done:
herr_t
H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_hdr_fuse_incr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(hdr);
@@ -682,7 +682,7 @@ H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
size_t
H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_hdr_fuse_decr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(hdr);
@@ -713,7 +713,7 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_dirty)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -751,7 +751,7 @@ H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_adj_free)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -789,7 +789,7 @@ H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_adjust_heap)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -827,7 +827,7 @@ done:
herr_t
H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_hdr_inc_alloc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -860,7 +860,7 @@ H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_start_iter)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -898,7 +898,7 @@ H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_reset_iter)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -938,7 +938,7 @@ H5HF_hdr_skip_blocks(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *iblock,
hsize_t sect_size; /* Size of section in heap space */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_skip_blocks)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -987,7 +987,7 @@ H5HF_hdr_update_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_update_iter)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1166,7 +1166,7 @@ H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_inc_iter)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1210,7 +1210,7 @@ H5HF_hdr_reverse_iter(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t dblock_addr)
hbool_t walked_up; /* Loop flag */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_reverse_iter)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1351,7 +1351,7 @@ H5HF_hdr_empty(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_empty)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -1399,7 +1399,7 @@ H5HF_hdr_free(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_hdr_free)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1442,7 +1442,7 @@ H5HF_hdr_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_hdr_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 7577583..3bbd137 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -108,7 +108,7 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_bt2_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -185,7 +185,7 @@ done:
herr_t
H5HF_huge_init(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_huge_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -263,7 +263,7 @@ H5HF_huge_new_id(H5HF_hdr_t *hdr)
hsize_t new_id; /* New object's ID */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_new_id)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -316,7 +316,7 @@ H5HF_huge_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, void *obj,
unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_insert)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
#endif /* QAK */
@@ -511,7 +511,7 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_get_obj_len)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -607,7 +607,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_op_real)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -752,7 +752,7 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
size_t obj_size; /* Object's size in the file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_write)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -828,7 +828,7 @@ H5HF_huge_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_read)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -865,7 +865,7 @@ H5HF_huge_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_op)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -902,7 +902,7 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
H5HF_huge_remove_ud1_t udata; /* User callback data for v2 B-tree remove call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1010,7 +1010,7 @@ H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_term)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1076,7 +1076,7 @@ H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
H5B2_remove_t op; /* Callback for v2 B-tree removal */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_huge_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 6fbb0c2..6c19b4f 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -110,7 +110,7 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_iblock_pin)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(iblock);
@@ -168,7 +168,7 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_iblock_unpin)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(iblock);
@@ -226,7 +226,7 @@ H5HF_iblock_incr(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_iblock_incr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(iblock);
@@ -263,7 +263,7 @@ H5HF_iblock_decr(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_iblock_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(iblock);
@@ -326,7 +326,7 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_iblock_dirty)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(iblock);
@@ -365,7 +365,7 @@ H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_root_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check for allocating entire root indirect block initially */
if(hdr->man_dtable.cparam.start_root_rows == 0)
@@ -500,7 +500,7 @@ H5HF_man_iblock_root_double(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_root_double)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get "new block" iterator information */
if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
@@ -682,7 +682,7 @@ H5HF_man_iblock_root_halve(H5HF_indirect_t *iblock, hid_t dxpl_id)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_root_halve)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(iblock);
@@ -816,7 +816,7 @@ H5HF_man_iblock_root_revert(H5HF_indirect_t *root_iblock, hid_t dxpl_id)
size_t dblock_size; /* Direct block's size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_root_revert)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -892,7 +892,7 @@ H5HF_man_iblock_alloc_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t **
hbool_t iblock_held = FALSE; /* Flag to indicate that indirect block is held */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_alloc_row)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -956,7 +956,7 @@ H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblo
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1092,7 +1092,7 @@ H5HF_man_iblock_protect(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
hbool_t should_protect = FALSE; /* Whether we should protect the indirect block or not */
H5HF_indirect_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_protect)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1192,7 +1192,7 @@ H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_unprotect)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1230,7 +1230,7 @@ H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_ad
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_attach)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1295,7 +1295,7 @@ H5HF_man_iblock_detach(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned entry)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_detach)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1396,7 +1396,7 @@ done:
herr_t
H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *child_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iblock_entry_addr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -1439,7 +1439,7 @@ H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id, haddr_t iblock_addr,
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1539,7 +1539,7 @@ H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_ad
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_man_iblock_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -1606,7 +1606,7 @@ H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iblock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index f7178a1..0f2f7a4 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -95,7 +95,7 @@ H5FL_DEFINE(H5HF_block_loc_t);
herr_t
H5HF_man_iter_init(H5HF_block_iter_t *biter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -138,7 +138,7 @@ H5HF_man_iter_start_offset(H5HF_hdr_t *hdr, hid_t dxpl_id,
hbool_t root_block = TRUE; /* Flag to indicate the current block is the root indirect block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_start_offset)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -281,7 +281,7 @@ done:
herr_t
H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_set_entry)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -318,7 +318,7 @@ H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
H5HF_block_loc_t *new_loc = NULL; /* Pointer to new block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_start_entry)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -376,7 +376,7 @@ H5HF_man_iter_reset(H5HF_block_iter_t *biter)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_reset)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -434,7 +434,7 @@ done:
herr_t
H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -473,7 +473,7 @@ H5HF_man_iter_up(H5HF_block_iter_t *biter)
H5HF_block_loc_t *up_loc; /* Pointer to 'up' block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_up)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -521,7 +521,7 @@ H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
H5HF_block_loc_t *down_loc = NULL; /* Pointer to new 'down' block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_iter_down)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -574,7 +574,7 @@ herr_t
H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
unsigned *entry, H5HF_indirect_t **block)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_curr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -614,7 +614,7 @@ H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
{
hsize_t curr_offset; /* For computing offset in heap */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -652,7 +652,7 @@ H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
hbool_t
H5HF_man_iter_ready(H5HF_block_iter_t *biter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_man_iter_ready)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
diff --git a/src/H5HFman.c b/src/H5HFman.c
index b1fb322..62f5580 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -116,7 +116,7 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj
htri_t node_found; /* Whether an existing free list node was found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_insert)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -246,7 +246,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
uint8_t *p; /* Temporary pointer to obj info in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_op_real)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -379,7 +379,7 @@ H5HF_man_read(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, void *obj)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_read)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -416,7 +416,7 @@ H5HF_man_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_write)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -454,7 +454,7 @@ H5HF_man_op(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_op)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -499,7 +499,7 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
size_t blk_off; /* Offset of object in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_man_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index e41f46d..38d9381 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -327,7 +327,7 @@ H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_init_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -369,7 +369,7 @@ H5HF_sect_term_cls(H5FS_section_class_t *cls)
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_term_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -410,7 +410,7 @@ H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
H5HF_free_section_t *new_sect; /* New section */
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_node_new)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -454,7 +454,7 @@ H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_node_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
@@ -491,7 +491,7 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
H5HF_free_section_t *sect = NULL; /* 'Single' free space section to add */
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_new)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -545,7 +545,7 @@ H5HF_sect_single_locate_parent(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t refresh,
hbool_t did_protect; /* Whether we protected the indirect block or not */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_locate_parent)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -604,7 +604,7 @@ H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_revive)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -653,7 +653,7 @@ H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_sect_single_dblock_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -740,7 +740,7 @@ H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_reduce)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -797,7 +797,7 @@ H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id,
size_t dblock_overhead; /* Direct block's overhead */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_full_dblock)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -853,7 +853,7 @@ H5HF_sect_single_add(H5FS_section_info_t *_sect, unsigned *flags, void *_udata)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_add)
+ FUNC_ENTER_NOAPI_NOINIT
/* Don't need to check section if we are deserializing, because it should
* have already been checked when it was first added
@@ -907,7 +907,7 @@ H5HF_sect_single_deserialize(const H5FS_section_class_t UNUSED *cls,
H5HF_free_section_t *new_sect; /* New section */
H5FS_section_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -949,7 +949,7 @@ H5HF_sect_single_can_merge(const H5FS_section_info_t *_sect1,
const H5HF_free_section_t *sect2 = (const H5HF_free_section_t *)_sect2; /* Fractal heap free section */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_single_can_merge)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -997,7 +997,7 @@ H5HF_sect_single_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_merge)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect1);
@@ -1054,7 +1054,7 @@ H5HF_sect_single_can_shrink(const H5FS_section_info_t *_sect, void *_udata)
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_single_can_shrink)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1113,7 +1113,7 @@ H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void UNUSED *_udata)
size_t dblock_size; /* Section's direct block's size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_shrink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -1175,7 +1175,7 @@ H5HF_sect_single_free(H5FS_section_info_t *_sect)
H5HF_indirect_t *parent = NULL; /* Parent indirect block for section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -1214,7 +1214,7 @@ H5HF_sect_single_valid(const H5FS_section_class_t UNUSED *cls, const H5FS_sectio
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_single_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1302,7 +1302,7 @@ H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
H5HF_free_section_t *sect = NULL; /* 'Row' section created */
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect_size);
@@ -1348,7 +1348,7 @@ H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_from_single)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1396,7 +1396,7 @@ H5HF_sect_row_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_revive)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1438,7 +1438,7 @@ H5HF_sect_row_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect,
hbool_t alloc_from_start; /* Whether to allocate from the end of the row */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_reduce)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -1512,7 +1512,7 @@ H5HF_sect_row_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_first)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -1554,7 +1554,7 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
{
H5HF_indirect_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_row_get_iblock)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -1593,7 +1593,7 @@ H5HF_sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_init_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -1636,7 +1636,7 @@ H5HF_sect_row_term_cls(H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_term_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -1672,7 +1672,7 @@ H5HF_sect_row_serialize(const H5FS_section_class_t *cls,
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_serialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -1716,7 +1716,7 @@ H5HF_sect_row_deserialize(const H5FS_section_class_t *cls, hid_t dxpl_id,
H5HF_hdr_t *hdr; /* Fractal heap header */
H5FS_section_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -1760,7 +1760,7 @@ H5HF_sect_row_can_merge(const H5FS_section_info_t *_sect1,
H5HF_free_section_t *top_indir_sect1, *top_indir_sect2; /* Top indirect section for each row */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_row_can_merge)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -1819,7 +1819,7 @@ H5HF_sect_row_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_merge)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect1);
@@ -1885,7 +1885,7 @@ H5HF_sect_row_can_shrink(const H5FS_section_info_t *_sect, void UNUSED *_udata)
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_row_can_shrink)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -1924,7 +1924,7 @@ H5HF_sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
hid_t dxpl_id = udata->dxpl_id; /* DXPL ID for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_shrink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -1965,7 +1965,7 @@ H5HF_sect_row_free_real(H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_free_real)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
@@ -1998,7 +1998,7 @@ H5HF_sect_row_free(H5FS_section_info_t *_sect)
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Pointer to section to free */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_row_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
HDassert(sect->u.row.under);
@@ -2038,7 +2038,7 @@ H5HF_sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t *
const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
unsigned indir_idx; /* Index of row in underlying indirect section's row array */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_row_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Basic sanity check */
HDassert(cls);
@@ -2096,7 +2096,7 @@ H5HF_sect_row_debug(const H5FS_section_info_t *_sect,
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Section to dump info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_row_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -2143,7 +2143,7 @@ H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
{
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_iblock_off)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -2174,7 +2174,7 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
{
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_top)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -2210,7 +2210,7 @@ H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_init_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -2247,7 +2247,7 @@ H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_term_cls)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(cls);
@@ -2283,7 +2283,7 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_new)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2354,7 +2354,7 @@ H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_for_row)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2428,7 +2428,7 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_init_rows)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2670,7 +2670,7 @@ H5HF_sect_indirect_add(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_add)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2738,7 +2738,7 @@ H5HF_sect_indirect_decr(H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_decr)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2792,7 +2792,7 @@ H5HF_sect_indirect_revive_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_revive_row)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2858,7 +2858,7 @@ H5HF_sect_indirect_revive(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_revive)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2927,7 +2927,7 @@ H5HF_sect_indirect_reduce_row(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_
H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_reduce_row)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -3194,7 +3194,7 @@ H5HF_sect_indirect_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
H5HF_free_section_t *peer_sect = NULL; /* Peer indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_reduce)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -3421,7 +3421,7 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_is_first)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(sect);
@@ -3456,7 +3456,7 @@ H5HF_sect_indirect_first(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *se
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_first)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(hdr);
@@ -3506,7 +3506,7 @@ done:
static H5HF_indirect_t *
H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_get_iblock)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -3549,7 +3549,7 @@ H5HF_sect_indirect_merge_row(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_merge_row)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check parameters */
HDassert(hdr);
@@ -3786,7 +3786,7 @@ H5HF_sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
unsigned par_entry; /* Entry within parent indirect section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_build_parent)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check parameters */
HDassert(hdr);
@@ -3854,7 +3854,7 @@ H5HF_sect_indirect_shrink(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *s
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_shrink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check parameters */
HDassert(hdr);
@@ -3911,7 +3911,7 @@ H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_serialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -3978,7 +3978,7 @@ H5HF_sect_indirect_deserialize(H5HF_hdr_t *hdr, hid_t dxpl_id,
unsigned end_col; /* End column in indirect block */
H5FS_section_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(hdr);
@@ -4048,7 +4048,7 @@ H5HF_sect_indirect_free(H5HF_free_section_t *sect)
H5HF_indirect_t *iblock = NULL; /* Indirect block for section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(sect);
@@ -4097,7 +4097,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
unsigned end_entry; /* Entry for last block covered */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check arguments */
HDassert(hdr);
@@ -4195,7 +4195,7 @@ static herr_t
H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_sect_indirect_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index aa419de..cec9b3a 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -110,7 +110,7 @@ H5HF_space_start(H5HF_hdr_t *hdr, hid_t dxpl_id, hbool_t may_create)
H5HF_FSPACE_SECT_CLS_INDIRECT};
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_start)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -171,7 +171,7 @@ H5HF_space_add(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node,
H5HF_sect_add_ud1_t udata; /* User data for free space manager 'add' */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_add)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -218,7 +218,7 @@ H5HF_space_find(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t request, H5HF_free_secti
htri_t node_found = FALSE; /* Whether an existing free list node was found */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_find)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -264,7 +264,7 @@ H5HF_space_size(H5HF_hdr_t *hdr, hid_t dxpl_id, hsize_t *fs_size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_size)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -309,7 +309,7 @@ H5HF_space_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *node)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -347,7 +347,7 @@ H5HF_space_close(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_close)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -402,7 +402,7 @@ H5HF_space_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -438,7 +438,7 @@ H5HF_space_sect_change_class(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_space_sect_change_class)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 2ab5240..b0e1987 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -86,7 +86,7 @@
herr_t
H5HF_stat_info(const H5HF_t *fh, H5HF_stat_t *stats)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_stat_info)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -131,7 +131,7 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
hsize_t meta_size = 0; /* free space storage size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HF_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 30adf96..c2e9cb0 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -87,7 +87,7 @@
herr_t
H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_cparam_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -126,7 +126,7 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
{
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_cmp_cparam_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(cparam1);
@@ -246,7 +246,7 @@ H5HF_get_max_root_rows(const H5HF_t *fh)
{
unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_max_root_rows)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -277,7 +277,7 @@ H5HF_get_dtable_width_test(const H5HF_t *fh)
{
unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_dtable_width_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -308,7 +308,7 @@ H5HF_get_dtable_max_drows_test(const H5HF_t *fh)
{
unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_dtable_max_drows_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -343,7 +343,7 @@ H5HF_get_iblock_max_drows_test(const H5HF_t *fh, unsigned pos)
{
unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_iblock_max_drows_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -376,7 +376,7 @@ H5HF_get_dblock_size_test(const H5HF_t *fh, unsigned row)
{
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_dblock_size_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -408,7 +408,7 @@ H5HF_get_dblock_free_test(const H5HF_t *fh, unsigned row)
{
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_dblock_free_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -439,7 +439,7 @@ H5HF_get_id_off_test(const H5HF_t *fh, const void *_id, hsize_t *obj_off)
{
const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_id_off_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -473,7 +473,7 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
{
const uint8_t *id = (const uint8_t *)_id; /* Object ID */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_id_type_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(id);
@@ -503,7 +503,7 @@ herr_t
H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
hbool_t *len_extended)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_tiny_info_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
@@ -535,7 +535,7 @@ H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len,
herr_t
H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_get_huge_info_test)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(fh);
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index f11b6c0..a4cbdc1 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -99,7 +99,7 @@ static herr_t H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
herr_t
H5HF_tiny_init(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_tiny_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -150,7 +150,7 @@ H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_insert)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef QAK
HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
#endif /* QAK */
@@ -213,7 +213,7 @@ H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
{
size_t enc_obj_size; /* Encoded object size */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_tiny_get_obj_len)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -258,7 +258,7 @@ H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_op_real)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -316,7 +316,7 @@ H5HF_tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_read)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -353,7 +353,7 @@ H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_op)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -390,7 +390,7 @@ H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HF_tiny_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5HG.c b/src/H5HG.c
index 67dc58e..0a97e47 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -41,7 +41,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
@@ -50,7 +49,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5HGpkg.h" /* Global heaps */
#include "H5MFprivate.h" /* File memory management */
#include "H5MMprivate.h" /* Memory management */
@@ -61,13 +60,6 @@
/****************/
/*
- * Limit global heap collections to the some reasonable size. This is
- * fairly arbitrary, but needs to be small enough that no more than H5HG_MAXIDX
- * objects will be allocated from a single heap.
- */
-#define H5HG_MAXSIZE 65536
-
-/*
* The maximum number of links allowed to a global heap object.
*/
#define H5HG_MAXLINK 65535
@@ -148,7 +140,7 @@ H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size)
size_t n;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5HG_create, dxpl_id, H5AC__GLOBALHEAP_TAG, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, HADDR_UNDEF)
/* Check args */
HDassert(f);
@@ -164,7 +156,7 @@ H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
heap->addr = addr;
heap->size = size;
- heap->shared = f->shared;
+ heap->shared = H5F_SHARED(f);
if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
@@ -212,19 +204,8 @@ HDmemset(heap->chunk, 0, size);
#endif /* OLD_WAY */
/* Add this heap to the beginning of the CWFS list */
- if(NULL == f->shared->cwfs) {
- f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5HG_NCWFS * sizeof(H5HG_heap_t *));
- if(NULL == (f->shared->cwfs))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
- f->shared->cwfs[0] = heap;
- f->shared->ncwfs = 1;
- } /* end if */
- else {
- HDmemmove(f->shared->cwfs + 1, f->shared->cwfs,
- MIN(f->shared->ncwfs, H5HG_NCWFS - 1) * sizeof(H5HG_heap_t *));
- f->shared->cwfs[0] = heap;
- f->shared->ncwfs = MIN(H5HG_NCWFS, f->shared->ncwfs + 1);
- } /* end else */
+ if(H5F_cwfs_add(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to add global heap collection to file's CWFS")
/* Add the heap to the cache */
if(H5AC_insert_entry(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0)
@@ -270,7 +251,7 @@ H5HG_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
H5HG_heap_t *heap; /* Global heap */
H5HG_heap_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_protect)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -317,7 +298,7 @@ H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_alloc);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(heap);
@@ -441,7 +422,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+herr_t
H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need)
{
H5HG_heap_t *heap = NULL; /* Pointer to heap to extend */
@@ -452,7 +433,7 @@ H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_extend)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -537,102 +518,42 @@ herr_t
H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*/)
{
size_t need; /*total space needed for object */
- unsigned cwfsno;
size_t idx;
- haddr_t addr = HADDR_UNDEF;
+ haddr_t addr; /* Address of heap to add object within */
H5HG_heap_t *heap = NULL;
unsigned heap_flags = H5AC__NO_FLAGS_SET;
- hbool_t found = FALSE; /* Flag to indicate a heap with enough space was found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5HG_insert, dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
HDassert(f);
HDassert(0 == size || obj);
HDassert(hobj);
- if(0 == (f->intent & H5F_ACC_RDWR))
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Find a large enough collection on the CWFS list */
need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
- /* Note that we don't have metadata cache locks on the entries in
- * f->shared->cwfs.
- *
- * In the current situation, this doesn't matter, as we are single
- * threaded, and as best I can tell, entries are added to and deleted
- * from f->shared->cwfs as they are added to and deleted from the
- * metadata cache.
- *
- * To be proper, we should either lock each entry in f->shared->cwfs
- * as we examine it, or lock the whole array. However, at present
- * I don't see the point as there will be significant overhead,
- * and protecting and unprotecting all the collections in the global
- * heap on a regular basis will skew the replacement policy.
- *
- * JRM - 5/24/04
- */
- for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++)
- if(f->shared->cwfs[cwfsno]->obj[0].size >= need) {
- addr = f->shared->cwfs[cwfsno]->addr;
- found = TRUE;
- break;
- } /* end if */
-
- /*
- * If we didn't find any collection with enough free space the check if
- * we can extend any of the collections to make enough room.
- */
- if(!found) {
- size_t new_need;
-
- for(cwfsno = 0; cwfsno < f->shared->ncwfs; cwfsno++) {
- new_need = need;
- new_need -= f->shared->cwfs[cwfsno]->obj[0].size;
- new_need = MAX(f->shared->cwfs[cwfsno]->size, new_need);
-
- if((f->shared->cwfs[cwfsno]->size + new_need) <= H5HG_MAXSIZE) {
- htri_t extended; /* Whether the heap was extended */
-
- extended = H5MF_try_extend(f, dxpl_id, H5FD_MEM_GHEAP, f->shared->cwfs[cwfsno]->addr, (hsize_t)f->shared->cwfs[cwfsno]->size, (hsize_t)new_need);
- if(extended < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap")
- else if(extended == TRUE) {
- if(H5HG_extend(f, dxpl_id, f->shared->cwfs[cwfsno]->addr, new_need) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection")
- addr = f->shared->cwfs[cwfsno]->addr;
- found = TRUE;
- break;
- } /* end if */
- } /* end if */
- } /* end for */
- } /* end if */
+ /* Look for a heap in the file's CWFS that has enough space for the object */
+ addr = HADDR_UNDEF;
+ if(H5F_cwfs_find_free_heap(f, dxpl_id, need, &addr) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "error trying to locate heap")
/*
* If we didn't find any collection with enough free space then allocate a
* new collection large enough for the message plus the collection header.
*/
- if(!found) {
- addr = H5HG_create(f, dxpl_id, need+H5HG_SIZEOF_HDR (f));
+ if(!H5F_addr_defined(addr)) {
+ addr = H5HG_create(f, dxpl_id, need + H5HG_SIZEOF_HDR(f));
if(!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection")
} /* end if */
- else {
- /* Move the collection forward in the CWFS list, if it's not
- * already at the front
- */
- if(cwfsno > 0) {
- H5HG_heap_t *tmp = f->shared->cwfs[cwfsno];
-
- f->shared->cwfs[cwfsno] = f->shared->cwfs[cwfsno - 1];
- f->shared->cwfs[cwfsno - 1] = tmp;
- --cwfsno;
- } /* end if */
- } /* end else */
HDassert(H5F_addr_defined(addr));
+
if(NULL == (heap = H5HG_protect(f, dxpl_id, addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap")
@@ -690,7 +611,7 @@ H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/,
void *orig_object = object; /* Keep a copy of the original object pointer */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5HG_read, dxpl_id, H5AC__GLOBALHEAP_TAG, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, NULL)
/* Check args */
HDassert(f);
@@ -715,16 +636,8 @@ H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object/*out*/,
* with the H5AC_protect(), but it won't hurt to do it twice.
*/
if(heap->obj[0].begin) {
- unsigned u; /* Local index variable */
-
- for(u = 0; u < f->shared->ncwfs; u++)
- if(f->shared->cwfs[u] == heap) {
- if(u) {
- f->shared->cwfs[u] = f->shared->cwfs[u - 1];
- f->shared->cwfs[u - 1] = heap;
- } /* end if */
- break;
- } /* end if */
+ if(H5F_cwfs_advance_heap(f, heap, FALSE) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, NULL, "can't adjust file's CWFS")
} /* end if */
/* If the caller would like to know the heap object's size, set that */
@@ -770,12 +683,12 @@ H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust)
unsigned heap_flags = H5AC__NO_FLAGS_SET;
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5HG_link, dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL)
/* Check args */
HDassert(f);
HDassert(hobj);
- if(0 == (f->intent & H5F_ACC_RDWR))
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Load the heap */
@@ -833,12 +746,12 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
unsigned flags = H5AC__NO_FLAGS_SET;/* Whether the heap gets deleted */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5HG_remove, dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL);
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__GLOBALHEAP_TAG, FAIL);
/* Check args */
HDassert(f);
HDassert(hobj);
- if(0 == (f->intent & H5F_ACC_RDWR))
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Load the heap */
@@ -887,18 +800,8 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
* H5AC_protect() might have done that too, but that's okay. If the
* heap isn't on the CWFS list then add it to the end.
*/
- for(u = 0; u < f->shared->ncwfs; u++)
- if(f->shared->cwfs[u] == heap) {
- if(u) {
- f->shared->cwfs[u] = f->shared->cwfs[u - 1];
- f->shared->cwfs[u - 1] = heap;
- } /* end if */
- break;
- } /* end if */
- if(u >= f->shared->ncwfs) {
- f->shared->ncwfs = MIN(f->shared->ncwfs + 1, H5HG_NCWFS);
- f->shared->cwfs[f->shared->ncwfs - 1] = heap;
- } /* end if */
+ if(H5F_cwfs_advance_heap(f, heap, TRUE) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't adjust file's CWFS")
} /* end else */
done:
@@ -924,21 +827,16 @@ done:
herr_t
H5HG_free(H5HG_heap_t *heap)
{
- unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HG_free)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
HDassert(heap);
/* Remove the heap from the CWFS list */
- for(u = 0; u < heap->shared->ncwfs; u++) {
- if(heap->shared->cwfs[u] == heap) {
- heap->shared->ncwfs -= 1;
- HDmemmove(heap->shared->cwfs + u, heap->shared->cwfs + u + 1, (heap->shared->ncwfs - u) * sizeof(H5HG_heap_t *));
- break;
- } /* end if */
- } /* end for */
+ if(H5F_cwfs_remove_heap(heap->shared, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove heap from file's CWFS")
if(heap->chunk)
heap->chunk = H5FL_BLK_FREE(gheap_chunk, heap->chunk);
@@ -946,6 +844,7 @@ H5HG_free(H5HG_heap_t *heap)
heap->obj = H5FL_SEQ_FREE(H5HG_obj_t, heap->obj);
heap = H5FL_FREE(H5HG_heap_t, heap);
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5HG_free() */
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index a3cf5b1..afb2a75 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -28,7 +28,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
@@ -37,7 +36,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5HGpkg.h" /* Global heaps */
#include "H5MFprivate.h" /* File memory management */
#include "H5MMprivate.h" /* Memory management */
@@ -121,7 +120,7 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
size_t max_idx = 0; /* The maximum index seen */
H5HG_heap_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -131,7 +130,7 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
/* Read the initial 4k page */
if(NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- heap->shared = f->shared;
+ heap->shared = H5F_SHARED(f);
if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, (size_t)H5HG_MINSIZE)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(H5F_block_read(f, H5FD_MEM_GHEAP, addr, (size_t)H5HG_MINSIZE, dxpl_id, heap->chunk) < 0)
@@ -252,30 +251,9 @@ H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
HDassert(max_idx < heap->nused);
- /*
- * Add the new heap to the CWFS list, removing some other entry if
- * necessary to make room. We remove the right-most entry that has less
- * free space than this heap.
- */
- if(!f->shared->cwfs) {
- if(NULL == (f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5HG_NCWFS * sizeof(H5HG_heap_t *))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- f->shared->ncwfs = 1;
- f->shared->cwfs[0] = heap;
- } else if(H5HG_NCWFS == f->shared->ncwfs) {
- int i; /* Local index variable */
-
- for(i = H5HG_NCWFS - 1; i >= 0; --i)
- if(f->shared->cwfs[i]->obj[0].size < heap->obj[0].size) {
- HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, i * sizeof(H5HG_heap_t *));
- f->shared->cwfs[0] = heap;
- break;
- } /* end if */
- } else {
- HDmemmove(f->shared->cwfs + 1, f->shared->cwfs, f->shared->ncwfs * sizeof(H5HG_heap_t *));
- f->shared->ncwfs += 1;
- f->shared->cwfs[0] = heap;
- } /* end else */
+ /* Add the new heap to the CWFS list for the file */
+ if(H5F_cwfs_add(f, heap) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS")
ret_value = heap;
@@ -306,7 +284,7 @@ H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -346,7 +324,7 @@ H5HG_dest(H5F_t *f, H5HG_heap_t *heap)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HG_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(heap);
@@ -391,7 +369,7 @@ H5HG_clear(H5F_t *f, H5HG_heap_t *heap, hbool_t destroy)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5HG_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(heap);
@@ -425,7 +403,7 @@ done:
static herr_t
H5HG_size(const H5F_t UNUSED *f, const H5HG_heap_t *heap, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HG_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(heap);
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index f301701..74044cb 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -18,15 +18,58 @@
*
* Purpose: Global Heap object debugging functions.
*/
+
+/****************/
+/* Module Setup */
+/****************/
+
#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
#include "H5HGpkg.h" /* Global heaps */
#include "H5Iprivate.h" /* ID Functions */
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
/*-------------------------------------------------------------------------
* Function: H5HG_debug
@@ -39,18 +82,6 @@
* matzke@llnl.gov
* Mar 27, 1998
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, LLNL, 2003-06-05
- * The size does not include the object header, just the data.
- *
- * John Mainzer, 6/17/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -64,7 +95,7 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
uint8_t *p = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HG_debug, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -142,4 +173,5 @@ done:
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release object header");
FUNC_LEAVE_NOAPI(ret_value);
-}
+} /* end H5HG_debug() */
+
diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h
index 6c60656..5d4234f 100644
--- a/src/H5HGpkg.h
+++ b/src/H5HGpkg.h
@@ -71,12 +71,6 @@ H5FL_BLK_EXTERN(gheap_chunk);
#define H5HG_MINSIZE 4096
/*
- * Maximum length of the CWFS list, the list of remembered collections that
- * have free space.
- */
-#define H5HG_NCWFS 16
-
-/*
* Pad all global heap messages to a multiple of eight bytes so we can load
* the entire collection into memory and operate on it there. Eight should
* be sufficient for machines that have alignment constraints because our
diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h
index b6cdb4a..3765c47 100644
--- a/src/H5HGprivate.h
+++ b/src/H5HGprivate.h
@@ -35,14 +35,44 @@ typedef struct H5HG_t {
/* Typedef for heap in memory (defined in H5HGpkg.h) */
typedef struct H5HG_heap_t H5HG_heap_t;
+
+/*
+ * Limit global heap collections to the some reasonable size. This is
+ * fairly arbitrary, but needs to be small enough that no more than H5HG_MAXIDX
+ * objects will be allocated from a single heap.
+ */
+#define H5HG_MAXSIZE 65536
+
+/* If the module using this macro is allowed access to the private variables, access them directly */
+#ifdef H5HG_PACKAGE
+#define H5HG_ADDR(H) ((H)->addr)
+#define H5HG_SIZE(H) ((H)->size)
+#define H5HG_FREE_SIZE(H) ((H)->obj[0].size)
+#else /* H5HG_PACKAGE */
+#define H5HG_ADDR(H) (H5HG_get_addr(H))
+#define H5HG_SIZE(H) (H5HG_get_size(H))
+#define H5HG_FREE_SIZE(H) (H5HG_get_free_size(H))
+#endif /* H5HG_PACKAGE */
+
+
+/* Main global heap routines */
H5_DLL herr_t H5HG_insert(H5F_t *f, hid_t dxpl_id, size_t size, void *obj,
H5HG_t *hobj/*out*/);
H5_DLL void *H5HG_read(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj, void *object, size_t *buf_size/*out*/);
H5_DLL int H5HG_link(H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust);
H5_DLL herr_t H5HG_remove(H5F_t *f, hid_t dxpl_id, H5HG_t *hobj);
+/* Support routines */
+H5_DLL herr_t H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need);
+
+/* Query routines */
+H5_DLL haddr_t H5HG_get_addr(const H5HG_heap_t *h);
+H5_DLL size_t H5HG_get_size(const H5HG_heap_t *h);
+H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h);
+
/* Debugging functions */
H5_DLL herr_t H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
int fwidth);
-#endif
+#endif /* _H5HGprivate_H */
+
diff --git a/src/H5HGquery.c b/src/H5HGquery.c
new file mode 100644
index 0000000..a1b3777
--- /dev/null
+++ b/src/H5HGquery.c
@@ -0,0 +1,145 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Wednesday, July 20, 2011
+ *
+ * Purpose: Query routines for global heaps.
+ *
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5HG_PACKAGE /*suppress error about including H5HGpkg */
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HGpkg.h" /* Global heaps */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HG_get_addr
+ *
+ * Purpose: Query the address of a global heap object.
+ *
+ * Return: Address of heap on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+haddr_t
+H5HG_get_addr(const H5HG_heap_t *heap)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(heap);
+
+ FUNC_LEAVE_NOAPI(heap->addr)
+} /* H5HG_get_addr() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HG_get_size
+ *
+ * Purpose: Query the size of a global heap object.
+ *
+ * Return: Size of heap on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+size_t
+H5HG_get_size(const H5HG_heap_t *heap)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(heap);
+
+ FUNC_LEAVE_NOAPI(heap->size)
+} /* H5HG_get_size() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HG_get_free_size
+ *
+ * Purpose: Query the free size of a global heap object.
+ *
+ * Return: Free size of heap on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, July 20, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+size_t
+H5HG_get_free_size(const H5HG_heap_t *heap)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(heap);
+
+ FUNC_LEAVE_NOAPI(heap->obj[0].size)
+} /* H5HG_get_free_size() */
+
diff --git a/src/H5HL.c b/src/H5HL.c
index 4665474..b1b5b24 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -29,7 +29,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /* Suppress error about including H5Fpkg */
#define H5HL_PACKAGE /* Suppress error about including H5HLpkg */
@@ -38,7 +37,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5HLpkg.h" /* Local Heaps */
#include "H5MFprivate.h" /* File memory management */
@@ -119,7 +118,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
hsize_t total_size; /* Total heap size on disk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -154,9 +153,12 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
heap->freelist->offset = 0;
heap->freelist->size = size_hint;
heap->freelist->prev = heap->freelist->next = NULL;
+ heap->free_block = 0;
} /* end if */
- else
+ else {
heap->freelist = NULL;
+ heap->free_block = H5HL_FREE_NULL;
+ } /* end else */
/* Allocate the heap prefix */
if(NULL == (prfx = H5HL_prfx_new(heap)))
@@ -213,7 +215,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
size_t old_heap_size; /* Old size of heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_dblk_realloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(heap);
@@ -323,7 +325,7 @@ H5HL_minimize_heap_space(H5F_t *f, hid_t dxpl_id, H5HL_t *heap)
size_t new_heap_size = heap->dblk_size; /* New size of heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_minimize_heap_space, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -449,7 +451,7 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
unsigned dblk_cache_flags = H5AC__NO_FLAGS_SET; /* Cache flags for unprotecting data block entry */
H5HL_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_protect, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check arguments */
HDassert(f);
@@ -460,8 +462,6 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
- prfx_udata.loaded = FALSE;
- prfx_udata.free_block = H5HL_FREE_NULL;
/* Protect the local heap prefix */
if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, rw)))
@@ -483,8 +483,6 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
/* Construct the user data for protect callback */
dblk_udata.heap = heap;
- dblk_udata.free_block = prfx_udata.loaded ? prfx_udata.free_block :
- (heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL);
dblk_udata.loaded = FALSE;
/* Protect the local heap data block */
@@ -541,7 +539,7 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
* We need to have called some other function before this to get a
* valid heap pointer. So, this can remain "FUNC_ENTER_NOAPI_NOINIT"
*/
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_offset_into)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(heap);
@@ -570,7 +568,7 @@ H5HL_unprotect(H5HL_t *heap)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5HL_unprotect, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(heap);
@@ -619,7 +617,7 @@ done:
static H5HL_free_t *
H5HL_remove_free(H5HL_t *heap, H5HL_free_t *fl)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_remove_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(fl->prev)
fl->prev->next = fl->next;
@@ -652,7 +650,7 @@ H5HL_dirty(H5HL_t *heap)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_dirty)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(heap);
@@ -699,7 +697,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
hbool_t found;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_insert, UFAIL)
+ FUNC_ENTER_NOAPI(UFAIL)
/* check arguments */
HDassert(f);
@@ -915,7 +913,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
H5HL_free_t *fl = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -1066,7 +1064,7 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -1077,8 +1075,6 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
- prfx_udata.loaded = FALSE;
- prfx_udata.free_block = H5HL_FREE_NULL;
/* Protect the local heap prefix */
if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_WRITE)))
@@ -1093,8 +1089,6 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
/* Construct the user data for protect callback */
dblk_udata.heap = heap;
- dblk_udata.free_block = prfx_udata.loaded ? prfx_udata.free_block :
- (heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL);
dblk_udata.loaded = FALSE;
/* Protect the local heap data block */
@@ -1145,7 +1139,7 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
H5HL_t *heap; /* Heap data structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_get_size, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -1157,8 +1151,6 @@ H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size)
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
- prfx_udata.loaded = FALSE;
- prfx_udata.free_block = H5HL_FREE_NULL;
/* Protect the local heap prefix */
if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
@@ -1199,7 +1191,7 @@ H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size)
H5HL_t *heap; /* Heap data structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_heapsize, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
@@ -1211,8 +1203,6 @@ H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size)
prfx_udata.sizeof_addr = H5F_SIZEOF_ADDR(f);
prfx_udata.prfx_addr = addr;
prfx_udata.sizeof_prfx = H5HL_SIZEOF_HDR(f);
- prfx_udata.loaded = FALSE;
- prfx_udata.free_block = H5HL_FREE_NULL;
/* Protect the local heap prefix */
if(NULL == (prfx = (H5HL_prfx_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP_PRFX, addr, &prfx_udata, H5AC_READ)))
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 56d9919..a3c43ac 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -134,18 +134,20 @@ const H5AC_class_t H5AC_LHEAP_DBLK[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_fl_deserialize(H5HL_t *heap, hsize_t free_block)
+H5HL_fl_deserialize(H5HL_t *heap)
{
H5HL_free_t *fl = NULL, *tail = NULL; /* Heap free block nodes */
+ hsize_t free_block; /* Offset of free block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_fl_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(heap);
HDassert(!heap->freelist);
/* Build free list */
+ free_block = heap->free_block;
while(H5HL_FREE_NULL != free_block) {
const uint8_t *p; /* Pointer into image buffer */
@@ -208,7 +210,7 @@ H5HL_fl_serialize(const H5HL_t *heap)
{
H5HL_free_t *fl; /* Pointer to heap free list node */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_fl_serialize)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(heap);
@@ -258,7 +260,7 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
haddr_t eoa; /* Relative end of file address */
H5HL_prfx_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_prefix_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -310,8 +312,8 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
H5F_DECODE_LENGTH_LEN(p, heap->dblk_size, udata->sizeof_size);
/* Free list head */
- H5F_DECODE_LENGTH_LEN(p, udata->free_block, udata->sizeof_size);
- if(udata->free_block != H5HL_FREE_NULL && udata->free_block >= heap->dblk_size)
+ H5F_DECODE_LENGTH_LEN(p, heap->free_block, udata->sizeof_size);
+ if(heap->free_block != H5HL_FREE_NULL && heap->free_block >= heap->dblk_size)
HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap free list")
/* Heap data address */
@@ -345,7 +347,7 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end else */
/* Build free list */
- if(H5HL_fl_deserialize(heap, udata->free_block) < 0)
+ if(H5HL_fl_deserialize(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list")
} /* end if */
else
@@ -353,9 +355,6 @@ H5HL_prefix_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
heap->single_cache_obj = FALSE;
} /* end if */
- /* Set flag to indicate prefix from loaded from file */
- udata->loaded = TRUE;
-
/* Set return value */
ret_value = prfx;
@@ -399,7 +398,7 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
uint8_t heap_buf[H5HL_SPEC_READ_SIZE]; /* Buffer for heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_prefix_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -408,7 +407,6 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
if(prfx->cache_info.is_dirty) {
H5HL_t *heap = prfx->heap; /* Pointer to the local heap */
- H5HL_free_t *fl = heap->freelist; /* Pointer to heap's free list */
uint8_t *buf; /* Pointer to heap buffer */
size_t buf_size; /* Size of buffer for encoding & writing heap info */
uint8_t *p; /* Pointer into raw data buffer */
@@ -426,6 +424,9 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
if(NULL == (buf = (uint8_t *)H5WB_actual(wb, buf_size)))
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "can't get actual buffer")
+ /* Update the free block value from the free list */
+ heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
+
/* Serialize the heap prefix */
p = buf;
HDmemcpy(p, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -435,18 +436,18 @@ H5HL_prefix_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
H5F_ENCODE_LENGTH_LEN(p, heap->dblk_size, heap->sizeof_size);
- H5F_ENCODE_LENGTH_LEN(p, fl ? fl->offset : H5HL_FREE_NULL, heap->sizeof_size);
+ H5F_ENCODE_LENGTH_LEN(p, heap->free_block, heap->sizeof_size);
H5F_addr_encode_len(heap->sizeof_addr, &p, heap->dblk_addr);
/* Check if the local heap is a single object in cache */
if(heap->single_cache_obj) {
- if((p - buf) < heap->prfx_size) {
+ if((size_t)(p - buf) < heap->prfx_size) {
size_t gap; /* Size of gap between prefix and data block */
/* Set p to the start of the data block. This is necessary because
* there may be a gap between the used portion of the prefix and the
* data block due to alignment constraints. */
- gap = heap->prfx_size - (p - buf);
+ gap = heap->prfx_size - (size_t)(p - buf);
HDmemset(p, 0, gap);
p += gap;
} /* end if */
@@ -498,7 +499,7 @@ H5HL_prefix_dest(H5F_t *f, void *thing)
H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* Local heap prefix to destroy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_prefix_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(prfx);
@@ -554,7 +555,7 @@ H5HL_prefix_clear(H5F_t UNUSED *f, void *thing, hbool_t destroy)
H5HL_prfx_t *prfx = (H5HL_prfx_t *)thing; /* The local heap prefix to operate on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_prefix_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(prfx);
@@ -590,7 +591,7 @@ H5HL_prefix_size(const H5F_t UNUSED *f, const void *thing, size_t *size_ptr)
{
const H5HL_prfx_t *prfx = (const H5HL_prfx_t *)thing; /* Pointer to local heap prefix to query */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_prefix_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(prfx);
@@ -629,7 +630,7 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */
H5HL_dblk_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -654,7 +655,7 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read local heap data block")
/* Build free list */
- if(H5HL_fl_deserialize(udata->heap, udata->free_block) < 0)
+ if(H5HL_fl_deserialize(udata->heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list")
} /* end if */
@@ -695,7 +696,7 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -707,6 +708,9 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
if(dblk->cache_info.is_dirty) {
H5HL_t *heap = dblk->heap; /* Pointer to the local heap */
+ /* Update the free block value from the free list */
+ heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
+
/* Serialize the free list into the heap data's image */
H5HL_fl_serialize(heap);
@@ -746,7 +750,7 @@ H5HL_datablock_dest(H5F_t *f, void *_thing)
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(dblk);
@@ -796,7 +800,7 @@ H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(dblk);
@@ -832,7 +836,7 @@ H5HL_datablock_size(const H5F_t UNUSED *f, const void *_thing, size_t *size_ptr)
{
const H5HL_dblk_t *dblk = (const H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_datablock_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(dblk);
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index b8a8d35..29d5c82 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -60,7 +60,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
size_t amount_free = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(f);
diff --git a/src/H5HLint.c b/src/H5HLint.c
index c6d6839..d5238eb 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -104,7 +104,7 @@ H5HL_new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size)
H5HL_t *heap = NULL; /* New local heap */
H5HL_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_new, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check arguments */
HDassert(sizeof_size > 0);
@@ -145,7 +145,7 @@ done:
static herr_t
H5HL_inc_rc(H5HL_t *heap)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_inc_rc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(heap);
@@ -174,7 +174,7 @@ H5HL_inc_rc(H5HL_t *heap)
static herr_t
H5HL_dec_rc(H5HL_t *heap)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_dec_rc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(heap);
@@ -206,7 +206,7 @@ H5HL_dec_rc(H5HL_t *heap)
herr_t
H5HL_dest(H5HL_t *heap)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5HL_dest)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(heap);
@@ -252,7 +252,7 @@ H5HL_prfx_new(H5HL_t *heap)
H5HL_prfx_t *prfx = NULL; /* New local heap prefix */
H5HL_prfx_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_prfx_new, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check arguments */
HDassert(heap);
@@ -296,7 +296,7 @@ H5HL_prfx_dest(H5HL_prfx_t *prfx)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_prfx_dest, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(prfx);
@@ -342,7 +342,7 @@ H5HL_dblk_new(H5HL_t *heap)
H5HL_dblk_t *dblk = NULL; /* New local heap data block */
H5HL_dblk_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_dblk_new, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check arguments */
HDassert(heap);
@@ -386,7 +386,7 @@ H5HL_dblk_dest(H5HL_dblk_t *dblk)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HL_dblk_dest, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check arguments */
HDassert(dblk);
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index b7e0ece..bf9be2c 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -90,18 +90,19 @@ struct H5HL_t {
size_t sizeof_size; /* Size of file sizes */
size_t sizeof_addr; /* Size of file addresses */
hbool_t single_cache_obj; /* Indicate if the heap is a single object in the cache */
+ H5HL_free_t *freelist; /*the free list */
/* Prefix-specific fields */
H5HL_prfx_t *prfx; /* The prefix object for the heap */
haddr_t prfx_addr; /* address of heap prefix */
size_t prfx_size; /* size of heap prefix */
+ hsize_t free_block; /* Address of first free block */
/* Data block-specific fields */
H5HL_dblk_t *dblk; /* The data block object for the heap */
haddr_t dblk_addr; /* address of data block */
size_t dblk_size; /* size of heap data block on disk and in mem */
uint8_t *dblk_image; /* The data block image */
- H5HL_free_t *freelist; /*the free list */
};
/* Struct for heap data block */
@@ -127,15 +128,12 @@ typedef struct H5HL_cache_prfx_ud_t {
size_t sizeof_prfx; /* Size of heap prefix */
/* Upwards */
- hbool_t loaded; /* Whether prefix was loaded from file */
- hsize_t free_block; /* First free block in heap */
} H5HL_cache_prfx_ud_t;
/* Callback information for loading local heap data block from disk */
typedef struct H5HL_cache_dblk_ud_t {
/* Downwards */
H5HL_t *heap; /* Local heap */
- hsize_t free_block; /* First free block in heap */
/* Upwards */
hbool_t loaded; /* Whether data block was loaded from file */
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index 8679bee..0b044b6 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -44,7 +44,7 @@
# undef H5HL_DEBUG
#endif
-#define H5HL_ALIGN(X) (((X)+7)&(unsigned)(~0x07)) /*align on 8-byte boundary */
+#define H5HL_ALIGN(X) ((((unsigned)X)+7)&(unsigned)(~0x07)) /*align on 8-byte boundary */
#define H5HL_SIZEOF_FREE(F) \
H5HL_ALIGN(H5F_SIZEOF_SIZE (F) + /*ptr to next free block */ \
diff --git a/src/H5HP.c b/src/H5HP.c
index ad76817..335fde2 100644
--- a/src/H5HP.c
+++ b/src/H5HP.c
@@ -88,7 +88,7 @@ H5HP_swim_max(H5HP_t *heap, size_t loc)
H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HP_swim_max);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -146,7 +146,7 @@ H5HP_swim_min(H5HP_t *heap, size_t loc)
H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HP_swim_min);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -204,7 +204,7 @@ H5HP_sink_max(H5HP_t *heap, size_t loc)
void *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HP_sink_max);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -273,7 +273,7 @@ H5HP_sink_min(H5HP_t *heap, size_t loc)
void *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HP_sink_min);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -339,7 +339,7 @@ H5HP_create(H5HP_type_t heap_type)
H5HP_t *new_heap=NULL; /* Pointer to new heap object created */
H5HP_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_create,NULL);
+ FUNC_ENTER_NOAPI(NULL)
/* Check args */
assert(heap_type==H5HP_MIN_HEAP || heap_type==H5HP_MAX_HEAP);
@@ -413,7 +413,7 @@ H5HP_count(const H5HP_t *heap)
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5HP_count);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(heap);
@@ -460,7 +460,7 @@ H5HP_insert(H5HP_t *heap, int val, void *obj)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_insert,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(heap);
@@ -539,7 +539,7 @@ done:
herr_t
H5HP_top(const H5HP_t *heap, int *val)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5HP_top);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(heap);
@@ -586,7 +586,7 @@ H5HP_remove(H5HP_t *heap, int *val, void **obj)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_remove,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(heap);
@@ -672,7 +672,7 @@ H5HP_change(H5HP_t *heap, int val, void *_obj)
int old_val; /* Object's old priority value */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_change,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(heap);
@@ -757,7 +757,7 @@ H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
size_t obj_loc; /* Location of object in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_incr,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(heap);
@@ -829,7 +829,7 @@ H5HP_decr(H5HP_t *heap, unsigned amt, void *_obj)
size_t obj_loc; /* Location of object in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_decr,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(heap);
@@ -896,7 +896,7 @@ done:
herr_t
H5HP_close(H5HP_t *heap)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5HP_close)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(heap);
diff --git a/src/H5I.c b/src/H5I.c
index 31f0238..fb4ce5a 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -147,7 +147,7 @@ DESCRIPTION
static herr_t
H5I_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5I_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5I_init_interface() */
@@ -176,7 +176,7 @@ H5I_term_interface(void)
H5I_type_t type;
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5I_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
/* How many types are still being used? */
@@ -228,7 +228,7 @@ H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
{
H5I_type_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Iregister_type, H5I_BADID)
+ FUNC_ENTER_API(H5I_BADID)
H5TRACE3("It", "zIux", hash_size, reserved, free_func);
/* Call H5I_register_type with a value of 0 to get a new type */
@@ -270,7 +270,7 @@ H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved,
H5I_id_type_t *type_ptr = NULL; /*ptr to the atomic type*/
H5I_type_t ret_value = H5I_BADID; /* type ID to return */
- FUNC_ENTER_NOAPI(H5I_register_type, H5I_BADID)
+ FUNC_ENTER_NOAPI(H5I_BADID)
/* Check that type_id is either a library type or zero */
if(type_id < 0 || type_id >= H5I_NTYPES)
@@ -371,7 +371,7 @@ H5Itype_exists(H5I_type_t type)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_API(H5Itype_exists, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "It", type);
if(type <= H5I_BADID || type >= H5I_next_type)
@@ -407,7 +407,7 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members)
{
int ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Inmembers, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "It*h", type, num_members);
if(H5I_IS_LIB_TYPE(type))
@@ -457,7 +457,7 @@ H5I_nmembers(H5I_type_t type)
H5I_id_type_t *type_ptr = NULL;
int ret_value;
- FUNC_ENTER_NOAPI(H5I_nmembers, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
@@ -493,7 +493,7 @@ H5Iclear_type(H5I_type_t type, hbool_t force)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Iclear_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "Itb", type, force);
if(H5I_IS_LIB_TYPE(type))
@@ -546,7 +546,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
unsigned i; /* Local index variable */
int ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5I_clear_type, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
@@ -673,7 +673,7 @@ H5Idestroy_type(H5I_type_t type)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Idestroy_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "It", type);
if(H5I_IS_LIB_TYPE(type))
@@ -707,7 +707,7 @@ H5I_destroy_type(H5I_type_t type)
H5I_id_type_t *type_ptr; /* ptr to the atomic type */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5I_destroy_type, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
@@ -748,7 +748,7 @@ H5Iregister(H5I_type_t type, const void *object)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Iregister, H5I_INVALID_HID)
+ FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "It*x", type, object);
if(H5I_IS_LIB_TYPE(type))
@@ -798,7 +798,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
unsigned i; /*counter */
hid_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI(H5I_register, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if(type <= H5I_BADID || type >= H5I_next_type)
@@ -911,7 +911,7 @@ H5I_register_with_id(H5I_type_t type, const void *object, hbool_t app_ref, hid_t
unsigned hash_loc; /*new item's hash table location*/
hid_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI(H5I_register_with_id, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
@@ -980,7 +980,7 @@ H5I_subst(hid_t id, const void *new_object)
H5I_id_info_t *id_ptr; /* Ptr to the atom */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_subst, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* General lookup of the ID */
if(NULL == (id_ptr = H5I_find_id(id)))
@@ -1017,7 +1017,7 @@ H5I_object(hid_t id)
H5I_id_info_t *id_ptr; /*ptr to the new atom */
void *ret_value = NULL; /*return value */
- FUNC_ENTER_NOAPI(H5I_object, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* General lookup of the ID */
if(NULL != (id_ptr = H5I_find_id(id))) {
@@ -1053,7 +1053,7 @@ H5Iobject_verify(hid_t id, H5I_type_t id_type)
{
void * ret_value; /* Return value */
- FUNC_ENTER_API(H5Iobject_verify, NULL)
+ FUNC_ENTER_API(NULL)
if(H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
@@ -1089,7 +1089,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
H5I_id_info_t *id_ptr = NULL; /*ptr to the new atom */
void *ret_value = NULL; /*return value */
- FUNC_ENTER_NOAPI(H5I_object_verify, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(id_type >= 1 && id_type < H5I_next_type);
@@ -1126,7 +1126,7 @@ H5I_get_type(hid_t id)
{
H5I_type_t ret_value = H5I_BADID;
- FUNC_ENTER_NOAPI(H5I_get_type, H5I_BADID)
+ FUNC_ENTER_NOAPI(H5I_BADID)
if(id > 0)
ret_value = H5I_TYPE(id);
@@ -1158,7 +1158,7 @@ H5Iget_type(hid_t id)
{
H5I_type_t ret_value = H5I_BADID; /* Return value */
- FUNC_ENTER_API(H5Iget_type, H5I_BADID)
+ FUNC_ENTER_API(H5I_BADID)
H5TRACE1("It", "i", id);
ret_value = H5I_get_type(id);
@@ -1193,7 +1193,7 @@ H5Iremove_verify(hid_t id, H5I_type_t id_type)
{
void * ret_value; /* Return value */
- FUNC_ENTER_API(H5Iremove_verify, NULL)
+ FUNC_ENTER_API(NULL)
if(H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
@@ -1227,7 +1227,7 @@ H5I_remove_verify(hid_t id, H5I_type_t id_type)
{
void * ret_value = NULL; /*return value */
- FUNC_ENTER_NOAPI(H5I_remove_verify, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Argument checking will be performed by H5I_remove() */
@@ -1265,7 +1265,7 @@ H5I_remove(hid_t id)
unsigned hash_loc; /*atom's hash table location */
void * ret_value = NULL; /*return value */
- FUNC_ENTER_NOAPI(H5I_remove, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
type = H5I_TYPE(id);
@@ -1332,7 +1332,7 @@ H5Idec_ref(hid_t id)
{
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Idec_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", id);
/* Check arguments */
@@ -1373,7 +1373,7 @@ H5I_dec_ref(hid_t id)
H5I_id_info_t *id_ptr; /*ptr to the new ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_dec_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(id >= 0);
@@ -1444,7 +1444,7 @@ H5I_dec_app_ref(hid_t id)
H5I_id_info_t *id_ptr; /*ptr to the new ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_dec_app_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(id >= 0);
@@ -1491,7 +1491,7 @@ H5I_dec_app_ref_always_close(hid_t id)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_dec_app_ref_always_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(id >= 0);
@@ -1535,7 +1535,7 @@ H5Iinc_ref(hid_t id)
{
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Iinc_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", id);
/* Check arguments */
@@ -1579,7 +1579,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref)
H5I_id_info_t *id_ptr; /*ptr to the ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_inc_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(id >= 0);
@@ -1627,7 +1627,7 @@ H5Iget_ref(hid_t id)
{
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Iget_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", id);
/* Check arguments */
@@ -1671,7 +1671,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref)
H5I_id_info_t *id_ptr; /*ptr to the ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_get_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(id >= 0);
@@ -1715,7 +1715,7 @@ H5Iinc_type_ref(H5I_type_t type)
{
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Iinc_type_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "It", type);
/* Check arguments */
@@ -1754,7 +1754,7 @@ H5I_inc_type_ref(H5I_type_t type)
H5I_id_type_t *type_ptr; /* ptr to the type */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_inc_type_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(type > 0 && type < H5I_next_type);
@@ -1799,7 +1799,7 @@ H5Idec_type_ref(H5I_type_t type)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Idec_type_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "It", type);
if(H5I_IS_LIB_TYPE(type))
@@ -1838,7 +1838,7 @@ H5I_dec_type_ref(H5I_type_t type)
H5I_id_type_t *type_ptr; /* Pointer to the ID type */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_dec_type_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(type <= H5I_BADID || type >= H5I_next_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
@@ -1886,7 +1886,7 @@ H5Iget_type_ref(H5I_type_t type)
{
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Iget_type_ref, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "It", type);
/* Check arguments */
@@ -1926,7 +1926,7 @@ H5I_get_type_ref(H5I_type_t type)
H5I_id_type_t *type_ptr; /*ptr to the type */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_get_type_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(type >= 0);
@@ -1965,7 +1965,7 @@ H5Iis_valid(hid_t id)
H5I_id_info_t *id_ptr; /* ptr to the ID */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_API(H5Iis_valid, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", id);
/* Find the ID */
@@ -2010,7 +2010,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
{
void * ret_value; /* Return value */
- FUNC_ENTER_API(H5Isearch, NULL)
+ FUNC_ENTER_API(NULL)
if(H5I_IS_LIB_TYPE(type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
@@ -2055,7 +2055,7 @@ H5I_search(H5I_type_t type, H5I_search_func_t func, void *key, hbool_t app_ref)
H5I_id_type_t *type_ptr; /*ptr to the type */
void *ret_value = NULL; /*return value */
- FUNC_ENTER_NOAPI(H5I_search, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
if(type <= H5I_BADID || type >= H5I_next_type)
@@ -2113,7 +2113,7 @@ H5I_find_id(hid_t id)
unsigned hash_loc; /*bucket pointer */
H5I_id_info_t *ret_value; /*return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5I_find_id)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
type = H5I_TYPE(id);
@@ -2183,7 +2183,7 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size)
H5G_loc_t loc; /* Object location */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Iget_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "ixz", id, name, size);
/* Get object location */
@@ -2219,7 +2219,7 @@ H5Iget_file_id(hid_t obj_id)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Iget_file_id, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", obj_id);
if((ret_value = H5I_get_file_id(obj_id, TRUE)) < 0)
@@ -2250,7 +2250,7 @@ H5I_get_file_id(hid_t obj_id, hbool_t app_ref)
H5I_type_t type; /* ID type */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5I_get_file_id)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get object type */
type = H5I_TYPE(obj_id);
@@ -2305,7 +2305,7 @@ H5I_debug(H5I_type_t type)
unsigned int iu;
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
fprintf(stderr, "Dumping ID type %d\n", (int)type);
type_ptr = H5I_id_type_list_g[type];
diff --git a/src/H5Itest.c b/src/H5Itest.c
index 1c6892d..5236e8d 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -82,7 +82,7 @@ H5I_get_name_test(hid_t id, char *name/*out*/, size_t size, hbool_t *cached)
H5G_loc_t loc; /* Object location */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5I_get_name_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location */
if(H5G_loc(id, &loc) < 0)
diff --git a/src/H5L.c b/src/H5L.c
index 2a9d591..86a2e80 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -17,8 +17,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#define H5G_PACKAGE /*suppress error about including H5Gpkg */
#define H5L_PACKAGE /*suppress error about including H5Lpkg */
/* Interface initialization */
@@ -31,8 +29,8 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Gpkg.h" /* Groups */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
+#include "H5Gprivate.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
#include "H5Lpkg.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
@@ -228,7 +226,7 @@ H5L_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -253,7 +251,7 @@ H5L_init_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize user-defined link classes */
if(H5L_register_external() < 0)
@@ -281,7 +279,7 @@ H5L_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Free the table of link types */
H5L_table_g = (H5L_class_t *)H5MM_xfree(H5L_table_g);
@@ -319,7 +317,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_t dst_loc, *dst_loc_p;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lmove, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id,
lapl_id);
@@ -377,7 +375,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_t dst_loc, *dst_loc_p;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lcopy, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name, lcpl_id,
lapl_id);
@@ -438,7 +436,7 @@ H5Lcreate_soft(const char *link_target,
H5G_loc_t link_loc; /* Group location for new link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lcreate_soft, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*si*sii", link_target, link_loc_id, link_name, lcpl_id, lapl_id);
/* Check arguments */
@@ -484,7 +482,7 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
H5G_loc_t new_loc, *new_loc_p;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lcreate_hard, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*si*sii", cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id,
lapl_id);
@@ -553,7 +551,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
H5G_loc_t link_loc;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lcreate_ud, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sLl*xzii", link_loc_id, link_name, link_type, udata,
udata_size, lcpl_id, lapl_id);
@@ -597,7 +595,7 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id)
H5G_loc_t loc; /* Group's location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Ldelete, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*si", loc_id, name, lapl_id);
/* Check arguments */
@@ -642,7 +640,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
H5L_trav_rmbi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Ldelete_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*sIiIohi", loc_id, group_name, idx_type, order, n, lapl_id);
/* Check arguments */
@@ -701,7 +699,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
H5G_loc_t loc; /* Group location for location to query */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lget_val, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*sxzi", loc_id, name, buf, size, lapl_id);
/* Check arguments */
@@ -751,7 +749,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5L_trav_gvbi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lget_val_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("e", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, buf, size,
lapl_id);
@@ -807,7 +805,7 @@ H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
H5G_loc_t loc;
htri_t ret_value;
- FUNC_ENTER_API(H5Lexists, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
/* Check arguments */
@@ -851,7 +849,7 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
H5G_loc_t loc;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Lget_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sxi", loc_id, name, linfo, lapl_id);
/* Check arguments */
@@ -897,7 +895,7 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
H5L_trav_gibi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lget_info_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIohxi", loc_id, group_name, idx_type, order, n, linfo,
lapl_id);
@@ -957,7 +955,7 @@ H5Lregister(const H5L_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", cls);
/* Check args */
@@ -1004,7 +1002,7 @@ H5Lunregister(H5L_type_t id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lunregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "Ll", id);
/* Check args */
@@ -1041,7 +1039,7 @@ H5Lis_registered(H5L_type_t id)
size_t i; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_API(H5Lis_registered, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "Ll", id);
/* Check args */
@@ -1086,7 +1084,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
H5L_trav_gnbi_t udata; /* User data for callback */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Lget_name_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("Zs", "i*sIiIohxzi", loc_id, group_name, idx_type, order, n, name, size,
lapl_id);
@@ -1158,7 +1156,7 @@ H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
hsize_t idx; /* Internal location to hold index */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Literate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIiIo*hx*x", grp_id, idx_type, order, idx_p, op, op_data);
/* Check arguments */
@@ -1225,7 +1223,7 @@ H5Literate_by_name(hid_t loc_id, const char *group_name,
hsize_t idx; /* Internal location to hold index */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Literate_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, group_name, idx_type, order, idx_p, op,
op_data, lapl_id);
@@ -1300,7 +1298,7 @@ H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
H5I_type_t id_type; /* Type of ID */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Lvisit, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIiIox*x", grp_id, idx_type, order, op, op_data);
/* Check args */
@@ -1357,7 +1355,7 @@ H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Lvisit_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIox*xi", loc_id, group_name, idx_type, order, op, op_data,
lapl_id);
@@ -1414,7 +1412,7 @@ H5L_find_class_idx(H5L_type_t id)
size_t i; /* Local index variable */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_find_class_idx)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
for(i = 0; i < H5L_table_used_g; i++)
if(H5L_table_g[i].id == id)
@@ -1445,7 +1443,7 @@ H5L_find_class(H5L_type_t id)
int idx; /* Filter index in global table */
H5L_class_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5L_find_class, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Get the index in the global table */
if((idx = H5L_find_class_idx(id)) < 0)
@@ -1480,7 +1478,7 @@ H5L_register(const H5L_class_t *cls)
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_register, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cls);
HDassert(cls->id >= 0 && cls->id <= H5L_TYPE_MAX);
@@ -1533,7 +1531,7 @@ H5L_unregister(H5L_type_t id)
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_unregister, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(id >= 0 && id <= H5L_TYPE_MAX);
@@ -1576,7 +1574,7 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc,
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_link)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(new_loc);
@@ -1620,7 +1618,7 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_link_object)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(new_loc);
@@ -1668,7 +1666,7 @@ H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t UNUSED
hbool_t obj_created = FALSE; /* Whether an object was created (through a hard link) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_link_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid location */
/* (which is not what we want) */
@@ -1697,7 +1695,7 @@ H5L_link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t UNUSED
} /* end if */
else {
/* Check that both objects are in same file */
- if(grp_loc->oloc->file->shared != udata->file->shared)
+ if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "interfile hard links are not allowed")
} /* end else */
} /* end if */
@@ -1776,7 +1774,7 @@ done:
oloc.file = grp_loc->oloc->file;
oloc.addr = udata->lnk->u.hard.addr;
- /* Decrement refcount on superblock extension's object header in memory */
+ /* Decrement refcount on new object's object header in memory */
if(H5O_dec_rc_by_loc(&oloc, udata->dxpl_id) < 0)
HDONE_ERROR(H5E_LINK, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
@@ -1831,7 +1829,7 @@ H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
H5L_trav_cr_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_create_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(link_loc);
@@ -1918,7 +1916,7 @@ H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
hbool_t loc_valid = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_create_hard, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(cur_loc);
@@ -1986,7 +1984,7 @@ H5L_create_soft(const char *target_path, const H5G_loc_t *link_loc,
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_create_soft, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(link_loc);
@@ -2035,7 +2033,7 @@ H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name,
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_create_ud)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX);
@@ -2090,7 +2088,7 @@ H5L_get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_val_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(lnk);
@@ -2148,7 +2146,7 @@ H5L_get_val_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char *name, const H5O_link
H5L_trav_gv_t *udata = (H5L_trav_gv_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_val_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(lnk == NULL)
@@ -2193,7 +2191,7 @@ H5L_get_val(H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size,
H5L_trav_gv_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_get_val, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(loc);
@@ -2235,7 +2233,7 @@ H5L_get_val_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
hbool_t lnk_copied = FALSE; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_val_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
if(obj_loc == NULL)
@@ -2284,7 +2282,7 @@ H5L_delete_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
H5L_trav_rm_t *udata = (H5L_trav_rm_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5L_delete_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the group resolved to a valid link */
if(grp_loc == NULL)
@@ -2330,7 +2328,7 @@ H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
char *norm_name = NULL; /* Pointer to normalized name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(loc);
@@ -2374,7 +2372,7 @@ H5L_delete_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5L_delete_by_idx_cb, udata->dxpl_id, obj_loc->oloc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(udata->dxpl_id, obj_loc->oloc->addr, FAIL)
/* Check if the name of the group resolved to a valid object */
if(obj_loc == NULL)
@@ -2420,7 +2418,7 @@ H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
hbool_t temp_loc_init = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_move_dest_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Make sure an object with this name doesn't already exist */
if(obj_loc != NULL)
@@ -2429,7 +2427,7 @@ H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
/* Check for crossing file boundaries with a new hard link */
if(udata->lnk->type == H5L_TYPE_HARD) {
/* Check that both objects are in same file */
- if(grp_loc->oloc->file->shared != udata->file->shared)
+ if(!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
} /* end if */
@@ -2532,7 +2530,7 @@ H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
hbool_t link_copied = FALSE; /* Has udata_out.lnk been allocated? */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_move_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -2651,7 +2649,7 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
hid_t lapl_copy; /* Copy of lapl for this function */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_move)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(src_loc);
@@ -2729,7 +2727,7 @@ H5L_exists_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
{
hbool_t *udata = (hbool_t *)_udata; /* User data passed in */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_exists_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check if the name in this group resolved to a valid link */
*udata = (hbool_t)(lnk != NULL);
@@ -2760,7 +2758,7 @@ H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
hbool_t exists = FALSE; /* Whether the link exists in the group */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_exists)
+ FUNC_ENTER_NOAPI_NOINIT
/* Traverse the group hierarchy to locate the object to get info about */
if(H5G_traverse(loc, name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_exists_cb, &exists, lapl_id, dxpl_id) < 0)
@@ -2794,7 +2792,7 @@ H5L_get_info_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
H5L_trav_gi_t *udata = (H5L_trav_gi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_info_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name in this group resolved to a valid link */
if(lnk == NULL)
@@ -2832,7 +2830,7 @@ H5L_get_info(const H5G_loc_t *loc, const char *name,
H5L_trav_gi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_get_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
udata.linfo = linfo;
udata.dxpl_id = dxpl_id;
@@ -2869,7 +2867,7 @@ H5L_get_info_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
hbool_t lnk_copied = FALSE; /* Whether the link was copied */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_info_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
if(obj_loc == NULL)
@@ -2917,7 +2915,7 @@ H5L_get_default_lcpl(void)
{
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5L_get_default_lcpl, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
ret_value = H5P_LINK_CREATE_DEFAULT;
@@ -2947,7 +2945,7 @@ H5L_get_name_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name,
H5L_trav_gnbi_t *udata = (H5L_trav_gnbi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_get_name_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check if the name of the group resolved to a valid object */
if(obj_loc == NULL)
@@ -2966,3 +2964,137 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5L_get_name_by_idx_cb() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5L_link_copy_file
+ *
+ * Purpose: Copy a link and the object it points to from one file to
+ * another.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Sep 29 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
+ const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info)
+{
+ H5O_link_t tmp_src_lnk; /* Temporary copy of src link, when needed */
+ const H5O_link_t *src_lnk = _src_lnk; /* Source link */
+ hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
+ hbool_t expanded_link_open = FALSE; /* Whether the target location has been opened */
+ H5G_loc_t tmp_src_loc; /* Group location holding target object */
+ H5G_name_t tmp_src_path; /* Path for target object */
+ H5O_loc_t tmp_src_oloc; /* Object location for target object */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* check arguments */
+ HDassert(dst_file);
+ HDassert(src_lnk);
+ HDassert(dst_lnk);
+ HDassert(cpy_info);
+
+ /* Expand soft or external link, if requested */
+ if((H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link)
+ || (H5L_TYPE_EXTERNAL == src_lnk->type
+ && cpy_info->expand_ext_link)) {
+ H5G_loc_t lnk_grp_loc; /* Group location holding link */
+ H5G_name_t lnk_grp_path; /* Path for link */
+ htri_t tar_exists; /* Whether the target object exists */
+
+ /* Set up group location for link */
+ H5G_name_reset(&lnk_grp_path);
+ lnk_grp_loc.path = &lnk_grp_path;
+ lnk_grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */
+
+ /* Check if the target object exists */
+ if((tar_exists = H5G_loc_exists(&lnk_grp_loc, src_lnk->name, H5P_DEFAULT,
+ dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to check if target object exists")
+
+ if(tar_exists) {
+ /* Make a temporary copy of the link, so that it will not change the
+ * info in the cache when we change it to a hard link */
+ if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
+
+ /* Set up group location for target object. Let H5G_traverse expand
+ * the link. */
+ tmp_src_loc.path = &tmp_src_path;
+ tmp_src_loc.oloc = &tmp_src_oloc;
+ if(H5G_loc_reset(&tmp_src_loc) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to reset location")
+
+ /* Find the target object */
+ if(H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc,
+ H5P_DEFAULT, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to find target object")
+ expanded_link_open = TRUE;
+
+ /* Convert symbolic link to hard link */
+ if(tmp_src_lnk.type == H5L_TYPE_SOFT)
+ tmp_src_lnk.u.soft.name =
+ (char *)H5MM_xfree(tmp_src_lnk.u.soft.name);
+ else if(tmp_src_lnk.u.ud.size > 0)
+ tmp_src_lnk.u.ud.udata = H5MM_xfree(tmp_src_lnk.u.ud.udata);
+ tmp_src_lnk.type = H5L_TYPE_HARD;
+ tmp_src_lnk.u.hard.addr = tmp_src_oloc.addr;
+ src_lnk = &tmp_src_lnk;
+ } /* end if */
+ } /* end if */
+
+ /* Copy src link information to dst link information */
+ if(NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy message")
+ dst_lnk_init = TRUE;
+
+ /* Check if object in source group is a hard link & copy it */
+ if(H5L_TYPE_HARD == src_lnk->type) {
+ H5O_loc_t new_dst_oloc; /* Copied object location in destination */
+
+ /* Set up copied object location to fill in */
+ H5O_loc_reset(&new_dst_oloc);
+ new_dst_oloc.file = dst_file;
+
+ if(!expanded_link_open) {
+ /* Build temporary object location for source */
+ H5O_loc_reset(&tmp_src_oloc);
+ tmp_src_oloc.file = src_oloc->file;
+ tmp_src_oloc.addr = src_lnk->u.hard.addr;
+ } /* end if */
+ HDassert(H5F_addr_defined(tmp_src_oloc.addr));
+
+ /* Copy the shared object from source to destination */
+ /* Don't care about obj_type or udata because those are only important
+ * for old style groups */
+ if(H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, dxpl_id, cpy_info,
+ TRUE, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
+
+ /* Copy new destination object's information for eventual insertion */
+ dst_lnk->u.hard.addr = new_dst_oloc.addr;
+ } /* end if */
+
+done:
+ /* Check if we used a temporary src link */
+ if(src_lnk != _src_lnk) {
+ HDassert(src_lnk == &tmp_src_lnk);
+ H5O_msg_reset(H5O_LINK_ID, &tmp_src_lnk);
+ } /* end if */
+ if(ret_value < 0)
+ if(dst_lnk_init)
+ H5O_msg_reset(H5O_LINK_ID, dst_lnk);
+ /* Check if we need to free the temp source oloc */
+ if(expanded_link_open)
+ if(H5G_loc_free(&tmp_src_loc) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free object")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5L_link_copy_file() */
+
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index 29ae754..365124d 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -74,7 +74,7 @@ DESCRIPTION
static herr_t
H5L_init_extern_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_init_extern_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5L_init())
} /* H5L_init_extern_interface() */
@@ -100,7 +100,7 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/)
char *retptr=NULL;
char *strret=NULL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_getenv_prefix_name)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
strret = HDstrchr(*env_prefix, COLON_SEPC);
if (strret == NULL) {
@@ -135,7 +135,7 @@ H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
size_t fname_len; /* Length of external link file name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_build_name)
+ FUNC_ENTER_NOAPI_NOINIT
prefix_len = HDstrlen(prefix);
fname_len = HDstrlen(file_name);
@@ -146,10 +146,9 @@ H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/)
/* Copy the prefix into the buffer */
HDstrcpy(*full_name, prefix);
-#ifndef H5_VMS
+
if (!CHECK_DELIMITER(prefix[prefix_len-1]))
HDstrcat(*full_name, DIR_SEPS);
-#endif
/* Add the external link's filename to the prefix supplied */
HDstrcat(*full_name, file_name);
@@ -219,7 +218,7 @@ H5L_extern_traverse(const char UNUSED *link_name, hid_t cur_group,
H5F_close_degree_t fc_degree = H5F_CLOSE_WEAK; /* File close degree for target file */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5L_extern_traverse, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(p);
@@ -490,7 +489,7 @@ H5L_extern_query(const char UNUSED * link_name, const void *_udata, size_t udata
const uint8_t *udata = (const uint8_t *)_udata; /* Pointer to external link buffer */
ssize_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_extern_query)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check external link version & flags */
if(((*udata >> 4) & 0x0F) != H5L_EXT_VERSION)
@@ -547,7 +546,7 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
uint8_t *p; /* Pointer into external link buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lcreate_external, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*s*si*sii", file_name, obj_name, link_loc_id, link_name,
lcpl_id, lapl_id);
@@ -608,7 +607,7 @@ H5L_register_external(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5L_register_external, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5L_register(H5L_EXTERN_LINK_CLASS) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class")
@@ -651,7 +650,7 @@ H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size,
size_t len; /* Length of the filename in the linkval*/
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Lunpack_elink_val, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xz*Iu**s**s", _ext_linkval, link_size, flags, filename,
obj_path);
diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h
index e02a871..2e931f5 100644
--- a/src/H5Lpkg.h
+++ b/src/H5Lpkg.h
@@ -56,6 +56,9 @@
H5_DLL herr_t H5L_create_ud(const H5G_loc_t *link_loc, const char *link_name,
const void * ud_data, size_t ud_data_size, H5L_type_t type,
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL herr_t H5L_link_copy_file(H5F_t *dst_file, hid_t dxpl_id,
+ const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk,
+ H5O_copy_t *cpy_info);
#endif /* _H5Lpkg_H */
diff --git a/src/H5MF.c b/src/H5MF.c
index a8f12bb..fce151e 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -123,7 +123,7 @@ H5MF_init_merge_flags(H5F_t *f)
hbool_t all_same; /* Whether all the types map to the same value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_init_merge_flags, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -232,7 +232,7 @@ H5MF_alloc_open(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
H5MF_FSPACE_SECT_CLS_SIMPLE};
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_alloc_open)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -279,7 +279,7 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
herr_t ret_value = SUCCEED; /* Return value */
H5FS_create_t fs_create; /* Free space creation parameters */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_alloc_create)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -329,7 +329,7 @@ H5MF_alloc_start(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_alloc_start)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -371,7 +371,7 @@ H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_alloc_close)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -415,7 +415,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size)
H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_alloc, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -541,7 +541,7 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size)
haddr_t eoa; /* End of allocated space in the file */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_alloc_tmp, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: size = %Hu\n", FUNC, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -594,7 +594,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_xfree, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -746,7 +746,7 @@ H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr,
haddr_t end; /* End of block to extend */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_try_extend, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC, (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
@@ -824,7 +824,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si
H5FD_mem_t type; /* Memory type for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_get_freespace, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -926,7 +926,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5MF_sect_ud_t udata; /* User data for callback */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_try_shrink, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -987,7 +987,7 @@ H5MF_close(H5F_t *f, hid_t dxpl_id)
H5FD_mem_t type; /* Memory type for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
@@ -1177,7 +1177,7 @@ H5MF_sects_cb(const H5FS_section_info_t *_sect, void *_udata)
const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect;
H5MF_sect_iter_ud_t *udata = (H5MF_sect_iter_ud_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_sects_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(udata->sect_idx < udata->sect_count) {
udata->sects[udata->sect_idx].addr = sect->sect_info.addr;
@@ -1212,7 +1212,7 @@ H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects,
H5FD_mem_t ty; /* Memory type for iteration */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_get_free_sections, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 9936c3b..05a9241 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -34,7 +34,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fpkg.h" /* File access */
#include "H5MFpkg.h" /* File memory management */
@@ -96,7 +96,7 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size
{
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_aggr_vfd_alloc, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -157,7 +157,7 @@ H5MF_aggr_alloc(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr,
haddr_t eoa = HADDR_UNDEF; /* Initial EOA for the file */
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_aggr_alloc, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI(HADDR_UNDEF)
#ifdef H5MF_AGGR_DEBUG
HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
#endif /* H5MF_AGGR_DEBUG */
@@ -379,7 +379,7 @@ H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type,
{
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_aggr_try_extend, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -446,7 +446,7 @@ H5MF_aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
{
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5MF_aggr_can_absorb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
@@ -497,7 +497,7 @@ herr_t
H5MF_aggr_absorb(const H5F_t UNUSED *f, H5F_blk_aggr_t *aggr, H5MF_free_section_t *sect,
hbool_t allow_sect_absorb)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5MF_aggr_absorb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
@@ -583,7 +583,7 @@ herr_t
H5MF_aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr_t *addr,
hsize_t *size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_aggr_query)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
@@ -619,7 +619,7 @@ H5MF_aggr_reset(H5F_t *f, hid_t dxpl_id, H5F_blk_aggr_t *aggr)
H5FD_mem_t alloc_type; /* Type of file memory to work with */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_aggr_reset)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -682,7 +682,7 @@ H5MF_free_aggrs(H5F_t *f, hid_t dxpl_id)
hsize_t sda_size = 0; /* Size of "small data aggregator" */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_free_aggrs, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 31cff15..bdc811f 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -105,7 +105,7 @@ H5MF_sects_debug_cb(const H5FS_section_info_t *_sect, void *_udata)
H5MF_debug_iter_ud_t *udata = (H5MF_debug_iter_ud_t *)_udata; /* User data for callbacks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sects_debug_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -158,7 +158,7 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind
herr_t ret_value = SUCCEED; /* Return value */
H5FD_mem_t type; /* Memory type for iteration */
- FUNC_ENTER_NOAPI(H5MF_sects_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* Check arguments.
@@ -226,7 +226,7 @@ H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream)
int fwidth = 50; /* Field width */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_sects_dump, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 3f011ec..89b2219 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -134,7 +134,7 @@ H5MF_sect_simple_new(haddr_t sect_off, hsize_t sect_size)
H5MF_free_section_t *sect = NULL; /* 'Simple' free space section to add */
H5MF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sect_simple_new)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect_size);
@@ -180,7 +180,7 @@ H5MF_sect_simple_deserialize(const H5FS_section_class_t UNUSED *cls,
H5MF_free_section_t *sect; /* New section */
H5FS_section_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sect_simple_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -221,7 +221,7 @@ H5MF_sect_simple_can_merge(const H5FS_section_info_t *_sect1,
const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_sect_simple_can_merge)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect1);
@@ -259,7 +259,7 @@ H5MF_sect_simple_merge(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2,
H5MF_free_section_t *sect2 = (H5MF_free_section_t *)_sect2; /* File free section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sect_simple_merge)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect1);
@@ -302,7 +302,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; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sect_simple_can_shrink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -395,7 +395,7 @@ H5MF_sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata)
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(H5MF_sect_simple_shrink)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(sect);
@@ -453,7 +453,7 @@ H5MF_sect_simple_free(H5FS_section_info_t *_sect)
{
H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect; /* File free section */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_sect_simple_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -490,7 +490,7 @@ H5MF_sect_simple_valid(const H5FS_section_class_t UNUSED *cls,
const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect; /* File free section */
#endif /* NDEBUG */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_sect_simple_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(sect);
@@ -517,7 +517,7 @@ H5MF_sect_simple_split(H5FS_section_info_t *sect, hsize_t frag_size)
{
H5MF_free_section_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MF_sect_simple_split)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for new section */
if(NULL == (ret_value = H5MF_sect_simple_new(sect->addr, frag_size)))
diff --git a/src/H5MM.c b/src/H5MM.c
index 1de4880..23ef9f9 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -56,8 +56,8 @@
void *
H5MM_malloc(size_t size)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_malloc);
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(size);
@@ -89,8 +89,8 @@ H5MM_malloc(size_t size)
void *
H5MM_calloc(size_t size)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_calloc);
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(size);
@@ -110,7 +110,8 @@ H5MM_calloc(size_t size)
* H5MM_realloc (NULL, 0) <==> NULL
*
* Return: Success: Ptr to new memory or NULL if the memory
- * was freed.
+ * was freed or HDrealloc couldn't allocate
+ * memory.
*
* Failure: NULL
*
@@ -125,42 +126,37 @@ H5MM_realloc(void *mem, size_t size)
{
void *ret_value;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_realloc)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(NULL == mem) {
if(0 == size)
- mem = NULL;
+ ret_value = NULL;
else
- mem = H5MM_malloc(size);
+ ret_value = H5MM_malloc(size);
} /* end if */
else if(0 == size)
- mem = H5MM_xfree(mem);
+ ret_value = H5MM_xfree(mem);
else
- mem = HDrealloc(mem, size);
-
- /* Set return value */
- ret_value = mem;
+ ret_value = HDrealloc(mem, size);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_realloc() */
/*-------------------------------------------------------------------------
- * Function: H5MM_xstrdup
- *
- * Purpose: Duplicates a string. If the string to be duplicated is the
- * null pointer, then return null. If the string to be duplicated
- * is the empty string then return a new empty string.
+ * Function: H5MM_xstrdup
*
- * Return: Success: Ptr to a new string (or null if no string).
+ * Purpose: Duplicates a string, including memory allocation.
+ * NULL is an acceptable value for the input string.
*
- * Failure: abort()
+ * Return: Success: Pointer to a new string (NULL if s is NULL).
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 10 1997
+ * Failure: abort()
*
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 10 1997
*-------------------------------------------------------------------------
*/
char *
@@ -168,49 +164,48 @@ H5MM_xstrdup(const char *s)
{
char *ret_value = NULL;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_xstrdup)
+ FUNC_ENTER_NOAPI(NULL)
if(s) {
- ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1);
- HDassert(ret_value);
+ if(NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDstrcpy(ret_value, s);
} /* end if */
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MM_xstrdup() */
/*-------------------------------------------------------------------------
- * Function: H5MM_strdup
+ * Function: H5MM_strdup
*
- * Purpose: Duplicates a string. If the string to be duplicated is the
- * null pointer, then return null. If the string to be duplicated
- * is the empty string then return a new empty string.
+ * Purpose: Duplicates a string, including memory allocation.
+ * NULL is NOT an acceptable value for the input string.
*
- * Return: Success: Ptr to a new string (or null if no string).
+ * If the string to be duplicated is the NULL pointer, then
+ * an error will be raised.
*
- * Failure: abort()
+ * Return: Success: Pointer to a new string
*
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Jul 10 1997
- *
- * Modifications:
+ * Failure: abort()
*
+ * Programmer: Robb Matzke
+ * matzke@llnl.gov
+ * Jul 10 1997
*-------------------------------------------------------------------------
*/
char *
H5MM_strdup(const char *s)
{
- char *ret_value;
+ char *ret_value;
- FUNC_ENTER_NOAPI(H5MM_strdup, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(!s)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "null string")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "null string")
if(NULL == (ret_value = (char *)H5MM_malloc(HDstrlen(s) + 1)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDstrcpy(ret_value, s);
done:
@@ -240,8 +235,8 @@ done:
void *
H5MM_xfree(void *mem)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_xfree);
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(mem)
HDfree(mem);
diff --git a/src/H5MP.c b/src/H5MP.c
index b668d0c..4820b76 100644
--- a/src/H5MP.c
+++ b/src/H5MP.c
@@ -92,7 +92,7 @@ H5MP_create(size_t page_size, unsigned flags)
H5MP_pool_t *mp = NULL; /* New memory pool header */
H5MP_pool_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MP_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate space for the pool header */
if(NULL == (mp = H5FL_MALLOC(H5MP_pool_t)))
@@ -143,7 +143,7 @@ H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
H5MP_page_blk_t *first_blk; /* Pointer to first block in page */
H5MP_page_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5MP_new_page)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mp);
@@ -214,7 +214,7 @@ H5MP_malloc (H5MP_pool_t *mp, size_t request)
size_t needed; /* Size requested, plus block header and alignment */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5MP_malloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(mp);
@@ -353,7 +353,7 @@ H5MP_free(H5MP_pool_t *mp, void *spc)
H5MP_page_t *spc_page; /* Page containing block to free */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5MP_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(mp);
@@ -438,7 +438,7 @@ H5MP_close(H5MP_pool_t *mp)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MP_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Release memory for pool pages */
if(mp->first != NULL) {
diff --git a/src/H5MPtest.c b/src/H5MPtest.c
index 2232b94..ccbd140 100644
--- a/src/H5MPtest.c
+++ b/src/H5MPtest.c
@@ -51,7 +51,7 @@
herr_t
H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MP_get_pool_free_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(mp);
@@ -83,7 +83,7 @@ H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
herr_t
H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MP_get_pool_first_page)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(mp);
@@ -122,7 +122,7 @@ H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp)
size_t pool_free; /* Size of pages' free space */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MP_pool_is_free_size_correct)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(mp);
@@ -191,7 +191,7 @@ done:
herr_t
H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MP_get_page_free_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(page);
@@ -223,7 +223,7 @@ H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
herr_t
H5MP_get_page_next_page(const H5MP_page_t *page, H5MP_page_t **next_page)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MP_get_page_next_page)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments. */
HDassert(page);
diff --git a/src/H5O.c b/src/H5O.c
index 22fb2df..5cefabc 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -28,7 +28,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
/* Interface initialization */
@@ -39,8 +38,9 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free lists */
+#include "H5FOprivate.h" /* File objects */
#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
#include "H5MFprivate.h" /* File memory management */
@@ -194,7 +194,7 @@ static const H5O_obj_class_t *const H5O_obj_class_g[] = {
static herr_t
H5O_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* H5O interface sanity checks */
HDassert(H5O_MSG_TYPES == NELMTS(H5O_msg_class_g));
@@ -234,7 +234,7 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
H5G_loc_t loc;
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Oopen, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, name, lapl_id);
/* Check args */
@@ -286,7 +286,7 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
hbool_t loc_found = FALSE; /* Entry at 'name' found */
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Oopen_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("i", "i*sIiIohi", loc_id, group_name, idx_type, order, n, lapl_id);
/* Check args */
@@ -373,7 +373,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
hid_t lapl_id = H5P_LINK_ACCESS_DEFAULT; /* lapl to use to open this object */
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Oopen_by_addr, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "ia", loc_id, addr);
/* Check args */
@@ -429,7 +429,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
H5G_loc_t obj_loc;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Olink, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "ii*sii", obj_id, new_loc_id, new_name, lcpl_id, lapl_id);
/* Check arguments */
@@ -484,7 +484,7 @@ H5Oincr_refcount(hid_t object_id)
H5O_loc_t *oloc;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Oincr_refcount, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Get the object's oloc so we can adjust its link count */
@@ -525,7 +525,7 @@ H5Odecr_refcount(hid_t object_id)
H5O_loc_t *oloc;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Odecr_refcount, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Get the object's oloc so we can adjust its link count */
@@ -559,7 +559,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
H5G_loc_t loc; /* Location info */
hid_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_API(H5Oexists_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("t", "i*si", loc_id, name, lapl_id);
/* Check args */
@@ -601,7 +601,7 @@ H5Oget_info(hid_t loc_id, H5O_info_t *oinfo)
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Oget_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", loc_id, oinfo);
/* Check args */
@@ -638,7 +638,7 @@ H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lap
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Oget_info_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*xi", loc_id, name, oinfo, lapl_id);
/* Check args */
@@ -688,7 +688,7 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
hbool_t loc_found = FALSE; /* Entry at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Oget_info_by_idx, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIoh*xi", loc_id, group_name, idx_type, order, n, oinfo,
lapl_id);
@@ -755,7 +755,7 @@ H5Oset_comment(hid_t obj_id, const char *comment)
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Oset_comment, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", obj_id, comment);
/* Check args */
@@ -795,7 +795,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Oset_comment_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*s*si", loc_id, name, comment, lapl_id);
/* Check args */
@@ -840,7 +840,7 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
H5G_loc_t loc; /* Location of group */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Oget_comment, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "i*sz", obj_id, comment, bufsize);
/* Check args */
@@ -879,7 +879,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
H5G_loc_t loc; /* Location of group */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Oget_comment_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("Zs", "i*s*szi", loc_id, name, comment, bufsize, lapl_id);
/* Check args */
@@ -940,7 +940,7 @@ H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Ovisit, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIiIox*x", obj_id, idx_type, order, op, op_data);
/* Check args */
@@ -998,7 +998,7 @@ H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Ovisit_by_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "i*sIiIox*xi", loc_id, obj_name, idx_type, order, op, op_data,
lapl_id);
@@ -1049,7 +1049,7 @@ H5Oclose(hid_t object_id)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Oclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Get the type of the object and close it in the correct way */
@@ -1119,14 +1119,16 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
hbool_t store_msg_crt_idx; /* Whether to always store message creation indices for this file */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5O_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
- HDassert(f->intent & H5F_ACC_RDWR);
HDassert(loc);
HDassert(TRUE == H5P_isa_class(ocpl_id, H5P_OBJECT_CREATE));
+ /* Check for invalid access request */
+ if(0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
+ HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "no write intent on file")
/* Make certain we allocate at least a reasonable size for the object header */
size_hint = H5O_ALIGN_F(f, MAX(H5O_MIN_SIZE, size_hint));
@@ -1303,7 +1305,7 @@ H5O_open(H5O_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_open, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -1318,7 +1320,7 @@ H5O_open(H5O_loc_t *loc)
if(loc->holding_file)
loc->holding_file = FALSE;
else
- loc->file->nopen_objs++;
+ H5F_INCR_NOPEN_OBJS(loc->file);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1347,7 +1349,7 @@ H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
hbool_t loc_found = FALSE; /* Entry at 'name' found */
hid_t ret_value = FAIL;
- FUNC_ENTER_NOAPI(H5O_open_name, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -1395,7 +1397,7 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t
const H5O_obj_class_t *obj_class; /* Class of object for location */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_open_by_loc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(obj_loc);
@@ -1430,22 +1432,22 @@ H5O_close(H5O_loc_t *loc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
HDassert(loc->file);
- HDassert(loc->file->nopen_objs > 0);
+ HDassert(H5F_NOPEN_OBJS(loc->file) > 0);
/* Decrement open-lock counters */
- --loc->file->nopen_objs;
+ H5F_DECR_NOPEN_OBJS(loc->file);
#ifdef H5O_DEBUG
if(H5DEBUG(O)) {
- if(loc->file->file_id < 0 && 1 == loc->file->shared->nrefs)
+ if(H5F_FILE_ID(loc->file)< 0 && 1 == H5F_NREFS(loc->file))
HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n",
loc->addr,
- (unsigned long)(loc->file->nopen_objs));
+ (unsigned long)H5F_NOPEN_OBJS(loc->file));
else
HDfprintf(H5DEBUG(O), "< %a\n", loc->addr);
} /* end if */
@@ -1455,7 +1457,7 @@ H5O_close(H5O_loc_t *loc)
* If the file open object count has reached the number of open mount points
* (each of which has a group open in the file) attempt to close the file.
*/
- if(loc->file->nopen_objs == loc->file->nmounts)
+ if(H5F_NOPEN_OBJS(loc->file) == H5F_NMOUNTS(loc->file))
/* Attempt to close down the file hierarchy */
if(H5F_try_close(loc->file) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
@@ -1491,7 +1493,7 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_link_oh, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -1607,7 +1609,7 @@ H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id)
hbool_t deleted = FALSE; /* Whether the object was deleted */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_link, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, FAIL)
/* check args */
HDassert(loc);
@@ -1658,7 +1660,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
unsigned file_intent; /* R/W intent on file */
H5O_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_protect, dxpl_id, loc->addr, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, NULL)
/* check args */
HDassert(loc);
@@ -1875,7 +1877,7 @@ H5O_pin(const H5O_loc_t *loc, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header */
H5O_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_pin, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(loc);
@@ -1921,7 +1923,7 @@ H5O_unpin(H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_unpin, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh);
@@ -1957,7 +1959,7 @@ H5O_unprotect(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, unsigned oh_flags)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_unprotect, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -1994,7 +1996,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
time_t now; /* Current time */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_touch_oh)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(oh);
@@ -2088,7 +2090,7 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id)
unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_touch, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -2132,7 +2134,7 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags)
int idx; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_bogus_oh, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(oh);
@@ -2198,7 +2200,7 @@ H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_delete, dxpl_id, addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, addr, FAIL)
/* Check args */
HDassert(f);
@@ -2252,7 +2254,7 @@ H5O_delete_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_delete_oh)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -2291,7 +2293,7 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header for location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_obj_type, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, FAIL)
/* Load the object header */
if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
@@ -2327,7 +2329,7 @@ H5O_obj_type_real(H5O_t *oh, H5O_type_t *obj_type)
{
const H5O_obj_class_t *obj_class; /* Class of object for header */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_obj_type_real)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(oh);
@@ -2369,7 +2371,7 @@ H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header for location */
const H5O_obj_class_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_obj_class, dxpl_id, loc->addr, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, NULL)
/* Load the object header */
if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
@@ -2406,7 +2408,7 @@ H5O_obj_class_real(H5O_t *oh)
size_t i; /* Local index variable */
const H5O_obj_class_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_obj_class_real, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(oh);
@@ -2448,7 +2450,7 @@ H5O_get_loc(hid_t object_id)
{
H5O_loc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_get_loc)
+ FUNC_ENTER_NOAPI_NOINIT
switch(H5I_get_type(object_id)) {
case H5I_GROUP:
@@ -2504,7 +2506,7 @@ done:
herr_t
H5O_loc_reset(H5O_loc_t *loc)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_loc_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(loc);
@@ -2542,7 +2544,7 @@ H5O_loc_reset(H5O_loc_t *loc)
herr_t
H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_loc_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(src);
@@ -2558,7 +2560,7 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
* hold it open, too.
*/
if(src->holding_file)
- dst->file->nopen_objs++;
+ H5F_INCR_NOPEN_OBJS(dst->file);
} else if(depth == H5_COPY_SHALLOW) {
H5O_loc_reset(src);
} /* end if */
@@ -2584,7 +2586,7 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth)
herr_t
H5O_loc_hold_file(H5O_loc_t *loc)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_loc_hold_file)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(loc);
@@ -2592,7 +2594,7 @@ H5O_loc_hold_file(H5O_loc_t *loc)
/* If this location is not already holding its file open, do so. */
if(!loc->holding_file) {
- loc->file->nopen_objs++;
+ H5F_INCR_NOPEN_OBJS(loc->file);
loc->holding_file = TRUE;
} /* end if */
@@ -2620,16 +2622,16 @@ H5O_loc_free(H5O_loc_t *loc)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_loc_free)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
/* If this location is holding its file open try to close the file. */
if(loc->holding_file) {
- loc->file->nopen_objs--;
+ H5F_DECR_NOPEN_OBJS(loc->file);
loc->holding_file = FALSE;
- if(loc->file->nopen_objs <= 0) {
+ if(H5F_NOPEN_OBJS(loc->file) <= 0) {
if(H5F_try_close(loc->file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file")
} /* end if */
@@ -2659,7 +2661,7 @@ H5O_get_hdr_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_hdr_info_t *hdr)
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_hdr_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -2704,7 +2706,7 @@ H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr)
const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_get_hdr_info_real)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(oh);
@@ -2786,7 +2788,7 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_get_info, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, FAIL)
/* Check args */
HDassert(loc);
@@ -2907,7 +2909,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, hid_t dxpl_id, H5P_genplist_t *oc_pli
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_create_plist, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -2962,7 +2964,7 @@ H5O_get_nlinks(const H5O_loc_t *loc, hid_t dxpl_id, hsize_t *nlinks)
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_nlinks, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -3003,7 +3005,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc
size_t u; /* Local index variable */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5O_obj_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity checks */
HDassert(f);
@@ -3051,8 +3053,8 @@ done:
haddr_t
H5O_get_oh_addr(const H5O_t *oh)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_get_oh_addr)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
HDassert(oh->chunk);
@@ -3080,7 +3082,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc, H5O_type_
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_rc_and_type, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -3121,7 +3123,7 @@ done:
static herr_t
H5O_free_visit_visited(void *item, void UNUSED *key, void UNUSED *operator_data/*in,out*/)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_free_visit_visited)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
item = H5FL_FREE(H5_obj_t, item);
@@ -3153,7 +3155,7 @@ H5O_visit_cb(hid_t UNUSED group, const char *name, const H5L_info_t *linfo,
hbool_t obj_found = FALSE; /* Object at 'name' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_visit_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(name);
@@ -3268,7 +3270,7 @@ H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
hid_t obj_id = (-1); /* ID of object */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_visit, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Portably initialize user data struct to zeros */
HDmemset(&udata, 0, sizeof(udata));
@@ -3321,7 +3323,7 @@ H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
udata.op_data = op_data;
/* Create skip list to store visited object information */
- if((udata.visited = H5SL_create(H5SL_TYPE_OBJ)) == NULL)
+ if((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
/* If its ref count is > 1, we add it to the list of visited objects */
@@ -3379,7 +3381,7 @@ H5O_inc_rc(H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_inc_rc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh);
@@ -3415,7 +3417,7 @@ H5O_dec_rc(H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dec_rc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh);
@@ -3453,7 +3455,7 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dec_rc_by_loc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -3494,7 +3496,7 @@ H5O_free(H5O_t *oh)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(oh);
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 8ff9cf6..ff4cc5d 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -112,7 +112,7 @@ H5O_ainfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned char flags; /* Flags for encoding attribute info */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ainfo_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -184,7 +184,7 @@ H5O_ainfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
unsigned char flags; /* Flags for encoding attribute info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ainfo_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -241,7 +241,7 @@ H5O_ainfo_copy(const void *_mesg, void *_dest)
H5O_ainfo_t *dest = (H5O_ainfo_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ainfo_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(ainfo);
@@ -281,7 +281,7 @@ H5O_ainfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ainfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = 1 /* Version */
@@ -310,7 +310,7 @@ H5O_ainfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
static herr_t
H5O_ainfo_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ainfo_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -338,7 +338,7 @@ H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ainfo_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -372,7 +372,7 @@ static herr_t
H5O_ainfo_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ainfo_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(deleted);
@@ -403,13 +403,13 @@ H5O_ainfo_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src,
*/
static void *
H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
- hbool_t *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, hid_t dxpl_id)
+ hbool_t UNUSED *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, hid_t dxpl_id)
{
H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src;
H5O_ainfo_t *ainfo_dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ainfo_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -436,9 +436,6 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
/* Reset metadata tag */
H5_END_TAG(NULL);
-
- if((H5A_dense_copy_file_all(file_src, ainfo_src, file_dst, ainfo_dst, recompute_size, cpy_info, dxpl_id)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes")
} /* end if */
/* Set return value */
@@ -458,7 +455,7 @@ done:
*
* Purpose: Finish copying a message from between files.
* We have to copy the values of a reference attribute in the
- * post copy because H5O_post_copy_file() fails at the case that
+ * post copy because H5O_post_copy_file() fails in the case that
* an object may have a reference attribute that points to the
* object itself.
*
@@ -476,15 +473,15 @@ H5O_ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
const H5O_ainfo_t *ainfo_src = (const H5O_ainfo_t *)mesg_src;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ainfo_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(ainfo_src);
if(H5F_addr_defined(ainfo_src->fheap_addr)) {
- if ( H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc,
- (H5O_ainfo_t *)mesg_dst, dxpl_id, cpy_info) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute")
- }
+ if(H5A_dense_post_copy_file_all(src_oloc, ainfo_src, dst_oloc,
+ (H5O_ainfo_t *)mesg_dst, dxpl_id, cpy_info) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -510,7 +507,7 @@ H5O_ainfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ainfo_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index aba88b4..05322af 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -115,7 +115,7 @@ H5O_add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_add_gap)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -240,7 +240,7 @@ H5O_eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
uint8_t *move_start, *move_end; /* Pointers to area of messages to move */
hbool_t null_before_gap; /* Flag whether the null message is before the gap or not */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_eliminate_gap)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(oh);
@@ -343,7 +343,7 @@ H5O_alloc_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned null_idx,
H5O_mesg_t *alloc_msg; /* Pointer to null message to allocate out of */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_alloc_null)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -450,7 +450,7 @@ H5O_alloc_msgs(H5O_t *oh, size_t min_alloc)
H5O_mesg_t *new_mesg; /* Pointer to new message array */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_alloc_msgs)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -521,7 +521,7 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
unsigned u; /* Local index variable */
htri_t ret_value = TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_alloc_extend_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f != NULL);
@@ -559,26 +559,27 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
/* Check for changing the chunk #0 data size enough to need adjusting the flags */
if(oh->version > H5O_VERSION_1 && chunkno == 0) {
uint64_t chunk0_size; /* Size of chunk 0's data */
+ size_t orig_prfx_size = (size_t)1 << (oh->flags & H5O_HDR_CHUNK0_SIZE); /* Original prefix size */
HDassert(oh->chunk[0].size >= (size_t)H5O_SIZEOF_HDR(oh));
chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
- /* Check for moving from a 1-byte to a 2-byte size encoding */
- if(chunk0_size <= 255 && (chunk0_size + delta) > 255) {
- extra_prfx_size = 1;
- new_size_flags = H5O_HDR_CHUNK0_2;
+ /* Check for moving to a 8-byte size encoding */
+ if(orig_prfx_size < 8 && (chunk0_size + delta) > 4294967295) {
+ extra_prfx_size = 8 - orig_prfx_size;
+ new_size_flags = H5O_HDR_CHUNK0_8;
adjust_size_flags = TRUE;
} /* end if */
- /* Check for moving from a 2-byte to a 4-byte size encoding */
- else if(chunk0_size <= 65535 && (chunk0_size + delta) > 65535) {
- extra_prfx_size = 2;
+ /* Check for moving to a 4-byte size encoding */
+ else if(orig_prfx_size < 4 && (chunk0_size + delta) > 65535) {
+ extra_prfx_size = 4 - orig_prfx_size;
new_size_flags = H5O_HDR_CHUNK0_4;
adjust_size_flags = TRUE;
} /* end if */
- /* Check for moving from a 4-byte to a 8-byte size encoding */
- else if(chunk0_size <= 4294967295 && (chunk0_size + delta) > 4294967295) {
- extra_prfx_size = 4;
- new_size_flags = H5O_HDR_CHUNK0_8;
+ /* Check for moving to a 2-byte size encoding */
+ else if(orig_prfx_size < 2 && (chunk0_size + delta) > 255) {
+ extra_prfx_size = 2 - orig_prfx_size;
+ new_size_flags = H5O_HDR_CHUNK0_2;
adjust_size_flags = TRUE;
} /* end if */
} /* end if */
@@ -646,17 +647,18 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
/* Wipe new space for chunk */
HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
+ /* Move chunk 0 data up if the size flags changed */
+ if(adjust_size_flags)
+ HDmemmove(oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh),
+ oh->chunk[0].image + H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh) - extra_prfx_size,
+ old_size - (size_t)H5O_SIZEOF_HDR(oh) + extra_prfx_size);
+
/* Spin through existing messages, adjusting them */
for(u = 0; u < oh->nmesgs; u++) {
/* Adjust raw addresses for messages in this chunk to reflect new 'image' address */
- if(oh->mesg[u].chunkno == chunkno) {
+ if(oh->mesg[u].chunkno == chunkno)
oh->mesg[u].raw = oh->chunk[chunkno].image + extra_prfx_size + (oh->mesg[u].raw - old_image);
- /* Flag message as dirty directly */
- /* (we mark the entire chunk dirty when we update its size) */
- oh->mesg[u].dirty = TRUE;
- } /* endif */
-
/* Find continuation message which points to this chunk and adjust chunk's size */
/* (Chunk 0 doesn't have a continuation message that points to it and
* it's size is directly encoded in the object header) */
@@ -762,7 +764,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size)
unsigned u; /* Local index variable */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_alloc_new_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -1121,7 +1123,7 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
int idx; /* Index of message which fits allocation */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_alloc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh);
@@ -1205,7 +1207,7 @@ H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg,
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_release_mesg, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -1278,7 +1280,7 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
hbool_t chk_dirtied = FALSE; /* Flags for unprotecting chunk */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_move_cont)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments. */
HDassert(f);
@@ -1330,8 +1332,9 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
move_end = cont_msg->raw + cont_msg->raw_size;
cont_chunkno = cont_msg->chunkno;
- /* Convert continuation message into a null message */
- if(H5O_release_mesg(f, dxpl_id, oh, cont_msg, TRUE) < 0)
+ /* Convert continuation message into a null message. Do not delete
+ * the target chunk yet, so we can still copy messages from it. */
+ if(H5O_release_mesg(f, dxpl_id, oh, cont_msg, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message")
/* Protect chunk */
@@ -1353,7 +1356,6 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
HDmemcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
curr_msg->chunkno = cont_chunkno;
- curr_msg->dirty = TRUE;
chk_dirtied = TRUE;
/* Adjust location to move messages to */
@@ -1361,6 +1363,10 @@ H5O_move_cont(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned cont_u)
} /* end else */
} /* end if */
+ /* Delete the target chunk */
+ if(H5O_chunk_delete(f, dxpl_id, oh, deleted_chunkno) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache")
+
HDassert(move_start <= (move_end + gap_size));
/* Check if there is space remaining in the continuation message */
@@ -1450,7 +1456,7 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
hbool_t did_packing = FALSE; /* Whether any messages were packed */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_move_msgs_forward)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -1734,7 +1740,7 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
hbool_t did_merging = FALSE; /* Whether any messages were merged */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_merge_null)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh != NULL);
@@ -1869,7 +1875,7 @@ H5O_remove_empty_chunks(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
hbool_t did_deleting = FALSE; /* Whether any chunks were deleted */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_remove_empty_chunks)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh != NULL);
@@ -2059,7 +2065,7 @@ H5O_condense_header(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
htri_t result; /* Result from packing/merging/etc */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5O_condense_header, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh != NULL);
@@ -2132,7 +2138,7 @@ H5O_alloc_shrink_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno)
herr_t ret_value = SUCCEED; /* Return value */
unsigned u; /* Index */
- FUNC_ENTER_NOAPI_NOINIT(H5O_alloc_shrink_chunk)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index ce8e4af..8cd243b 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -130,7 +130,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned UNUSED mesg_fl
unsigned flags = 0; /* Attribute flags */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -278,7 +278,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
unsigned flags = 0; /* Attribute flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -381,7 +381,7 @@ H5O_attr_copy(const void *_src, void *_dst)
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(_src);
@@ -418,7 +418,7 @@ H5O_attr_size(const H5F_t UNUSED *f, const void *_mesg)
size_t name_len;
size_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(attr);
@@ -479,7 +479,7 @@ H5O_attr_size(const H5F_t UNUSED *f, const void *_mesg)
herr_t
H5O_attr_reset(void UNUSED *_mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_attr_reset() */
@@ -507,7 +507,7 @@ H5O_attr_free(void *mesg)
H5A_t *attr = (H5A_t *)mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
@@ -537,7 +537,7 @@ H5O_attr_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
H5A_t *attr = (H5A_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -575,7 +575,7 @@ H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *_mesg)
H5A_t *attr = (H5A_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_link)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -616,7 +616,7 @@ static herr_t
H5O_attr_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(deleted);
@@ -653,7 +653,7 @@ H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *mesg_type,
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(native_src);
@@ -698,7 +698,7 @@ H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
if ( H5A_attr_post_copy_file(src_oloc, (const H5A_t *)mesg_src,
dst_oloc, (H5A_t *)mesg_dst, dxpl_id, cpy_info) < 0)
@@ -727,7 +727,7 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
{
const H5A_t *attr = (const H5A_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_get_crt_index)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(attr);
HDassert(crt_idx);
@@ -757,7 +757,7 @@ H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
{
H5A_t *attr = (H5A_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_set_crt_index)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(attr);
@@ -795,7 +795,7 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in
char buf[256]; /* Temporary string buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_debug)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 4a19ed4..fbfc140 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -173,13 +173,13 @@ static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr,
*/
static herr_t
H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */
H5A_t *attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_to_dense_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -199,7 +199,7 @@ H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message")
/* Indicate that the object header was modified */
- *oh_modified = TRUE;
+ *oh_modified = H5O_MODIFY_CONDENSE;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -226,7 +226,7 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
@@ -419,12 +419,12 @@ done:
*/
static herr_t
H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -477,7 +477,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
htri_t found_open_attr = FALSE; /* Whether opened object is found */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_open_by_name, dxpl_id, loc->addr, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, NULL)
/* Check arguments */
HDassert(loc);
@@ -527,7 +527,7 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
/* Check that we found the attribute */
if(!udata.attr)
- HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute")
+ HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name)
/* Get attribute opened from object header */
HDassert(udata.attr);
@@ -575,7 +575,7 @@ H5O_attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr)
H5A_t **ret_attr = (H5A_t **)_ret_attr; /* 'User data' passed in */
herr_t ret_value = H5_ITER_STOP; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_by_idx_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(attr);
@@ -619,7 +619,7 @@ H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
htri_t found_open_attr = FALSE; /* Whether opened object is found */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_open_by_idx)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
@@ -697,7 +697,7 @@ H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char* name_t
size_t num_open_attr; /* Number of opened attributes */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_find_opened_attr)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get file serial number for the location of attribute */
if(H5F_get_fileno(loc->file, &loc_fnum) < 0)
@@ -772,7 +772,7 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr,
htri_t shared_mesg; /* Whether the message should be shared */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_update_shared)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -788,7 +788,7 @@ H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5A_t *attr,
/* Store new version of message as a SOHM */
/* (should always work, since we're not changing the size of the attribute) */
- if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, H5O_ATTR_ID, attr, NULL)) == 0)
+ if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, 0, H5O_ATTR_ID, attr, NULL)) == 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "attribute changed sharing status")
else if(shared_mesg < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't share attribute")
@@ -846,14 +846,14 @@ done:
*/
static herr_t
H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_wrt_t *udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_write_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -895,7 +895,7 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, "unable to update attribute in shared storage")
/* Indicate that the object header was modified */
- *oh_modified = TRUE;
+ *oh_modified = H5O_MODIFY;
/* Indicate that the attribute was found */
udata->found = TRUE;
@@ -932,7 +932,7 @@ H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
H5O_ainfo_t ainfo; /* Attribute information for object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
@@ -1005,12 +1005,12 @@ done:
*/
static herr_t
H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_rename_chk_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(oh);
@@ -1051,14 +1051,14 @@ H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
*/
static herr_t
H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_rename_mod_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -1125,6 +1125,8 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release previous attribute")
+ *oh_modified = H5O_MODIFY_CONDENSE;
+
/* Append renamed attribute to object header */
/* (Don't let it become shared) */
if(H5O_msg_append_real(udata->f, udata->dxpl_id, oh, H5O_MSG_ATTR, (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0)
@@ -1139,7 +1141,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
} /* end else */
/* Indicate that the object header was modified */
- *oh_modified = TRUE;
+ *oh_modified |= H5O_MODIFY;
/* Indicate that we found an existing attribute with the old name */
udata->found = TRUE;
@@ -1177,7 +1179,7 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
H5O_ainfo_t ainfo; /* Attribute information for object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_rename, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL)
/* Check arguments */
HDassert(loc);
@@ -1268,7 +1270,7 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_iterate_real, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL)
/* Check arguments */
HDassert(loc);
@@ -1353,7 +1355,7 @@ H5O_attr_iterate(hid_t loc_id, hid_t dxpl_id,
H5G_loc_t loc; /* Object location */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_iterate)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(attr_op);
@@ -1398,7 +1400,7 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_remove_update)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
@@ -1511,12 +1513,12 @@ done:
*/
static herr_t
H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_remove_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -1530,7 +1532,7 @@ H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message")
/* Indicate that the object header was modified */
- *oh_modified = TRUE;
+ *oh_modified = H5O_MODIFY_CONDENSE;
/* Indicate that this message is the attribute to be deleted */
udata->found = TRUE;
@@ -1564,7 +1566,7 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_remove, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL)
/* Check arguments */
HDassert(loc);
@@ -1649,7 +1651,7 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_remove_by_idx, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL)
/* Check arguments */
HDassert(loc);
@@ -1737,7 +1739,7 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hsize_t *nattrs)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_count_real, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* Check arguments */
HDassert(f);
@@ -1790,12 +1792,12 @@ done:
*/
static herr_t
H5O_attr_exists_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_exists_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(mesg);
@@ -1833,7 +1835,7 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_attr_exists, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, loc->addr, FAIL)
/* Check arguments */
HDassert(loc);
@@ -1905,7 +1907,7 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_bh_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(oh);
@@ -1988,7 +1990,7 @@ H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id)
hsize_t nattrs; /* Number of attributes */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(loc);
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index 99e6bdd..d25a7a3 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -85,7 +85,7 @@ H5O_btreek_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_btreek_t *mesg; /* Native message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_btreek_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -129,7 +129,7 @@ H5O_btreek_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, co
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_btreek_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -167,7 +167,7 @@ H5O_btreek_copy(const void *_mesg, void *_dest)
H5O_btreek_t *dest = (H5O_btreek_t *)_dest;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_btreek_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
@@ -205,7 +205,7 @@ H5O_btreek_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void
{
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_btreek_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -237,7 +237,7 @@ H5O_btreek_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_btreek_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index e64262b..2c33ebe 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -170,7 +170,7 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
haddr_t eoa; /* Relative end of file address */
H5O_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -374,7 +374,7 @@ H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr, H5O_t *
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -520,7 +520,7 @@ H5O_dest(H5F_t *f, H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -583,7 +583,7 @@ H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(oh);
@@ -650,7 +650,7 @@ done:
static herr_t
H5O_size(const H5F_t UNUSED *f, const H5O_t *oh, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(oh);
@@ -690,7 +690,7 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
uint8_t *buf; /* Buffer to decode */
H5O_chunk_proxy_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_cache_chk_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -783,7 +783,7 @@ H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_cache_chk_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* flush */
if(chk_proxy->cache_info.is_dirty) {
@@ -829,7 +829,7 @@ H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_cache_chk_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(chk_proxy);
@@ -901,7 +901,7 @@ H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_cache_chk_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(chk_proxy);
@@ -952,7 +952,7 @@ done:
static herr_t
H5O_cache_chk_size(const H5F_t UNUSED *f, const H5O_chunk_proxy_t *chk_proxy, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cache_chk_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(chk_proxy);
@@ -986,7 +986,7 @@ H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
unsigned contno; /* Continuation message index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_add_cont_msg)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(cont_msg_info);
@@ -1042,7 +1042,7 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
#endif /* NDEBUG */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_chunk_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(oh);
@@ -1373,7 +1373,7 @@ H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_chunk_serialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(f);
@@ -1436,7 +1436,7 @@ H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_chunk_proxy_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(chk_proxy);
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 42b391d..41d3f66 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -97,7 +97,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_chunk_add, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* check args */
HDassert(f);
@@ -151,7 +151,7 @@ H5O_chunk_protect(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for protected chunk */
H5O_chunk_proxy_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_chunk_protect, dxpl_id, oh->cache_info.addr, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, NULL)
/* check args */
HDassert(f);
@@ -225,7 +225,7 @@ H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_chunk_unprotect, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -277,7 +277,7 @@ H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_chunk_resize, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(oh);
@@ -321,7 +321,7 @@ H5O_chunk_update_idx(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_chunk_update_idx, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -373,7 +373,7 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_chunk_delete, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* check args */
HDassert(f);
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index 8ba22cc..b609bfd 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -96,7 +96,7 @@ H5O_cont_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_cont_t *cont = NULL;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_cont_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -137,7 +137,7 @@ H5O_cont_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -176,7 +176,7 @@ H5O_cont_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = H5F_SIZEOF_ADDR(f) + /* Continuation header address */
@@ -201,7 +201,7 @@ H5O_cont_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *
static herr_t
H5O_cont_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -229,7 +229,7 @@ H5O_cont_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5O_cont_t *mesg = (H5O_cont_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_cont_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -266,7 +266,7 @@ H5O_cont_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 1ecd16f..dd649ff 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -186,7 +186,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Ocopy, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name,
ocpypl_id, lcpl_id);
@@ -293,6 +293,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
unsigned mesgno = 0;
haddr_t addr_new = HADDR_UNDEF;
hbool_t *deleted = NULL; /* Array of flags indicating whether messages should be copied */
+ hbool_t inserted = FALSE; /* Whether the destination object header has been inserted into the cache */
size_t null_msgs; /* Number of NULL messages found in each loop */
size_t orig_dst_msgs; /* Original # of messages in dest. object */
H5O_mesg_t *mesg_src; /* Message in source object header */
@@ -307,7 +308,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
size_t msghdr_size;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_copy_header_real, dxpl_id, oloc_src->addr, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, oloc_src->addr, FAIL)
HDassert(oloc_src);
HDassert(oloc_src->file);
@@ -370,9 +371,9 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* Allocate memory for "deleted" array. This array marks the message in
* the source that shouldn't be copied to the destination.
*/
- if(NULL == (deleted = (hbool_t *)HDmalloc(sizeof(hbool_t) * oh_src->nmesgs)))
+ if(NULL == (deleted = (hbool_t *)HDmalloc(sizeof(hbool_t) * oh_src->nmesgs)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
+ HDmemset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs);
/* "pre copy" pass over messages, to gather information for actual message copy operation
* (for messages which depend on information from other messages)
@@ -745,6 +746,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
if(H5AC_insert_entry(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
oh_dst = NULL;
+ inserted = TRUE;
/* Reset metadat tag */
H5_END_TAG(FAIL);
@@ -769,9 +771,13 @@ done:
if(oh_src && H5O_unprotect(oloc_src, dxpl_id, oh_src, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- /* Release pointer to destination object header */
- if(ret_value < 0 && oh_dst && H5O_free(oh_dst) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
+ /* Free destination object header on failure */
+ if(ret_value < 0 && oh_dst && !inserted) {
+ if(H5O_free(oh_dst) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
+ if(H5O_loc_reset(oloc_dst) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
+ } /* end if */
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5O_copy_header_real() */
@@ -800,7 +806,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
hbool_t inc_link; /* Whether to increment the link count for the object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5O_copy_header_map, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(oloc_src);
@@ -899,7 +905,7 @@ H5O_copy_free_addrmap_cb(void *_item, void UNUSED *key, void UNUSED *op_data)
{
H5O_addr_map_t *item = (H5O_addr_map_t *)_item;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_copy_free_addrmap_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(item);
@@ -936,7 +942,7 @@ H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
H5O_copy_t cpy_info; /* Information for copying object */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_copy_header)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oloc_src);
HDassert(oloc_src->file);
@@ -964,12 +970,11 @@ H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
cpy_info.preserve_null = TRUE;
/* Create a skip list to keep track of which objects are copied */
- if((cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ)) == NULL)
+ if((cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, FAIL, "cannot make skip list")
/* copy the object from the source file to the destination file */
- if(H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, &cpy_info, NULL, NULL)
- < 0)
+ if(H5O_copy_header_real(oloc_src, oloc_dst, dxpl_id, &cpy_info, NULL, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
@@ -1006,7 +1011,7 @@ H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name,
unsigned cpy_option = 0; /* Copy options */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_copy_obj, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(src_loc);
HDassert(src_loc->oloc->file);
@@ -1073,7 +1078,7 @@ H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5O_copy_obj_by_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(src_oloc);
HDassert(dst_oloc);
@@ -1141,7 +1146,7 @@ H5O_copy_expand_ref(H5F_t *file_src, void *_src_ref, hid_t dxpl_id,
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5O_copy_expand_ref, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(file_src);
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 81f1e70..5c07b64 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -102,11 +102,11 @@ H5O_assert(const H5O_t *oh)
size_t hdr_size; /* Size of header's chunks */
unsigned u, v; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_assert)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Initialize the tracking variables */
hdr_size = 0;
- meta_space = H5O_SIZEOF_HDR(oh) + (H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1));
+ meta_space = (size_t)H5O_SIZEOF_HDR(oh) + (size_t)(H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1));
mesg_space = 0;
free_space = 0;
@@ -140,7 +140,7 @@ H5O_assert(const H5O_t *oh)
/* Check for correct chunk #0 size flags */
if(oh->version > H5O_VERSION_1) {
- uint64_t chunk0_size = oh->chunk[0].size - H5O_SIZEOF_HDR(oh);
+ uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh);
if(chunk0_size <= 255)
HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1);
@@ -154,13 +154,21 @@ H5O_assert(const H5O_t *oh)
/* Loop over all messages in object header */
for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) {
+ uint8_t *curr_hdr; /* Start of current message header */
+ size_t curr_tot_size; /* Total size of current message (including header) */
+
+ curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
+ curr_tot_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
+
/* Accumulate information, based on the type of message */
if(H5O_NULL_ID == curr_msg->type->id)
- free_space += H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size;
+ free_space += curr_tot_size;
else if(H5O_CONT_ID == curr_msg->type->id) {
H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native;
hbool_t found_chunk = FALSE; /* Found a chunk that matches */
+ HDassert(cont);
+
/* Increment # of continuation messages found */
cont_msgs_found++;
@@ -175,11 +183,14 @@ H5O_assert(const H5O_t *oh)
} /* end for */
HDassert(found_chunk);
- meta_space += H5O_SIZEOF_MSGHDR_OH(oh) + curr_msg->raw_size;
+ meta_space += curr_tot_size;
} /* end if */
else {
- meta_space += H5O_SIZEOF_MSGHDR_OH(oh);
+ meta_space += (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
mesg_space += curr_msg->raw_size;
+
+ /* Make sure the message has a native form if it is marked dirty */
+ HDassert(curr_msg->native || !curr_msg->dirty);
} /* end else */
/* Make certain that the message is in a valid chunk */
@@ -190,17 +201,19 @@ H5O_assert(const H5O_t *oh)
HDassert(oh->chunk[curr_msg->chunkno].gap == 0);
/* Make certain that the message is completely in a chunk message area */
- HDassert(curr_msg->raw_size <= (oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
+ HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
if(curr_msg->chunkno == 0)
- HDassert(curr_msg->raw >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
else
- HDassert(curr_msg->raw >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
+ HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
HDassert(curr_msg->raw + curr_msg->raw_size <= (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[curr_msg->chunkno].gap));
/* Make certain that no other messages overlap this message */
for(v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) {
if(u != v)
- HDassert(!(tmp_msg->raw >= curr_msg->raw && tmp_msg->raw < (curr_msg->raw + curr_msg->raw_size)));
+ HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr
+ && (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh))
+ < (curr_hdr + curr_tot_size)));
} /* end for */
} /* end for */
@@ -237,7 +250,7 @@ H5O_debug_id(unsigned type_id, H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_debug_id,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -284,7 +297,7 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5O_debug_real, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -537,7 +550,7 @@ H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
H5O_loc_t loc; /* Object location for object to delete */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_debug, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index 864fe9e..005b74a 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -86,7 +86,7 @@ H5O_drvinfo_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_drvinfo_t *mesg; /* Native message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_drvinfo_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -143,7 +143,7 @@ H5O_drvinfo_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, c
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_drvinfo_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -183,7 +183,7 @@ H5O_drvinfo_copy(const void *_mesg, void *_dest)
H5O_drvinfo_t *dest = (H5O_drvinfo_t *)_dest;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_drvinfo_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
@@ -230,7 +230,7 @@ H5O_drvinfo_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const voi
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_drvinfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -264,7 +264,7 @@ H5O_drvinfo_reset(void *_mesg)
{
H5O_drvinfo_t *mesg = (H5O_drvinfo_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_drvinfo_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(mesg);
@@ -294,7 +294,7 @@ H5O_drvinfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_drvinfo_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index f419e44..9ccb51b 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -104,7 +104,7 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
H5O_dtype_can_share, /* can share method */
H5O_dtype_pre_copy_file, /* pre copy native value to file */
H5O_dtype_shared_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
+ H5O_dtype_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_dtype_shared_debug /* debug the message */
@@ -134,7 +134,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
size_t z;
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_decode_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(pp && *pp);
@@ -597,7 +597,7 @@ H5O_dtype_encode_helper(const H5F_t *f, uint8_t **pp, const H5T_t *dt)
size_t n, z;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_encode_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(pp && *pp);
@@ -1087,7 +1087,7 @@ H5O_dtype_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, unsigned
H5T_t *dt = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(p);
@@ -1131,7 +1131,7 @@ H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg)
const H5T_t *dt = (const H5T_t *) mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -1171,7 +1171,7 @@ H5O_dtype_copy(const void *_src, void *_dst)
H5T_t *dst;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(src);
@@ -1218,7 +1218,7 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
unsigned u; /* Local index variable */
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(dt);
@@ -1351,7 +1351,7 @@ H5O_dtype_reset(void *_mesg)
{
H5T_t *dt = (H5T_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(dt)
H5T_free(dt);
@@ -1377,7 +1377,7 @@ H5O_dtype_reset(void *_mesg)
static herr_t
H5O_dtype_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -1406,7 +1406,7 @@ H5O_dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
H5T_t *dt = (H5T_t *)_mesg;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_set_share)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dt);
HDassert(sh);
@@ -1462,7 +1462,7 @@ H5O_dtype_can_share(const void *_mesg)
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_can_share)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
@@ -1507,7 +1507,7 @@ H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -1556,7 +1556,7 @@ H5O_dtype_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t *mesg_type,
H5T_t *dst_mesg; /* Destination datatype */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* Perform a normal copy of the object header message */
if(NULL == (dst_mesg = (H5T_t *)H5O_dtype_copy(native_src, NULL)))
@@ -1604,7 +1604,7 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
unsigned i;
size_t k;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index b97138f..e4b21f0 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -99,7 +99,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh,
size_t u; /* Local index variable */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_efl_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -197,7 +197,7 @@ H5O_efl_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -261,7 +261,7 @@ H5O_efl_copy(const void *_mesg, void *_dest)
size_t u; /* Local index variable */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_efl_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -345,7 +345,7 @@ H5O_efl_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
size_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -382,7 +382,7 @@ H5O_efl_reset(void *_mesg)
H5O_efl_t *mesg = (H5O_efl_t *) _mesg;
size_t u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(mesg);
@@ -420,7 +420,7 @@ H5O_efl_total_size (H5O_efl_t *efl)
{
hsize_t ret_value = 0, tmp;
- FUNC_ENTER_NOAPI_NOINIT(H5O_efl_total_size)
+ FUNC_ENTER_NOAPI_NOINIT
if(efl->nused > 0 && H5O_EFL_UNLIMITED == efl->slot[efl->nused - 1].size)
ret_value = H5O_EFL_UNLIMITED;
@@ -464,7 +464,7 @@ H5O_efl_copy_file(H5F_t UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
size_t idx, size, name_offset, heap_size;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_efl_copy_file, dxpl_id, H5AC__COPIED_TAG, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__COPIED_TAG, NULL)
/* check args */
HDassert(efl_src);
@@ -548,7 +548,7 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s
char buf[64];
size_t u;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index c7c743a..9fa6108 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -120,7 +120,7 @@ const H5O_msg_class_t H5O_MSG_FILL[1] = {{
NULL, /*can share method */
NULL, /* pre copy native value to file */
H5O_fill_shared_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
+ H5O_fill_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_fill_shared_debug /*debug the message */
@@ -144,7 +144,7 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
NULL, /*can share method */
NULL, /* pre copy native value to file */
H5O_fill_new_shared_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
+ H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_fill_new_shared_debug /*debug the message */
@@ -188,7 +188,7 @@ H5O_fill_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh
H5O_fill_t *fill = NULL;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_fill_new_decode)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(p);
@@ -302,7 +302,7 @@ H5O_fill_old_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh
H5O_fill_t *fill = NULL; /* Decoded fill value message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_fill_old_decode)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(f);
HDassert(p);
@@ -361,7 +361,7 @@ H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(p);
@@ -457,7 +457,7 @@ H5O_fill_old_encode(H5F_t UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_old_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(p);
@@ -494,7 +494,7 @@ H5O_fill_copy(const void *_src, void *_dst)
H5O_fill_t *dst = (H5O_fill_t *)_dst;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_fill_copy)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(src);
@@ -611,7 +611,7 @@ H5O_fill_new_size(const H5F_t UNUSED *f, const void *_fill)
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(fill);
@@ -658,7 +658,7 @@ H5O_fill_old_size(const H5F_t UNUSED *f, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_old_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(fill);
@@ -684,7 +684,7 @@ H5O_fill_reset_dyn(H5O_fill_t *fill)
hid_t fill_type_id = -1; /* Datatype ID for fill value datatype when reclaiming VL fill values */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_reset_dyn, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(fill);
@@ -749,7 +749,7 @@ H5O_fill_reset(void *_fill)
{
H5O_fill_t *fill = (H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(fill);
@@ -780,7 +780,7 @@ H5O_fill_reset(void *_fill)
static herr_t
H5O_fill_free(void *fill)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(fill);
@@ -809,7 +809,7 @@ H5O_fill_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_fill, FILE *s
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
H5D_fill_value_t fill_status; /* Whether the fill value is defined */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
HDassert(fill);
@@ -912,7 +912,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_fill_convert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(fill);
HDassert(dset_type);
@@ -1007,7 +1007,7 @@ done:
herr_t
H5O_fill_set_latest_version(H5O_fill_t *fill)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5O_fill_set_latest_version)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(fill);
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 2b9bd40..94c0154 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -28,7 +28,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /* suppress error about including H5Fpkg */
#define H5O_PACKAGE /* suppress error about including H5Opkg */
/***********/
@@ -37,7 +36,9 @@
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Errors */
-#include "H5Fpkg.h" /* Files */
+#include "H5Fprivate.h" /* Files */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
#include "H5Opkg.h" /* Objects */
/*************/
@@ -63,7 +64,7 @@ H5Oflush(hid_t obj_id)
H5O_loc_t *oloc; /* object location */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Oflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", obj_id);
/* Check args */
@@ -99,7 +100,7 @@ H5O_flush_metadata(const H5O_loc_t *oloc, hid_t dxpl_id)
herr_t ret_value = SUCCEED; /* Return value */
haddr_t tag = 0;
- FUNC_ENTER_NOAPI(H5O_flush_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(oloc);
@@ -150,7 +151,7 @@ H5Orefresh(hid_t oid)
H5O_loc_t *oloc; /* object location */
hid_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Orefresh, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", oid);
/* Check args */
@@ -193,7 +194,7 @@ H5O_refresh_metadata(hid_t oid, H5O_loc_t oloc, hid_t dxpl_id)
hid_t ret_value = SUCCEED;
H5I_type_t type;
- FUNC_ENTER_NOAPI(H5O_refresh_metadata, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the object's object header */
if(NULL == (oh = H5O_protect(&oloc, dxpl_id, H5AC_READ)))
@@ -210,12 +211,9 @@ H5O_refresh_metadata(hid_t oid, H5O_loc_t oloc, hid_t dxpl_id)
H5G_loc_copy(&obj_loc, &tmp_loc, H5_COPY_DEEP);
/* Get object header's address (i.e. the tag value for this object) */
- if (HADDR_UNDEF == (tag = H5O_OH_GET_ADDR(oh)))
+ if(HADDR_UNDEF == (tag = H5O_OH_GET_ADDR(oh)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get address of object header")
- /* Get object's type */
- type = H5I_get_type(oid);
-
/* Unprotect object header before attempting to flush it */
if(oh && H5O_unprotect(&oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
@@ -224,15 +222,15 @@ H5O_refresh_metadata(hid_t oid, H5O_loc_t oloc, hid_t dxpl_id)
oh = NULL;
/* Close the object */
- if(H5I_dec_ref(oid, TRUE) < 0)
+ if(H5I_dec_ref(oid) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to close object")
/* Flush the object's metadata before evicting it */
- if (H5O_flush_metadata(&oloc, dxpl_id) < 0)
+ if(H5O_flush_metadata(&oloc, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush object's metadata")
/* Evict the object's tagged metadata */
- if (H5F_evict_tagged_metadata(oloc.file, tag, dxpl_id)<0)
+ if(H5F_evict_tagged_metadata(oloc.file, tag, dxpl_id)<0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to evict metadata")
switch (type)
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 49a46fa..3f0b15d 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -91,7 +91,7 @@ H5O_fsinfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5FD_mem_t type; /* Memory type for iteration */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_fsinfo_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -146,7 +146,7 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5FD_mem_t type; /* Memory type for iteration */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -187,7 +187,7 @@ H5O_fsinfo_copy(const void *_mesg, void *_dest)
H5O_fsinfo_t *dest = (H5O_fsinfo_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_fsinfo_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(fsinfo);
@@ -226,7 +226,7 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg
size_t fs_addr_size = 0;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Addresses of free-space managers exist only for H5F_FILE_SPACE_ALL_PERSIST type */
@@ -255,7 +255,7 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg
static herr_t
H5O_fsinfo_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -283,7 +283,7 @@ H5O_fsinfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
H5FD_mem_t type; /* Memory type for iteration */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 622edb3..418b053 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -102,7 +102,7 @@ H5O_ginfo_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned char flags; /* Flags for encoding group info */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ginfo_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(p);
@@ -173,7 +173,7 @@ H5O_ginfo_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, con
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
unsigned char flags; /* Flags for encoding group info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ginfo_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(p);
@@ -226,7 +226,7 @@ H5O_ginfo_copy(const void *_mesg, void *_dest)
H5O_ginfo_t *dest = (H5O_ginfo_t *)_dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_ginfo_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(ginfo);
@@ -267,7 +267,7 @@ H5O_ginfo_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ginfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = 1 + /* Version */
@@ -300,7 +300,7 @@ H5O_ginfo_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void
static herr_t
H5O_ginfo_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ginfo_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -329,7 +329,7 @@ H5O_ginfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ginfo_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index aec3c0a..8946d9b 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -106,7 +106,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned u;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -350,6 +350,8 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
mesg->ops = H5D_LOPS_CHUNK;
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class")
} /* end switch */
@@ -408,7 +410,7 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -514,6 +516,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
} /* end else */
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid layout class")
} /* end switch */
@@ -545,7 +549,7 @@ H5O_layout_copy(const void *_mesg, void *_dest)
H5O_layout_t *dest = (H5O_layout_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -605,7 +609,7 @@ H5O_layout_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -638,7 +642,7 @@ H5O_layout_reset(void *_mesg)
H5O_layout_t *mesg = (H5O_layout_t *)_mesg;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_reset)
+ FUNC_ENTER_NOAPI_NOINIT
if(mesg) {
/* Reset associated storage information, if it's been initialized */
@@ -674,7 +678,7 @@ H5O_layout_free(void *_mesg)
H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
@@ -707,7 +711,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -734,6 +738,8 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "not valid storage type")
} /* end switch */
@@ -766,7 +772,7 @@ H5O_layout_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src,
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(layout_src);
@@ -810,7 +816,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
hbool_t copied = FALSE; /* Whether the data was copied */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_layout_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -860,6 +866,8 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
} /* end if */
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class")
} /* end switch */
@@ -905,7 +913,7 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg,
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -986,6 +994,8 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg,
"Data Size:", mesg->storage.u.compact.size);
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
"Type:", "Unknown", (unsigned)mesg->type);
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index 7644131..acdd1e1 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -25,12 +25,14 @@
*/
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free lists */
#include "H5Gpkg.h" /* Groups */
+#include "H5Lpkg.h" /* Links */
#include "H5Opkg.h" /* Object headers */
@@ -118,7 +120,7 @@ H5O_linfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned char index_flags; /* Flags for encoding link index info */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_linfo_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -191,7 +193,7 @@ H5O_linfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
unsigned char index_flags; /* Flags for encoding link index info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_linfo_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -248,7 +250,7 @@ H5O_linfo_copy(const void *_mesg, void *_dest)
H5O_linfo_t *dest = (H5O_linfo_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_linfo_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(linfo);
@@ -288,7 +290,7 @@ H5O_linfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_linfo_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = 1 /* Version */
@@ -317,7 +319,7 @@ H5O_linfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
static herr_t
H5O_linfo_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_linfo_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -345,7 +347,7 @@ H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
H5O_linfo_t *linfo = (H5O_linfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_linfo_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -353,7 +355,7 @@ H5O_linfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
/* If the group is using "dense" link storage, delete it */
if(H5F_addr_defined(linfo->fheap_addr))
- if(H5G_dense_delete(f, dxpl_id, linfo, TRUE) < 0)
+ if(H5G__dense_delete(f, dxpl_id, linfo, TRUE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense link storage")
done:
@@ -385,7 +387,7 @@ H5O_linfo_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst,
H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *) _udata;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_linfo_copy_file, dxpl_id, H5AC__COPIED_TAG, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__COPIED_TAG, NULL)
/* check args */
HDassert(linfo_src);
@@ -413,7 +415,7 @@ H5O_linfo_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst,
*/
if(H5F_addr_defined(linfo_src->fheap_addr)) {
/* Create the dense link storage */
- if(H5G_dense_create(file_dst, dxpl_id, linfo_dst, udata->common.src_pline) < 0)
+ if(H5G__dense_create(file_dst, dxpl_id, linfo_dst, udata->common.src_pline) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create 'dense' form of new format group")
} /* end if */
} /* end else */
@@ -453,14 +455,14 @@ H5O_linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
hbool_t dst_lnk_init = FALSE; /* Whether the destination link is initialized */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_linfo_post_copy_file_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
HDassert(src_lnk);
HDassert(udata);
/* Copy the link (and the object it points to) */
- if(H5G_link_copy_file(udata->dst_oloc->file, udata->dxpl_id, src_lnk,
+ if(H5L_link_copy_file(udata->dst_oloc->file, udata->dxpl_id, src_lnk,
udata->src_oloc, &dst_lnk, udata->cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy link")
dst_lnk_init = TRUE;
@@ -470,7 +472,7 @@ H5O_linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
/* Insert the new object in the destination file's group */
/* (Doesn't increment the link count - that's already been taken care of for hard links) */
- if(H5G_dense_insert(udata->dst_oloc->file, udata->dxpl_id, udata->dst_linfo, &dst_lnk) < 0)
+ if(H5G__dense_insert(udata->dst_oloc->file, udata->dxpl_id, udata->dst_linfo, &dst_lnk) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert destination link")
/* Reset metadata tag in dxpl_id */
@@ -505,7 +507,7 @@ H5O_linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
H5O_linfo_t *linfo_dst = (H5O_linfo_t *)mesg_dst;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_linfo_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(src_oloc && src_oloc->file);
@@ -531,7 +533,7 @@ H5O_linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
udata.cpy_info = cpy_info;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5G_dense_iterate(src_oloc->file, dxpl_id, linfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5O_linfo_post_copy_file_cb, &udata) < 0)
+ if(H5G__dense_iterate(src_oloc->file, dxpl_id, linfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5O_linfo_post_copy_file_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
} /* end if */
@@ -559,7 +561,7 @@ H5O_linfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_linfo_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 7e14558..ccc6d0e 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -25,6 +25,7 @@
*/
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+#define H5L_PACKAGE /*suppress error about including H5Lpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#include "H5private.h" /* Generic Functions */
@@ -32,7 +33,7 @@
#include "H5FLprivate.h" /* Free lists */
#include "H5Gpkg.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
-#include "H5Lprivate.h" /* Links */
+#include "H5Lpkg.h" /* Links */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
@@ -124,7 +125,7 @@ H5O_link_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned char link_flags; /* Flags for encoding link info */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_link_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -281,7 +282,7 @@ H5O_link_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
uint64_t len; /* Length of a string in the message */
unsigned char link_flags; /* Flags for encoding link info */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_link_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -405,7 +406,7 @@ H5O_link_copy(const void *_mesg, void *_dest)
H5O_link_t *dest = (H5O_link_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_link_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(lnk);
@@ -474,7 +475,7 @@ H5O_link_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
size_t name_size; /* Size of encoded name length */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_link_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Get name's length */
name_len = (uint64_t)HDstrlen(lnk->name);
@@ -538,7 +539,7 @@ H5O_link_reset(void *_mesg)
{
H5O_link_t *lnk = (H5O_link_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_link_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(lnk) {
/* Free information for link (but don't free link pointer) */
@@ -572,7 +573,7 @@ H5O_link_free(void *_mesg)
{
H5O_link_t *lnk = (H5O_link_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_link_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(lnk);
@@ -602,7 +603,7 @@ H5O_link_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
H5O_link_t *lnk = (H5O_link_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_link_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -675,7 +676,7 @@ static herr_t
H5O_link_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_link_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(deleted);
@@ -715,7 +716,7 @@ H5O_link_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t UNUSED *file_
H5O_link_t *link_src = (H5O_link_t *)native_src;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_link_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(link_src);
@@ -756,7 +757,7 @@ H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
H5O_link_t *link_dst = (H5O_link_t *)mesg_dst;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_link_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(link_src);
@@ -768,7 +769,7 @@ H5O_link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
HDassert(cpy_info->max_depth < 0 || cpy_info->curr_depth < cpy_info->max_depth);
/* Copy the link (and the object it points to) */
- if(H5G_link_copy_file(dst_oloc->file, dxpl_id, link_src, src_oloc, link_dst,
+ if(H5L_link_copy_file(dst_oloc->file, dxpl_id, link_src, src_oloc, link_dst,
cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy link")
@@ -797,7 +798,7 @@ H5O_link_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_link_debug)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 0dd4565..f12c835 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -75,7 +75,7 @@ typedef struct {
static herr_t H5O_msg_reset_real(const H5O_msg_class_t *type, void *native);
static herr_t H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
- unsigned sequence, hbool_t *oh_modified, void *_udata/*in,out*/);
+ unsigned sequence, unsigned *oh_modified, void *_udata/*in,out*/);
static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
unsigned update_flags);
@@ -119,7 +119,7 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_create, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -167,7 +167,7 @@ H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
const H5O_msg_class_t *type; /* Original H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_append_oh, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -210,7 +210,7 @@ H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *t
int idx; /* Index of message to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_append_real, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -263,7 +263,7 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -318,7 +318,7 @@ H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_msg_write_oh, dxpl_id, oh->cache_info.addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
/* check args */
HDassert(f);
@@ -367,7 +367,7 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
unsigned idx; /* Index of message to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_write_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -419,7 +419,7 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
* XXX: This doesn't handle freeing extra space in object header from
* a message shrinking.
*/
- if((status = H5SM_try_share(f, dxpl_id, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), idx_msg->type->id, mesg, &mesg_flags)) < 0)
+ if((status = H5SM_try_share(f, dxpl_id, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), 0, idx_msg->type->id, mesg, &mesg_flags)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
if(status == FALSE && (mesg_flags & H5O_MSG_FLAG_SHARED))
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status")
@@ -467,7 +467,7 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg,
H5O_t *oh = NULL; /* Object header to use */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_msg_read, dxpl_id, loc->addr, NULL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, NULL)
/* check args */
HDassert(loc);
@@ -522,7 +522,7 @@ H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
unsigned idx; /* Message's index in object header */
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_read_oh)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -578,7 +578,7 @@ H5O_msg_reset(unsigned type_id, void *native)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_reset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -614,7 +614,7 @@ H5O_msg_reset_real(const H5O_msg_class_t *type, void *native)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_reset_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(type);
@@ -654,7 +654,7 @@ H5O_msg_free(unsigned type_id, void *mesg)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
void * ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5O_msg_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -683,7 +683,7 @@ H5O_msg_free(unsigned type_id, void *mesg)
herr_t
H5O_msg_free_mesg(H5O_mesg_t *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_msg_free_mesg)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(mesg);
@@ -713,7 +713,7 @@ H5O_msg_free_mesg(H5O_mesg_t *mesg)
void *
H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_msg_free_real)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(type);
@@ -751,7 +751,7 @@ H5O_msg_copy(unsigned type_id, const void *mesg, void *dst)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_copy, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(mesg);
@@ -790,7 +790,7 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_count, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(loc);
@@ -836,7 +836,7 @@ H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
unsigned u; /* Local index variable */
unsigned ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_msg_count_real)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(oh);
@@ -875,7 +875,7 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header for location */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5O_msg_exists, dxpl_id, loc->addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, loc->addr, FAIL)
HDassert(loc);
HDassert(loc->file);
@@ -922,7 +922,7 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
unsigned u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_msg_exists_oh)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -967,7 +967,7 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -1019,7 +1019,7 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_remove_op, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -1063,13 +1063,13 @@ done:
*/
static herr_t
H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- hbool_t *oh_modified, void *_udata/*in,out*/)
+ unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
htri_t try_remove = FALSE; /* Whether to try removing a message */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_remove_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -1098,7 +1098,7 @@ H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release message")
/* Indicate that the object header was modified */
- *oh_modified = TRUE;
+ *oh_modified = H5O_MODIFY_CONDENSE;
/* Break out now, if we've found the correct message */
if(udata->sequence == H5O_FIRST || udata->sequence != H5O_ALL)
@@ -1136,7 +1136,7 @@ H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
H5O_mesg_operator_t op; /* Wrapper for operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_remove_real, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -1210,7 +1210,7 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_iterate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -1275,10 +1275,10 @@ H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
H5O_mesg_t *idx_msg; /* Pointer to current message */
unsigned idx; /* Absolute index of current message in all messages */
unsigned sequence; /* Relative index of current message for messages of type */
- hbool_t oh_modified = FALSE; /* Whether the callback modified the object header */
+ unsigned oh_modified = 0; /* Whether the callback modified the object header */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_iterate_real)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -1320,8 +1320,10 @@ done:
* object header, the header will be condensed after each
* message removal)
*/
- if(H5O_condense_header(f, oh, dxpl_id) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
+ if(oh_modified & H5O_MODIFY_CONDENSE) {
+ if(H5O_condense_header(f, oh, dxpl_id) < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
+ }
/* Mark object header as changed */
if(H5O_touch_oh(f, dxpl_id, oh, FALSE) < 0)
@@ -1357,7 +1359,7 @@ H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_raw_size, 0)
+ FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1402,7 +1404,7 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id,
uint8_t oh_flags; /* Object header status flags */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_size_f, 0)
+ FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1464,7 +1466,7 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_size_oh, 0)
+ FUNC_ENTER_NOAPI(0)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1515,7 +1517,7 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOFUNC(H5O_msg_can_share)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1534,6 +1536,10 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
ret_value = (type->share_flags & H5O_SHARE_IS_SHARABLE) ? TRUE : FALSE;
} /* end else */
+ /* If the message is shareable, both copy_file and post_copy_file must be
+ * defined */
+ HDassert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
@@ -1558,7 +1564,7 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOFUNC(H5O_msg_can_share_in_ohdr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1596,7 +1602,7 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOFUNC(H5O_msg_is_shared)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1634,7 +1640,7 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_set_share, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1684,7 +1690,7 @@ H5O_msg_reset_share(unsigned type_id, void *mesg)
{
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
- FUNC_ENTER_NOAPI_NOFUNC(H5O_msg_reset_share)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1719,7 +1725,7 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5O_msg_get_crt_index, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
@@ -1765,7 +1771,7 @@ H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_encode,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -1811,7 +1817,7 @@ H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
void *ret_value; /* Return value */
unsigned ioflags = 0; /* Flags for decode routine */
- FUNC_ENTER_NOAPI(H5O_msg_decode, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(f);
@@ -1853,7 +1859,7 @@ H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src,
{
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(type);
@@ -1895,7 +1901,7 @@ H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_msg_alloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -1916,7 +1922,7 @@ H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
} /* end if */
else {
/* Attempt to share message */
- if(H5SM_try_share(f, dxpl_id, oh, type->id, native, mesg_flags) < 0)
+ if(H5SM_try_share(f, dxpl_id, oh, 0, type->id, native, mesg_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
} /* end else */
@@ -1959,7 +1965,7 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_copy_mesg)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -2034,7 +2040,7 @@ H5O_msg_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_delete, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(f);
@@ -2072,7 +2078,7 @@ H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_mesg_t *mesg)
const H5O_msg_class_t *type = mesg->type; /* Type of object to free */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_delete_mesg, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(f);
@@ -2113,7 +2119,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
unsigned msg_id; /* ID for message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_flush, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -2155,9 +2161,8 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
/* Make certain that null messages aren't in chunks w/gaps */
if(H5O_NULL_ID == msg_id)
HDassert(oh->chunk[mesg->chunkno].gap == 0);
-
- /* Unknown messages should always have a native pointer */
- if(mesg->type == H5O_MSG_UNKNOWN)
+ else
+ /* Non-null messages should always have a native pointer */
HDassert(mesg->native);
#endif /* NDEBUG */
@@ -2215,7 +2220,7 @@ H5O_flush_msgs(H5F_t *f, H5O_t *oh)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_flush_msgs, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(f);
@@ -2266,7 +2271,7 @@ H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
unsigned idx; /* Index of message to modify */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_get_chunkno, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -2321,7 +2326,7 @@ H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
unsigned idx; /* Index of message to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_lock, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
@@ -2379,7 +2384,7 @@ H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id)
unsigned idx; /* Index of message to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_unlock, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(loc);
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 731d833..612d656 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -105,8 +105,11 @@ H5FL_DEFINE(time_t);
/*-------------------------------------------------------------------------
* Function: H5O_mtime_new_decode
*
- * Purpose: Decode a new modification time message and return a pointer to a
- * new time_t value.
+ * Purpose: Decode a new modification time message and return a pointer to
+ * a new time_t value.
+ *
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
* Return: Success: Ptr to new message in native struct.
*
@@ -126,11 +129,11 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_o
uint32_t tmp_time; /* Temporary copy of the time */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_new_decode);
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
- assert(f);
- assert(p);
+ HDassert(f);
+ HDassert(p);
/* decode */
if(*p++ != H5O_MTIME_VERSION)
@@ -151,15 +154,18 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_o
ret_value=mesg;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_mtime_new_decode() */
/*-------------------------------------------------------------------------
* Function: H5O_mtime_decode
*
- * Purpose: Decode a modification time message and return a pointer to a
- * new time_t value.
+ * Purpose: Decode a modification time message and return a pointer to a
+ * new time_t value.
+ *
+ * The new modification time message format was added due to the
+ * performance overhead of the old format.
*
* Return: Success: Ptr to new message in native struct.
*
@@ -180,7 +186,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
struct tm tm;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -287,12 +293,12 @@ H5O_mtime_new_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p,
{
const time_t *mesg = (const time_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_new_encode);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(p);
- assert(mesg);
+ HDassert(f);
+ HDassert(p);
+ HDassert(mesg);
/* Version */
*p++ = H5O_MTIME_VERSION;
@@ -305,7 +311,7 @@ H5O_mtime_new_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p,
/* Encode time */
UINT32ENCODE(p, *mesg);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_mtime_new_encode() */
@@ -330,12 +336,12 @@ H5O_mtime_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, con
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_encode);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(p);
- assert(mesg);
+ HDassert(f);
+ HDassert(p);
+ HDassert(mesg);
/* encode */
tm = HDgmtime(mesg);
@@ -343,7 +349,7 @@ H5O_mtime_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, con
1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -372,10 +378,10 @@ H5O_mtime_copy(const void *_mesg, void *_dest)
time_t *dest = (time_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_copy);
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
- assert(mesg);
+ HDassert(mesg);
if (!dest && NULL==(dest = H5FL_MALLOC(time_t)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
@@ -386,7 +392,7 @@ H5O_mtime_copy(const void *_mesg, void *_dest)
ret_value=dest;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -413,13 +419,13 @@ done:
static size_t
H5O_mtime_new_size(const H5F_t UNUSED * f, hbool_t UNUSED disable_shared, const void UNUSED * mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_new_size);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
+ HDassert(f);
+ HDassert(mesg);
- FUNC_LEAVE_NOAPI(8);
+ FUNC_LEAVE_NOAPI(8)
} /* end H5O_mtime_new_size() */
@@ -446,13 +452,13 @@ H5O_mtime_new_size(const H5F_t UNUSED * f, hbool_t UNUSED disable_shared, const
static size_t
H5O_mtime_size(const H5F_t UNUSED * f, hbool_t UNUSED disable_shared, const void UNUSED * mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_size);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
+ HDassert(f);
+ HDassert(mesg);
- FUNC_LEAVE_NOAPI(16);
+ FUNC_LEAVE_NOAPI(16)
}
@@ -474,9 +480,9 @@ H5O_mtime_size(const H5F_t UNUSED * f, hbool_t UNUSED disable_shared, const void
static herr_t
H5O_mtime_reset(void UNUSED *_mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_reset);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -497,7 +503,7 @@ H5O_mtime_reset(void UNUSED *_mesg)
static herr_t
H5O_mtime_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -530,22 +536,22 @@ H5O_mtime_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
struct tm *tm;
char buf[128];
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_debug);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- assert(f);
- assert(mesg);
- assert(stream);
- assert(indent >= 0);
- assert(fwidth >= 0);
+ HDassert(f);
+ HDassert(mesg);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
/* debug */
tm = HDlocaltime(mesg);
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
- fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Time:", buf);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
diff --git a/src/H5Oname.c b/src/H5Oname.c
index f8d3553..fb44000 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -90,7 +90,7 @@ H5O_name_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_name_t *mesg;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_name_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -135,7 +135,7 @@ H5O_name_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, cons
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_encode);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(f);
@@ -145,7 +145,7 @@ H5O_name_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, cons
/* encode */
HDstrcpy((char*)p, mesg->s);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -174,7 +174,7 @@ H5O_name_copy(const void *_mesg, void *_dest)
H5O_name_t *dest = (H5O_name_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_name_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -225,7 +225,7 @@ H5O_name_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void *
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_size);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(f);
@@ -233,7 +233,7 @@ H5O_name_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared, const void *
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -258,7 +258,7 @@ H5O_name_reset(void *_mesg)
{
H5O_name_t *mesg = (H5O_name_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(mesg);
@@ -291,7 +291,7 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_debug);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(f);
@@ -304,5 +304,5 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
"Name:",
mesg->s);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 49cecfd..d7b8450 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -333,7 +333,7 @@ typedef struct H5O_addr_map_t {
haddr_t dst_addr; /* Address of object in destination file */
hbool_t is_locked; /* Indicate that the destination object is locked currently */
hsize_t inc_ref_count; /* Number of deferred increments to reference count */
- H5O_obj_class_t *obj_class; /* Object class */
+ const H5O_obj_class_t *obj_class; /* Object class */
void *udata; /* Object class copy file udata */
} H5O_addr_map_t;
@@ -590,7 +590,9 @@ H5_DLL herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
H5_DLL herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-H5_DLL herr_t H5O_shared_post_copy_file (H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *mesg);
+H5_DLL herr_t H5O_shared_post_copy_file (H5F_t *f,
+ const H5O_msg_class_t *mesg_type, const H5O_shared_t *shared_src,
+ H5O_shared_t *shared_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream,
int indent, int fwidth);
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 89bdd36..89ce865 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -83,7 +83,7 @@ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{
NULL, /*can share method */
H5O_pline_pre_copy_file, /* pre copy native value to file */
H5O_pline_shared_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
+ H5O_pline_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_pline_shared_debug /* debug the message */
@@ -117,7 +117,7 @@ H5O_pline_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
size_t i; /* Local index variable */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_pline_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(p);
@@ -242,7 +242,7 @@ H5O_pline_encode(H5F_t UNUSED *f, uint8_t *p/*out*/, const void *mesg)
const H5Z_filter_info_t *filter; /* Filter to encode */
size_t i, j; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(p);
@@ -345,7 +345,7 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/)
size_t i; /* Local index variable */
H5O_pline_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_pline_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate pipeline message, if not provided */
if(!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
@@ -438,7 +438,7 @@ H5O_pline_size(const H5F_t UNUSED *f, const void *mesg)
size_t i; /* Local index variable */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Message header */
ret_value = 1 + /*version */
@@ -497,7 +497,7 @@ H5O_pline_reset(void *mesg)
H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */
size_t i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pline);
@@ -542,7 +542,7 @@ H5O_pline_reset(void *mesg)
static herr_t
H5O_pline_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -575,7 +575,7 @@ H5O_pline_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src,
H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_pline_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(pline_src);
@@ -614,7 +614,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s
const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
size_t i, j;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -681,7 +681,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s
herr_t
H5O_pline_set_latest_version(H5O_pline_t *pline)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5O_pline_set_latest_version)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(pline);
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 19d22a6..c05fcb4 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -110,11 +110,13 @@ typedef struct H5O_t H5O_t;
/* Set the fields in a shared message structure */
#define H5O_UPDATE_SHARED(SH_MESG, SH_TYPE, F, MSG_TYPE, CRT_IDX, OH_ADDR) \
- (SH_MESG)->type = (SH_TYPE); \
- (SH_MESG)->file = (F); \
- (SH_MESG)->msg_type_id = (MSG_TYPE); \
- (SH_MESG)->u.loc.index = (CRT_IDX); \
- (SH_MESG)->u.loc.oh_addr = (OH_ADDR);
+ { \
+ (SH_MESG)->type = (SH_TYPE); \
+ (SH_MESG)->file = (F); \
+ (SH_MESG)->msg_type_id = (MSG_TYPE); \
+ (SH_MESG)->u.loc.index = (CRT_IDX); \
+ (SH_MESG)->u.loc.oh_addr = (OH_ADDR); \
+ } /* end block */
/* Fractal heap ID type for shared message & attribute heap IDs. */
@@ -683,9 +685,14 @@ typedef struct H5O_fsinfo_t {
typedef herr_t (*H5O_operator_t)(const void *mesg/*in*/, unsigned idx,
void *operator_data/*in,out*/);
+#ifdef OUT
/* Typedef for "internal library" iteration operations */
typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
unsigned sequence, hbool_t *oh_modified/*out*/, void *operator_data/*in,out*/);
+#endif
+/* Typedef for "internal library" iteration operations */
+typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
+ unsigned sequence, unsigned *oh_modified/*out*/, void *operator_data/*in,out*/);
/* Some syntactic sugar to make the compiler happy with two different kinds of iterator callbacks */
typedef enum H5O_mesg_operator_type_t {
@@ -693,6 +700,9 @@ typedef enum H5O_mesg_operator_type_t {
H5O_MESG_OP_LIB /* Library internal callback */
} H5O_mesg_operator_type_t;
+#define H5O_MODIFY_CONDENSE 0x01
+#define H5O_MODIFY 0x02
+
typedef struct {
H5O_mesg_operator_type_t op_type;
union {
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index d9e38fc..546508a 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -186,7 +186,7 @@ H5_DLL herr_t H5Orefresh(hid_t oid);
/* Typedefs */
-/* A struct that's part of the H5G_stat_t routine (deprecated) */
+/* A struct that's part of the H5G_stat_t structure (deprecated) */
typedef struct H5O_stat_t {
hsize_t size; /* Total size of object header in file */
hsize_t free; /* Free space within object header */
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index e3c6981..399c8da 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -96,7 +96,7 @@ H5O_refcount_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh
H5O_refcount_t *refcount = NULL; /* Reference count */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_refcount_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -142,7 +142,7 @@ H5O_refcount_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p,
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -181,7 +181,7 @@ H5O_refcount_copy(const void *_mesg, void *_dest)
H5O_refcount_t *dest = (H5O_refcount_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_refcount_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(refcount);
@@ -221,7 +221,7 @@ H5O_refcount_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared,
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value = 1 /* Version */
@@ -246,7 +246,7 @@ H5O_refcount_size(const H5F_t UNUSED *f, hbool_t UNUSED disable_shared,
static herr_t
H5O_refcount_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -274,7 +274,7 @@ static herr_t
H5O_refcount_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t UNUSED *cpy_info, void UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(deleted);
@@ -308,7 +308,7 @@ H5O_refcount_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FIL
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_refcount_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 323bec9..8ae73f7 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -77,7 +77,7 @@ const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{
NULL, /*can share method */
H5O_sdspace_pre_copy_file, /* pre copy native value to file */
H5O_sdspace_shared_copy_file,/* copy native value to file */
- NULL, /* post copy native value to file */
+ H5O_sdspace_shared_post_copy_file,/* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_sdspace_shared_debug /* debug the message */
@@ -118,7 +118,7 @@ H5O_sdspace_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
unsigned i; /* local counting variable */
unsigned flags, version;
- FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -236,7 +236,7 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
unsigned flags = 0;
unsigned u; /* Local counting variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -303,7 +303,7 @@ H5O_sdspace_copy(const void *_mesg, void *_dest)
H5S_extent_t *dest = (H5S_extent_t *)_dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -353,7 +353,7 @@ H5O_sdspace_size(const H5F_t *f, const void *_mesg)
const H5S_extent_t *space = (const H5S_extent_t *)_mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Basic information for all dataspace messages */
ret_value = 1 + /* Version */
@@ -392,7 +392,7 @@ H5O_sdspace_reset(void *_mesg)
{
H5S_extent_t *mesg = (H5S_extent_t*)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
H5S_extent_release(mesg);
@@ -415,7 +415,7 @@ H5O_sdspace_reset(void *_mesg)
static herr_t
H5O_sdspace_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -448,7 +448,7 @@ H5O_sdspace_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src,
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_pre_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -499,7 +499,7 @@ H5O_sdspace_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg,
{
const H5S_extent_t *sdim = (const H5S_extent_t *)mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 68fc4ad..4cc30e8 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -30,7 +30,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
@@ -39,7 +38,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5Gprivate.h" /* Groups */
#include "H5HFprivate.h" /* Fractal heap */
#include "H5Opkg.h" /* Object headers */
@@ -115,7 +114,7 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
uint8_t mesg_buf[H5O_MESG_BUF_SIZE]; /* Buffer for deserializing messages */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -227,7 +226,7 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link_adj)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -243,8 +242,17 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
* new object header. Adjust the reference count on that
* object header.
*/
- if(shared->file->shared != f->shared)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "interfile hard links are not allowed")
+ /* Unfortunately, it is possible for the shared->file pointer to become
+ * invalid if the oh is kept in cache (which is contained in
+ * shared->file->shared while shared->file is closed. Just ignore
+ * shared->file until the "top-level" file pointer is removed at some
+ * point in the future. -NAF */
+ /* This is related to Jira issue #7638 and should be uncommented after
+ * the library has been refactored to shift to using shared file
+ * pointers for file operations, instead of using top file pointers.
+ * -QAK */
+ /*if(shared->file->shared != f->shared)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "interfile hard links are not allowed")*/
/* Build the object location for the shared message's object header */
oloc.file = f;
@@ -277,7 +285,7 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
} /* end if */
/* Check for incrementing reference count on message */
else if(adjust > 0) {
- if(H5SM_try_share(f, dxpl_id, open_oh, type->id, shared, NULL) < 0)
+ if(H5SM_try_share(f, dxpl_id, open_oh, 0, type->id, shared, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message")
} /* end if */
} /* end else */
@@ -307,7 +315,7 @@ H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned *ioflags,
unsigned version; /* Shared message version */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -392,7 +400,7 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
{
unsigned version;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(f);
@@ -409,8 +417,8 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
version = H5O_SHARED_VERSION_2; /* version 1 is no longer used */
} /* end else */
- *buf++ = version;
- *buf++ = (unsigned)sh_mesg->type;
+ *buf++ = (uint8_t)version;
+ *buf++ = (uint8_t)sh_mesg->type;
/* Encode either the heap ID of the message or the address of the
* object header that holds it.
@@ -440,7 +448,7 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_me
herr_t
H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_set_shared)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(dst);
@@ -471,12 +479,12 @@ H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED) {
- ret_value = 1 + /*version */
- 1 + /*the type field */
- H5F_SIZEOF_ADDR(f); /*sharing by another obj hdr */
+ ret_value = (size_t)1 + /*version */
+ (size_t)1 + /*the type field */
+ (size_t)H5F_SIZEOF_ADDR(f); /*sharing by another obj hdr */
} /* end if */
else {
HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM);
@@ -507,7 +515,7 @@ H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -550,7 +558,7 @@ H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -579,7 +587,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst,
+H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
hbool_t UNUSED *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata,
hid_t dxpl_id)
@@ -588,7 +596,7 @@ H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst,
H5O_shared_t *shared_dst = (H5O_shared_t *)_native_dst; /* Alias to shared info in native destination message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -602,39 +610,27 @@ H5O_shared_copy_file(H5F_t UNUSED *file_src, H5F_t *file_dst,
/* Committed shared messages create a shared message at the destination
* and also copy the committed object that they point to.
*
- * SOHMs try to share the destination message.
+ * Other messages simulate sharing the destination message to determine how
+ * it will eventually be shared (if at all), but do not actually share the
+ * message until "post copy". The "H5O_shared_t" part of the message will
+ * be updated (to allow calculation of the final size) but the message is
+ * not actually shared.
*/
- if(shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
- H5O_loc_t dst_oloc;
- H5O_loc_t src_oloc;
-
- /* Copy the shared object from source to destination */
- dst_oloc.file = file_dst;
- src_oloc.file = shared_src->file;
- src_oloc.addr = shared_src->u.loc.oh_addr;
- if(H5O_copy_header_map(&src_oloc, &dst_oloc, dxpl_id, cpy_info, FALSE,
- NULL, NULL) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
-
- /* Set up destination message's shared info */
- H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, file_dst, mesg_type->id, 0, dst_oloc.addr)
- } /* end if */
- else {
- /* Try to share new message in the destination file. */
- /* Message is always shared in heap in dest. file because the dest.
- * object header doesn't quite exist yet - JML
- */
-
+ if(shared_src->type != H5O_SHARE_TYPE_COMMITTED) {
+ /* Simulate trying to share new message in the destination file. */
/* Set copied metadata tag */
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, FAIL);
- if(H5SM_try_share(file_dst, dxpl_id, NULL, mesg_type->id, _native_dst, NULL) < 0)
+ if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, mesg_type->id, _native_dst, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to determine if message should be shared")
/* Reset metadata tag */
H5_END_TAG(FAIL);
-
- } /* end else */
+ } /* end if */
+ else
+ /* Mark the message as committed - as it will be committed in post copy
+ */
+ H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, file_dst, mesg_type->id, 0, HADDR_UNDEF)
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -660,40 +656,45 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_shared_post_copy_file(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *mesg)
+H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type,
+ const H5O_shared_t *shared_src, H5O_shared_t *shared_dst, hid_t dxpl_id,
+ H5O_copy_t *cpy_info)
{
- H5O_shared_t *old_sh_mesg;
- htri_t shared_mesg; /* Whether the message should be shared */
- unsigned msg_type_id; /* Message's type ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shared_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
- HDassert(mesg);
-
- /* the old shared message */
- old_sh_mesg = (H5O_shared_t *) mesg;
+ HDassert(shared_src);
+ HDassert(shared_dst);
- /* save the type id for later use */
- msg_type_id = old_sh_mesg->msg_type_id;
+ /* Copy the target of committed messages, try to share others */
+ if(shared_src->type == H5O_SHARE_TYPE_COMMITTED) {
+ H5O_loc_t dst_oloc;
+ H5O_loc_t src_oloc;
- /* Remove the old message from the SOHM storage */
- if(H5SM_delete(f, dxpl_id, oh, old_sh_mesg) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to find attribute information for object")
+ /* Copy the shared object from source to destination */
+ dst_oloc.file = f;
+ src_oloc.file = shared_src->file;
+ src_oloc.addr = shared_src->u.loc.oh_addr;
+ if(H5O_copy_header_map(&src_oloc, &dst_oloc, dxpl_id, cpy_info, FALSE,
+ NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
- /* Add the new message */
- if((shared_mesg = H5SM_try_share(f, dxpl_id, oh, msg_type_id, mesg, NULL)) == 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status")
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message")
+ /* Set up destination message's shared info */
+ H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, f, mesg_type->id, 0, dst_oloc.addr)
+ } /* end if */
+ else
+ /* Share the message */
+ if(H5SM_try_share(f, dxpl_id, NULL, H5SM_WAS_DEFERRED, mesg_type->id,
+ shared_dst, NULL) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_shared_post_copy_file() */
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_debug
@@ -710,7 +711,7 @@ done:
herr_t
H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(mesg);
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index c0f5cd6..ddacc25 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -53,7 +53,7 @@ H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags,
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_DECODE)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -113,7 +113,7 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes
const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_ENCODE)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -168,7 +168,7 @@ H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)
const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_SIZE)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -221,7 +221,7 @@ H5O_SHARED_DELETE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_DELETE)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -273,7 +273,7 @@ H5O_SHARED_LINK(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_LINK)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -325,7 +325,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst,
void *dst_mesg = NULL; /* Destination message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_COPY_FILE)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -385,15 +385,17 @@ static H5_inline herr_t
H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src,
H5O_loc_t *oloc_dst, void *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
- const H5O_shared_t *shared_dst = (const H5O_shared_t *)mesg_dst; /* Alias to shared info in native source */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5O_shared_t *shared_src = (const H5O_shared_t *)mesg_src; /* Alias to shared info in native source */
+ H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst; /* Alias to shared info in native destination */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_POST_COPY_FILE)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oloc_src->file);
HDassert(oloc_dst->file);
HDassert(mesg_src);
HDassert(mesg_dst);
+ HDassert(cpy_info);
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
@@ -408,11 +410,17 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src,
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy native message to another file")
#endif /* H5O_SHARED_POST_COPY_FILE_REAL */
- /* update only shared message after the post copy */
- if(H5O_msg_is_shared(shared_dst->msg_type_id, mesg_dst)) {
- if(H5O_shared_post_copy_file(oloc_dst->file, dxpl_id, cpy_info->oh_dst, mesg_dst) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy")
- }
+ /* Update shared message after the post copy - will short circuit in
+ * production if the DEFER pass determined it will not be shared; debug mode
+ * verifies that it is indeed the case */
+ if(H5O_shared_post_copy_file(oloc_dst->file, H5O_SHARED_TYPE,
+ shared_src, shared_dst, dxpl_id, cpy_info) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy")
+
+ /* Make sure that if the the source or destination is committed, both are
+ * committed */
+ HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED)
+ == (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -443,7 +451,7 @@ H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
const H5O_shared_t *sh_mesg = (const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_SHARED_DEBUG)
+ FUNC_ENTER_NOAPI_NOINIT
#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 51c1c55..69c7d49 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -82,7 +82,7 @@ H5O_shmesg_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_shmesg_table_t *mesg; /* Native message */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_shmesg_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -121,7 +121,7 @@ H5O_shmesg_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -158,7 +158,7 @@ H5O_shmesg_copy(const void *_mesg, void *_dest)
H5O_shmesg_table_t *dest = (H5O_shmesg_table_t *)_dest;
void *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_shmesg_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(mesg);
@@ -196,7 +196,7 @@ H5O_shmesg_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED
{
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
@@ -227,7 +227,7 @@ H5O_shmesg_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(f);
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 5d1909b..3e9a5b5 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -102,7 +102,7 @@ H5O_stab_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
H5O_stab_t *stab = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_stab_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -145,7 +145,7 @@ H5O_stab_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_encode);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(f);
@@ -156,7 +156,7 @@ H5O_stab_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void
H5F_addr_encode(f, &p, stab->btree_addr);
H5F_addr_encode(f, &p, stab->heap_addr);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -183,7 +183,7 @@ H5O_stab_copy(const void *_mesg, void *_dest)
H5O_stab_t *dest = (H5O_stab_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_stab_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(stab);
@@ -223,12 +223,12 @@ H5O_stab_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_size);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set return value */
ret_value=2 * H5F_SIZEOF_ADDR(f);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -249,7 +249,7 @@ H5O_stab_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *
static herr_t
H5O_stab_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
@@ -276,14 +276,14 @@ H5O_stab_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *mesg)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_stab_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
HDassert(mesg);
/* Free the file space for the symbol table */
- if(H5G_stab_delete(f, dxpl_id, (const H5O_stab_t *)mesg) < 0)
+ if(H5G__stab_delete(f, dxpl_id, (const H5O_stab_t *)mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table")
done:
@@ -316,7 +316,7 @@ H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
size_t size_hint; /* Local heap initial size */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_stab_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(stab_src);
@@ -334,7 +334,7 @@ H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, NULL);
/* Create components of symbol table message */
- if(H5G_stab_create_components(file_dst, stab_dst, size_hint, dxpl_id) < 0)
+ if(H5G__stab_create_components(file_dst, stab_dst, size_hint, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't create symbol table components")
/* Reset metadata tag */
@@ -378,7 +378,7 @@ H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc
H5G_bt_it_cpy_t udata; /* B-tree user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_stab_post_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(stab_src);
@@ -399,7 +399,7 @@ H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc
udata.cpy_info = cpy_info;
/* Iterate over objects in group, copying them */
- if((H5B_iterate(src_oloc->file, dxpl_id, H5B_SNODE, stab_src->btree_addr, H5G_node_copy, &udata, NULL)) < 0)
+ if((H5B_iterate(src_oloc->file, dxpl_id, H5B_SNODE, stab_src->btree_addr, H5G__node_copy, &udata, NULL)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed")
done:
@@ -428,7 +428,7 @@ H5O_stab_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_debug);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(f);
@@ -443,5 +443,6 @@ H5O_stab_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"Name heap address:", stab->heap_addr);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
+
diff --git a/src/H5Ostorage.c b/src/H5Ostorage.c
index 41b16bc..c23b54b 100644
--- a/src/H5Ostorage.c
+++ b/src/H5Ostorage.c
@@ -113,7 +113,7 @@ H5O_storage_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
uint8_t version; /* Version of message decoded */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -238,7 +238,7 @@ H5O_storage_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p,
const H5O_storage_t *mesg = (const H5O_storage_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -318,7 +318,7 @@ H5O_storage_copy(const void *_mesg, void *_dest)
H5O_storage_t *dest = (H5O_storage_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(mesg);
@@ -375,7 +375,7 @@ H5O_storage_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mes
const H5O_storage_t *mesg = (const H5O_storage_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_storage_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -407,7 +407,7 @@ H5O_storage_reset(void *_mesg)
{
H5O_storage_t *mesg = (H5O_storage_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_storage_reset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(mesg) {
/* Free the compact storage buffer */
@@ -440,7 +440,7 @@ H5O_storage_free(void *_mesg)
H5O_storage_t *mesg = (H5O_storage_t *) _mesg;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_free)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(mesg);
@@ -473,7 +473,7 @@ H5O_storage_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5O_storage_t *mesg = (H5O_storage_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_delete)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
@@ -530,7 +530,7 @@ H5O_storage_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
H5O_storage_t *storage_dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_copy_file)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(file_src);
@@ -616,7 +616,7 @@ H5O_storage_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg,
{
const H5O_storage_t *mesg = (const H5O_storage_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_storage_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(f);
@@ -715,7 +715,7 @@ H5O_storage_meta_size(const H5F_t *f, const H5O_storage_t *storage,
{
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5O_storage_meta_size)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(f);
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 883bfcd..ca1b426 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -101,7 +101,7 @@ H5O_is_attr_dense_test(hid_t oid)
H5O_loc_t *loc; /* Pointer to object's location */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_is_attr_dense_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -166,7 +166,7 @@ H5O_is_attr_empty_test(hid_t oid)
hsize_t nattrs; /* Number of attributes */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_is_attr_empty_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -259,7 +259,7 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
hsize_t obj_nattrs; /* Number of attributes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_num_attrs_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -351,7 +351,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
H5O_loc_t *loc; /* Pointer to object's location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_dense_info_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -399,6 +399,9 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
else
*corder_count = 0;
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
done:
/* Release resources */
if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
@@ -408,9 +411,6 @@ done:
if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- /* Reset metadata tag in dxpl_id */
- H5_END_TAG(FAIL);
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_attr_dense_info_test() */
@@ -445,7 +445,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
unsigned idx; /* Index of message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_check_msg_marked_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get object location for object */
if(NULL == (loc = H5O_get_loc(oid)))
@@ -508,7 +508,7 @@ H5O_expunge_chunks_test(const H5O_loc_t *loc, hid_t dxpl_id)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_expunge_chunks_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_WRITE)))
@@ -564,7 +564,7 @@ H5O_get_rc(const H5O_loc_t *loc, hid_t dxpl_id, unsigned *rc)
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_rc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(loc);
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index d4a3801..548f74d 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -40,7 +40,7 @@ const H5O_msg_class_t H5O_MSG_UNKNOWN[1] = {{
H5O_UNKNOWN_ID, /*message id number */
"unknown", /*message name for debugging */
0, /*native message size */
- FALSE, /* messages are sharable? */
+ 0, /* messages are sharable? */
NULL, /*decode message */
NULL, /*encode message */
NULL, /*copy the native value */
@@ -78,7 +78,7 @@ H5FL_DEFINE(H5O_unknown_t);
static herr_t
H5O_unknown_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_unknown_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(mesg);
diff --git a/src/H5P.c b/src/H5P.c
index afcb84e..92b3d18 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -81,7 +81,7 @@ DESCRIPTION
static herr_t
H5P_init_pub_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_init_pub_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5P_init())
} /* H5P_init_pub_interface() */
@@ -114,7 +114,7 @@ H5Pcopy(hid_t id)
void *obj; /* Property object to copy */
hid_t ret_value=FALSE; /* return value */
- FUNC_ENTER_API(H5Pcopy, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", id);
if(H5P_DEFAULT==id)
@@ -147,7 +147,7 @@ H5Pcopy(hid_t id)
} /* end else */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pcopy() */
@@ -196,7 +196,7 @@ H5Pcreate_class(hid_t parent, const char *name,
H5P_genclass_t *pclass = NULL; /* Property list class created */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pcreate_class, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("i", "i*sx*xx*xx*x", parent, name, cls_create, create_data, cls_copy,
copy_data, cls_close, close_data);
@@ -260,7 +260,7 @@ H5Pcreate(hid_t cls_id)
H5P_genclass_t *pclass; /* Property list class to modify */
hid_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pcreate, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", cls_id);
/* Check arguments. */
@@ -272,7 +272,7 @@ H5Pcreate(hid_t cls_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pcreate() */
@@ -441,7 +441,7 @@ H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value,
H5P_genclass_t *orig_pclass; /* Original property class */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pregister2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE11("e", "i*sz*xxxxxxxx", cls_id, name, size, def_value, prp_create,
prp_set, prp_get, prp_delete, prp_copy, prp_cmp, prp_close);
@@ -625,7 +625,7 @@ H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value,
H5P_genplist_t *plist; /* Property list to modify */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pinsert2, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE10("e", "i*sz*xxxxxxx", plist_id, name, size, value, prp_set, prp_get,
prp_delete, prp_copy, prp_cmp, prp_close);
@@ -642,7 +642,7 @@ H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value,
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pinsert2() */
@@ -683,7 +683,7 @@ H5Pset(hid_t plist_id, const char *name, void *value)
H5P_genplist_t *plist; /* Property list to modify */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*x", plist_id, name, value);
/* Check arguments. */
@@ -699,7 +699,7 @@ H5Pset(hid_t plist_id, const char *name, void *value)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to set value in plist");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pset() */
@@ -732,7 +732,7 @@ H5Pexist(hid_t id, const char *name)
H5P_genclass_t *pclass; /* Property class to query */
htri_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pexist, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "i*s", id, name);
/* Check arguments. */
@@ -759,7 +759,7 @@ H5Pexist(hid_t id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pexist() */
@@ -793,7 +793,7 @@ H5Pget_size(hid_t id, const char *name, size_t *size)
H5P_genplist_t *plist; /* Property list to query */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*z", id, name, size);
/* Check arguments. */
@@ -825,7 +825,7 @@ H5Pget_size(hid_t id, const char *name, size_t *size)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pget_size() */
@@ -856,7 +856,7 @@ H5Pget_class(hid_t plist_id)
H5P_genclass_t *pclass=NULL; /* Property list class */
hid_t ret_value=FAIL; /* return value */
- FUNC_ENTER_API(H5Pget_class, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", plist_id);
/* Check arguments. */
@@ -879,7 +879,7 @@ done:
if(ret_value<0 && pclass)
H5P_close_class(pclass);
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pget_class() */
@@ -913,7 +913,7 @@ H5Pget_nprops(hid_t id, size_t *nprops)
H5P_genclass_t *pclass; /* Property class to query */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_nprops, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*z", id, nprops);
/* Check arguments. */
@@ -939,7 +939,7 @@ H5Pget_nprops(hid_t id, size_t *nprops)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pget_nprops() */
@@ -969,7 +969,7 @@ H5Pequal(hid_t id1, hid_t id2)
void *obj1, *obj2; /* Property objects to compare */
htri_t ret_value = FALSE; /* return value */
- FUNC_ENTER_API(H5Pequal, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", id1, id2);
/* Check arguments. */
@@ -1025,7 +1025,7 @@ H5Pisa_class(hid_t plist_id, hid_t pclass_id)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pisa_class, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", plist_id, pclass_id);
/* Check arguments. */
@@ -1039,7 +1039,7 @@ H5Pisa_class(hid_t plist_id, hid_t pclass_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pisa_class() */
@@ -1102,7 +1102,7 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data)
int fake_idx = 0; /* Index when user doesn't provide one */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Piterate, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE4("Is", "i*Isx*x", id, idx, iter_func, iter_data);
/* Check arguments. */
@@ -1126,7 +1126,7 @@ H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property object");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Piterate() */
@@ -1164,7 +1164,7 @@ H5Pget(hid_t plist_id, const char *name, void *value)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*x", plist_id, name, value);
/* Check arguments. */
@@ -1180,7 +1180,7 @@ H5Pget(hid_t plist_id, const char *name, void *value)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to query property value");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pget() */
@@ -1216,7 +1216,7 @@ H5Premove(hid_t plist_id, const char *name)
H5P_genplist_t *plist; /* Property list to modify */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Premove, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", plist_id, name);
/* Check arguments. */
@@ -1230,7 +1230,7 @@ H5Premove(hid_t plist_id, const char *name)
HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Premove() */
@@ -1278,7 +1278,7 @@ H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name)
H5I_type_t src_id_type, dst_id_type; /* ID types */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pcopy_prop, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*s", dst_id, src_id, name);
/* Check arguments. */
@@ -1337,7 +1337,7 @@ H5Punregister(hid_t pclass_id, const char *name)
H5P_genclass_t *pclass; /* Property list class to modify */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Punregister, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", pclass_id, name);
/* Check arguments. */
@@ -1351,7 +1351,7 @@ H5Punregister(hid_t pclass_id, const char *name)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to remove property from class");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Punregister() */
@@ -1381,7 +1381,7 @@ H5Pclose(hid_t plist_id)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pclose, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", plist_id);
/* Allow default property lists to pass through without throwing an error */
@@ -1396,7 +1396,7 @@ H5Pclose(hid_t plist_id)
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pclose() */
@@ -1426,7 +1426,7 @@ H5Pget_class_name(hid_t pclass_id)
H5P_genclass_t *pclass; /* Property class to query */
char *ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_class_name, NULL);
+ FUNC_ENTER_API(NULL)
/* Check arguments. */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
@@ -1437,7 +1437,7 @@ H5Pget_class_name(hid_t pclass_id)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "unable to query name of class");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pget_class_name() */
@@ -1467,7 +1467,7 @@ H5Pget_class_parent(hid_t pclass_id)
H5P_genclass_t *parent = NULL; /* Parent's property class */
hid_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_class_parent, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", pclass_id);
/* Check arguments. */
@@ -1517,7 +1517,7 @@ H5Pclose_class(hid_t cls_id)
{
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pclose_class, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", cls_id);
/* Check arguments */
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 356c42d..51e62fe 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -126,7 +126,7 @@ H5P_dacc_reg_prop(H5P_genclass_t *pclass)
double rdcc_w0 = H5D_ACS_PREEMPT_READ_CHUNKS_DEF; /* Default raw data chunk cache dirty ratio */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dacc_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register the size of raw data chunk cache (elements) */
if(H5P_register_real(pclass, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5D_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -181,7 +181,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_chunk_cache, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "izzd", dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
/* Check arguments. Note that we allow negative values - they are
@@ -202,7 +202,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -233,7 +233,7 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, doub
H5P_genplist_t *def_plist; /* Default file access property list */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_chunk_cache, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*z*z*d", dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0);
/* Get the plist structure */
@@ -269,5 +269,5 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, doub
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index fc58a6d..9ea4f7f 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -183,7 +183,7 @@ H5P_dcrt_reg_prop(H5P_genclass_t *pclass)
H5O_efl_t efl = H5D_CRT_EXT_FILE_LIST_DEF; /* Default external file list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register the storage layout property */
if(H5P_register_real(pclass, H5D_CRT_LAYOUT_NAME, H5D_CRT_LAYOUT_SIZE, &layout, NULL, NULL, NULL, NULL, NULL, H5D_CRT_LAYOUT_CMP, NULL) < 0)
@@ -232,7 +232,7 @@ H5P_dcrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
H5P_genplist_t *dst_plist; /* Pointer to destination property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Verify property list IDs */
if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id)))
@@ -342,7 +342,7 @@ H5P_dcrt_close(hid_t dcpl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
@@ -389,7 +389,7 @@ H5P_dcrt_layout_cmp(const void *_layout1, const void *_layout2, size_t UNUSED si
*layout2 = (const H5O_layout_t *)_layout2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_dcrt_layout_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(layout1);
@@ -458,7 +458,7 @@ H5P_fill_value_cmp(const void *_fill1, const void *_fill2, size_t UNUSED size)
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_fill_value_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(fill1);
@@ -520,7 +520,7 @@ H5P_dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2, size_t UNUSED s
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_dcrt_ext_file_list_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(efl1);
@@ -595,7 +595,7 @@ H5P_set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout)
unsigned alloc_time_state; /* State of allocation time property */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_set_layout)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the allocation time state */
if(H5P_get(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0)
@@ -662,7 +662,7 @@ H5P_init_def_layout(void)
const H5O_storage_compact_t def_store_compact = H5D_DEF_STORAGE_COMPACT_INIT;
const H5O_storage_chunk_t def_store_chunk = H5D_DEF_STORAGE_CHUNK_INIT;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_init_def_layout)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Initialize the default layout info for non-contigous layouts */
H5D_def_layout_compact_g.storage.u.compact = def_store_compact;
@@ -703,7 +703,7 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type)
const H5O_layout_t *layout; /* Pointer to default layout information for type specified */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_layout, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDl", plist_id, layout_type);
/* Check arguments */
@@ -778,7 +778,7 @@ H5Pget_layout(hid_t plist_id)
H5O_layout_t layout; /* Layout property */
H5D_layout_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_layout, H5D_LAYOUT_ERROR)
+ FUNC_ENTER_API(H5D_LAYOUT_ERROR)
H5TRACE1("Dl", "i", plist_id);
/* Get the plist structure */
@@ -831,7 +831,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_chunk, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIs*[a1]h", plist_id, ndims, dim);
/* Check arguments */
@@ -923,7 +923,7 @@ H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/)
H5O_layout_t layout; /* Layout information */
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_chunk, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Is", "iIsx", plist_id, max_ndims, dim);
/* Get the plist structure */
@@ -975,7 +975,7 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options)
uint8_t layout_flags = 0; /* "options" translated into layout message flags format */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_chunk_opts, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, options);
/* Check arguments */
@@ -1042,7 +1042,7 @@ H5Pget_chunk_opts(hid_t plist_id, unsigned *options)
H5O_layout_t layout; /* Layout information for setting chunk info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_chunk_opts, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", plist_id, options);
#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER
@@ -1121,7 +1121,7 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_external, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*soh", plist_id, name, offset, size);
/* Check arguments */
@@ -1201,7 +1201,7 @@ H5Pget_external_count(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_external_count, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", plist_id);
/* Get the plist structure */
@@ -1259,7 +1259,7 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name/*out*
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_external, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iIuzxxx", plist_id, idx, name_size, name, offset, size);
/* Get the plist structure */
@@ -1318,7 +1318,7 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block)
unsigned int config_flags;
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_szip, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, options_mask, pixels_per_block);
if(H5Zget_filter_info(H5Z_FILTER_SZIP, &config_flags) < 0)
@@ -1388,7 +1388,7 @@ H5Pset_shuffle(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_shuffle, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", plist_id);
/* Check arguments */
@@ -1434,7 +1434,7 @@ H5Pset_nbit(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_nbit, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", plist_id);
/* Check arguments */
@@ -1497,7 +1497,7 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac
unsigned cd_values[2]; /* Filter parameters */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_scaleoffset, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iZaIs", plist_id, scale_type, scale_factor);
/* Check arguments */
@@ -1568,7 +1568,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
H5O_fill_t fill; /* Fill value to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_fill_value, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", plist_id, type_id, value);
/* Get the plist structure */
@@ -1662,7 +1662,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/,
hid_t dst_id = -1; /*destination datatype id */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_get_fill_value, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/*
* If no fill value is defined then return an error. We can't even
@@ -1752,7 +1752,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/)
H5T_t *type; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_fill_value, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iix", plist_id, type_id, value);
/* Check arguments */
@@ -1791,7 +1791,7 @@ H5P_is_fill_value_defined(const H5O_fill_t *fill, H5D_fill_value_t *status)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_is_fill_value_defined, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(fill);
HDassert(status);
@@ -1833,7 +1833,7 @@ H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status)
H5O_fill_t fill; /* Fill value to query */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_fill_value_defined, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(status);
@@ -1868,7 +1868,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
H5P_genplist_t *plist; /* Property list to query */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Pfill_value_defined, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*DF", plist_id, status);
HDassert(status);
@@ -1911,7 +1911,7 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time)
unsigned alloc_time_state; /* State of allocation time property */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_alloc_time, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDa", plist_id, alloc_time);
/* Check arguments */
@@ -1992,7 +1992,7 @@ H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time/*out*/)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_alloc_time, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, alloc_time);
/* Get values */
@@ -2037,7 +2037,7 @@ H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time)
H5O_fill_t fill; /* Fill value property to modify */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_fill_time, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iDf", plist_id, fill_time);
/* Check arguments */
@@ -2085,7 +2085,7 @@ H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time/*out*/)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_fill_time, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, fill_time);
/* Set values */
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index 1528df5..8d1d75f 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -97,7 +97,7 @@ DESCRIPTION
static herr_t
H5P_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5P_init())
} /* H5P_init_deprec_interface() */
@@ -253,7 +253,7 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value,
H5P_genclass_t *orig_pclass; /* Original property class */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pregister1, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE10("e", "i*sz*xxxxxxx", cls_id, name, size, def_value, prp_create,
prp_set, prp_get, prp_delete, prp_copy, prp_close);
@@ -285,7 +285,7 @@ H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value,
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pregister1() */
@@ -437,7 +437,7 @@ H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
H5P_genplist_t *plist; /* Property list to modify */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pinsert1, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE9("e", "i*sz*xxxxxx", plist_id, name, size, value, prp_set, prp_get,
prp_delete, prp_copy, prp_close);
@@ -454,7 +454,7 @@ H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pinsert1() */
@@ -488,7 +488,7 @@ H5Pget_version(hid_t plist_id, unsigned *super/*out*/, unsigned *freelist/*out*/
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_version, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "ixxxx", plist_id, super, freelist, stab, shhdr);
/* Get the plist structure */
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 0e81727..ea292e6 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -98,14 +98,20 @@
#define H5D_XFER_MPIO_CHUNK_OPT_HARD_DEF H5FD_MPIO_CHUNK_DEFAULT
#define H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE sizeof(unsigned)
#define H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF H5D_ONE_LINK_CHUNK_IO_THRESHOLD
-#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE sizeof(unsigned)
+#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE sizeof(unsigned)
#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF H5D_MULTI_CHUNK_IO_COL_THRESHOLD
+/* Definitions for chunk opt mode property. */
+#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE sizeof(H5D_mpio_actual_chunk_opt_mode_t)
+#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF H5D_MPIO_NO_CHUNK_OPTIMIZATION
+/* Definitions for chunk io mode property. */
+#define H5D_MPIO_ACTUAL_IO_MODE_SIZE sizeof(H5D_mpio_actual_io_mode_t)
+#define H5D_MPIO_ACTUAL_IO_MODE_DEF H5D_MPIO_NO_COLLECTIVE
/* Definitions for EDC property */
-#define H5D_XFER_EDC_SIZE sizeof(H5Z_EDC_t)
-#define H5D_XFER_EDC_DEF H5Z_ENABLE_EDC
+#define H5D_XFER_EDC_SIZE sizeof(H5Z_EDC_t)
+#define H5D_XFER_EDC_DEF H5Z_ENABLE_EDC
/* Definitions for filter callback function property */
-#define H5D_XFER_FILTER_CB_SIZE sizeof(H5Z_cb_t)
-#define H5D_XFER_FILTER_CB_DEF {NULL,NULL}
+#define H5D_XFER_FILTER_CB_SIZE sizeof(H5Z_cb_t)
+#define H5D_XFER_FILTER_CB_DEF {NULL,NULL}
/* Definitions for type conversion callback function property */
#define H5D_XFER_CONV_CB_SIZE sizeof(H5T_conv_cb_t)
#define H5D_XFER_CONV_CB_DEF {NULL,NULL}
@@ -202,6 +208,8 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
H5FD_mpio_collective_opt_t def_mpio_collective_opt_mode = H5D_XFER_MPIO_COLLECTIVE_OPT_DEF;
unsigned def_mpio_chunk_opt_num = H5D_XFER_MPIO_CHUNK_OPT_NUM_DEF;
unsigned def_mpio_chunk_opt_ratio = H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF;
+ H5D_mpio_actual_chunk_opt_mode_t def_mpio_actual_chunk_opt_mode = H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF;
+ H5D_mpio_actual_io_mode_t def_mpio_actual_io_mode = H5D_MPIO_ACTUAL_IO_MODE_DEF;
#endif /* H5_HAVE_PARALLEL */
H5Z_EDC_t enable_edc = H5D_XFER_EDC_DEF; /* Default value for EDC property */
H5Z_cb_t filter_cb = H5D_XFER_FILTER_CB_DEF; /* Default value for filter callback */
@@ -209,7 +217,7 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
void *def_xfer_xform = H5D_XFER_XFORM_DEF; /* Default value for data transform */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register the max. temp buffer size property */
if(H5P_register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, &def_max_temp_buf, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -264,7 +272,7 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
#ifdef H5_HAVE_PARALLEL
- /* Register the I/O transfer mode property */
+ /* Register the I/O transfer mode properties */
if(H5P_register_real(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, &def_io_xfer_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
if(H5P_register_real(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, &def_mpio_collective_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -275,6 +283,14 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
if(H5P_register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, &def_mpio_chunk_opt_ratio, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the chunk optimization mode property. */
+ if(H5P_register_real(pclass, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE, &def_mpio_actual_chunk_opt_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the actual io mode property. */
+ if(H5P_register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, &def_mpio_actual_io_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
#endif /* H5_HAVE_PARALLEL */
/* Register the EDC property */
@@ -326,7 +342,7 @@ H5P_dxfr_create(hid_t dxpl_id, void UNUSED *create_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
@@ -376,7 +392,7 @@ H5P_dxfr_copy(hid_t dst_dxpl_id, hid_t src_dxpl_id, void UNUSED *copy_data)
H5P_genplist_t *src_plist; /* Source property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_copy)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
@@ -427,7 +443,7 @@ H5P_dxfr_close(hid_t dxpl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
@@ -467,7 +483,7 @@ H5P_dxfr_xform_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_xform_del)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(value);
@@ -499,7 +515,7 @@ H5P_dxfr_xform_copy(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_xform_copy)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(value);
@@ -530,7 +546,7 @@ H5P_dxfr_xform_close(const char UNUSED *name, size_t UNUSED size, void *value)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_dxfr_xform_close)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(value);
@@ -564,7 +580,7 @@ H5Pset_data_transform(hid_t plist_id, const char *expression)
H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_data_transform, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", plist_id, expression);
/* Check arguments */
@@ -630,7 +646,7 @@ H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size)
char* pexp;
ssize_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_data_transform, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "ixz", plist_id, expression, size);
/* Get the plist structure */
@@ -698,7 +714,7 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_buffer, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iz*x*x", plist_id, size, tconv, bkg);
/* Check arguments */
@@ -745,7 +761,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv/*out*/, void **bkg/*out*/)
size_t size; /* Type conversion buffer size */
size_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_buffer, 0)
+ FUNC_ENTER_API(0)
H5TRACE3("z", "ixx", plist_id, tconv, bkg);
/* Get the plist structure */
@@ -797,7 +813,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_preserve, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ib", plist_id, status);
/* Get the plist structure */
@@ -837,7 +853,7 @@ H5Pget_preserve(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_preserve, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", plist_id);
/* Get the plist structure */
@@ -879,7 +895,7 @@ H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_edc_check, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iZe", plist_id, check);
/* Check argument */
@@ -922,7 +938,7 @@ H5Pget_edc_check(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
H5Z_EDC_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_edc_check, H5Z_ERROR_EDC)
+ FUNC_ENTER_API(H5Z_ERROR_EDC)
H5TRACE1("Ze", "i", plist_id);
/* Get the plist structure */
@@ -965,7 +981,7 @@ H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data)
herr_t ret_value=SUCCEED; /* return value */
H5Z_cb_t cb_struct;
- FUNC_ENTER_API(H5Pset_filter_callback, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ix*x", plist_id, func, op_data);
/* Get the plist structure */
@@ -1007,7 +1023,7 @@ H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_dat
herr_t ret_value=SUCCEED; /* return value */
H5T_conv_cb_t cb_struct;
- FUNC_ENTER_API(H5Pset_type_conv_cb, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ix*x", plist_id, op, operate_data);
/* Get the plist structure */
@@ -1049,7 +1065,7 @@ H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op, void **operate_d
H5T_conv_cb_t cb_struct;
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_type_conv_cb, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x**x", plist_id, op, operate_data);
/* Get the plist structure */
@@ -1094,7 +1110,7 @@ H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/, double *middle/*out*/,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_btree_ratios, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "ixxx", plist_id, left, middle, right);
/* Get the plist structure */
@@ -1148,7 +1164,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_btree_ratios, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iddd", plist_id, left, middle, right);
/* Check arguments */
@@ -1201,7 +1217,7 @@ H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func,
{
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5P_set_vlen_mem_manager, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(plist);
@@ -1248,7 +1264,7 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_vlen_mem_manager, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "ix*xx*x", plist_id, alloc_func, alloc_info, free_func,
free_info);
@@ -1288,7 +1304,7 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func/*out*/,
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_vlen_mem_manager, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "ixxxx", plist_id, alloc_func, alloc_info, free_func, free_info);
/* Get the plist structure */
@@ -1342,7 +1358,7 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_hyper_vector_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", plist_id, vector_size);
/* Check arguments */
@@ -1382,7 +1398,7 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size/*out*/)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_hyper_vector_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, vector_size);
/* Get the plist structure */
@@ -1398,3 +1414,74 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_hyper_vector_size() */
+
+#ifdef H5_HAVE_PARALLEL
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_mpio_actual_chunk_opt_mode
+ *
+ * Purpose: Retrieves the chunked io optimization scheme that library chose
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Jacob Gruber
+ * Wednesday, May 4, 2011
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode)
+{
+ H5P_genplist_t *plist;
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*Do", plist_id, actual_chunk_opt_mode);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Return values */
+ if(actual_chunk_opt_mode)
+ if(H5P_get(plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, actual_chunk_opt_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_mpio_actual_chunk_opt_mode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_mpio_actual_io_mode
+ *
+ * Purpose: Retrieves the type of I/O actually preformed when collective I/O
+ * is requested.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Jacob Gruber
+ * Wednesday, May 4, 2011
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode)
+{
+ H5P_genplist_t *plist;
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*Di", plist_id, actual_io_mode);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Return values */
+ if(actual_io_mode)
+ if(H5P_get(plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, actual_io_mode) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_mpio_actual_io_mode() */
+#endif /* H5_HAVE_PARALLEL */
+
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 7dea0b2..c3371c9 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -217,7 +217,7 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
unsigned efc_size = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_facc_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register the initial metadata cache resize configuration */
if(H5P_register_real(pclass, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, H5F_ACS_META_CACHE_INIT_CONFIG_SIZE, &mdc_initCacheCfg, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -329,7 +329,7 @@ H5P_facc_create(hid_t fapl_id, void UNUSED *copy_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_facc_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check argument */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -379,7 +379,7 @@ H5P_facc_copy(hid_t dst_fapl_id, hid_t src_fapl_id, void UNUSED *copy_data)
H5P_genplist_t *src_plist; /* Source property list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_facc_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get driver ID from source property list */
if(NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_fapl_id)))
@@ -430,7 +430,7 @@ H5P_facc_close(hid_t fapl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_facc_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check argument */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -491,9 +491,9 @@ herr_t
H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_alignment, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ihh", fapl_id, threshold, alignment);
/* Check args */
@@ -511,7 +511,7 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -541,9 +541,9 @@ H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
hsize_t *alignment/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_alignment, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, threshold, alignment);
/* Get the plist structure */
@@ -559,7 +559,7 @@ H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get alignment");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -595,9 +595,9 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive
{
hid_t driver_id; /* VFL driver ID */
void *driver_info; /* VFL driver info */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_set_driver, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(NULL == H5I_object_verify(new_driver_id, H5I_VFL))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID")
@@ -672,7 +672,7 @@ H5Pset_driver(hid_t plist_id, hid_t new_driver_id, const void *new_driver_info)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_driver, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ii*x", plist_id, new_driver_id, new_driver_info);
/* Check arguments */
@@ -728,7 +728,7 @@ H5P_get_driver(H5P_genplist_t *plist)
{
hid_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI(H5P_get_driver, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the current driver ID */
if(TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
@@ -745,7 +745,7 @@ H5P_get_driver(H5P_genplist_t *plist)
ret_value = H5_DEFAULT_VFD;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -783,7 +783,7 @@ H5Pget_driver(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_driver, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", plist_id);
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
@@ -827,7 +827,7 @@ H5P_get_driver_info(H5P_genplist_t *plist)
{
void *ret_value=NULL;
- FUNC_ENTER_NOAPI(H5P_get_driver_info, NULL);
+ FUNC_ENTER_NOAPI(NULL)
/* Get the current driver info */
if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
@@ -841,7 +841,7 @@ H5P_get_driver_info(H5P_genplist_t *plist)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_get_driver_info() */
@@ -877,7 +877,7 @@ H5Pget_driver_info(hid_t plist_id)
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_driver_info, NULL);
+ FUNC_ENTER_API(NULL)
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
@@ -912,9 +912,9 @@ herr_t
H5Pset_family_offset(hid_t fapl_id, hsize_t offset)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_family_offset, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ih", fapl_id, offset);
/* Get the plist structure */
@@ -927,7 +927,7 @@ H5Pset_family_offset(hid_t fapl_id, hsize_t offset)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set family offset");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -951,9 +951,9 @@ done:
static herr_t
H5P_set_family_offset(H5P_genplist_t *plist, hsize_t offset)
{
- herr_t ret_value=SUCCEED;
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_set_family_offset, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
if(H5P_set(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0)
@@ -963,7 +963,7 @@ H5P_set_family_offset(H5P_genplist_t *plist, hsize_t offset)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -989,9 +989,9 @@ herr_t
H5Pget_family_offset(hid_t fapl_id, hsize_t *offset)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_family_offset, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", fapl_id, offset);
/* Get the plist structure */
@@ -1004,7 +1004,7 @@ H5Pget_family_offset(hid_t fapl_id, hsize_t *offset)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't get family offset");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1028,9 +1028,9 @@ done:
static herr_t
H5P_get_family_offset(H5P_genplist_t *plist, hsize_t *offset)
{
- herr_t ret_value=SUCCEED;
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_get_family_offset, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
if(H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, offset) < 0)
@@ -1040,7 +1040,7 @@ H5P_get_family_offset(H5P_genplist_t *plist, hsize_t *offset)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1066,9 +1066,9 @@ herr_t
H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_multi_type, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iMt", fapl_id, type);
/* Get the plist structure */
@@ -1081,7 +1081,7 @@ H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data type for multi driver");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1105,9 +1105,9 @@ done:
static herr_t
H5P_set_multi_type(H5P_genplist_t *plist, H5FD_mem_t type)
{
- herr_t ret_value=SUCCEED;
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_set_multi_type, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
if(H5P_set(plist, H5F_ACS_MULTI_TYPE_NAME, &type) < 0)
@@ -1117,7 +1117,7 @@ H5P_set_multi_type(H5P_genplist_t *plist, H5FD_mem_t type)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1143,9 +1143,9 @@ herr_t
H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_multi_type, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Mt", fapl_id, type);
/* Get the plist structure */
@@ -1158,7 +1158,7 @@ H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't get data type for multi driver");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1182,9 +1182,9 @@ done:
static herr_t
H5P_get_multi_type(H5P_genplist_t *plist, H5FD_mem_t *type)
{
- herr_t ret_value=SUCCEED;
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_get_multi_type, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
if( TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS) ) {
if(H5P_get(plist, H5F_ACS_MULTI_TYPE_NAME, type) < 0)
@@ -1194,7 +1194,7 @@ H5P_get_multi_type(H5P_genplist_t *plist, H5FD_mem_t *type)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1236,9 +1236,9 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_cache, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIszzd", plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes,
rdcc_w0);
@@ -1259,7 +1259,7 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1296,9 +1296,9 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts,
size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_cache, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "i*Is*z*z*d", plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes,
rdcc_w0);
@@ -1323,7 +1323,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts,
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1346,7 +1346,7 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_mdc_config, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", plist_id, config_ptr);
/* Get the plist structure */
@@ -1367,7 +1367,7 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache initial config")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* H5Pset_mdc_config() */
@@ -1394,7 +1394,7 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_mdc_config, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", plist_id, config_ptr);
/* Get the plist structure */
@@ -1457,9 +1457,9 @@ herr_t
H5Pset_gc_references(hid_t plist_id, unsigned gc_ref)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_gc_references, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, gc_ref);
/* Get the plist structure */
@@ -1471,7 +1471,7 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1499,9 +1499,9 @@ herr_t
H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_gc_references, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, gc_ref);
/* Get the plist structure */
@@ -1514,7 +1514,7 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref/*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1538,7 +1538,7 @@ H5Pset_fclose_degree(hid_t plist_id, H5F_close_degree_t degree)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_fclose_degree, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iFd", plist_id, degree);
/* Get the plist structure */
@@ -1574,7 +1574,7 @@ H5Pget_fclose_degree(hid_t plist_id, H5F_close_degree_t *degree)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_fclose_degree, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Fd", plist_id, degree);
/* Get the plist structure */
@@ -1622,9 +1622,9 @@ herr_t
H5Pset_meta_block_size(hid_t plist_id, hsize_t size)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_meta_block_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ih", plist_id, size);
/* Get the plist structure */
@@ -1636,7 +1636,7 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1664,9 +1664,9 @@ herr_t
H5Pget_meta_block_size(hid_t plist_id, hsize_t *size/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_meta_block_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, size);
/* Get the plist structure */
@@ -1680,7 +1680,7 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size/*out*/)
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -1717,9 +1717,9 @@ herr_t
H5Pset_sieve_buf_size(hid_t plist_id, size_t size)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_sieve_buf_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", plist_id, size);
/* Get the plist structure */
@@ -1731,7 +1731,7 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pset_sieve_buf_size() */
@@ -1759,9 +1759,9 @@ herr_t
H5Pget_sieve_buf_size(hid_t plist_id, size_t *size/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_sieve_buf_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, size);
/* Get the plist structure */
@@ -1774,7 +1774,7 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size/*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pget_sieve_buf_size() */
@@ -1806,9 +1806,9 @@ herr_t
H5Pset_small_data_block_size(hid_t plist_id, hsize_t size)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_small_data_block_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ih", plist_id, size);
/* Get the plist structure */
@@ -1820,7 +1820,7 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pset_small_data_block_size() */
@@ -1843,9 +1843,9 @@ herr_t
H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_small_data_block_size, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, size);
/* Get the plist structure */
@@ -1859,7 +1859,7 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size/*out*/)
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pget_small_data_block_size() */
@@ -1957,7 +1957,7 @@ H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low,
hbool_t latest; /* Whether to use the latest version or not */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_libver_bounds, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iFvFv", plist_id, low, high);
/* Check args */
@@ -2002,7 +2002,7 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low/*out*/,
hbool_t latest; /* Whether to use the latest version or not */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_libver_bounds, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", plist_id, low, high);
/* Get the plist structure */
@@ -2047,7 +2047,7 @@ H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_elink_file_cache_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, efc_size);
/* Get the plist structure */
@@ -2085,7 +2085,7 @@ H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_elink_file_cache_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", plist_id, efc_size);
/* Get the plist structure */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index a0f2f89..2e8cf1e 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -159,7 +159,7 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
hsize_t free_space_threshold = H5F_CRT_FREE_SPACE_THRESHOLD_DEF;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_fcrt_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register the user block size */
if(H5P_register_real(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE, &userblock_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -230,7 +230,7 @@ H5Pset_userblock(hid_t plist_id, hsize_t size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_userblock, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ih", plist_id, size);
/* Sanity check non-zero userblock sizes */
@@ -281,9 +281,9 @@ herr_t
H5Pget_userblock(hid_t plist_id, hsize_t *size)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_userblock, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", plist_id, size);
/* Get the plist structure */
@@ -296,7 +296,7 @@ H5Pget_userblock(hid_t plist_id, hsize_t *size)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL,"can't get user block");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -320,7 +320,7 @@ H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_sizes, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "izz", plist_id, sizeof_addr, sizeof_size);
/* Check arguments */
@@ -377,7 +377,7 @@ H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr, size_t *sizeof_size)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_sizes, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*z*z", plist_id, sizeof_addr, sizeof_size);
/* Get the plist structure */
@@ -440,9 +440,9 @@ H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk)
{
unsigned btree_k[H5B_NUM_BTREE_ID];
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_sym_k, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, ik, lk);
/* Get the plist structure */
@@ -462,7 +462,7 @@ H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set rank for symbol table leaf nodes");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -491,9 +491,9 @@ H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out */ , unsigned *lk /*out */ )
{
unsigned btree_k[H5B_NUM_BTREE_ID];
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_sym_k, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", plist_id, ik, lk);
/* Get the plist structure */
@@ -511,7 +511,7 @@ H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out */ , unsigned *lk /*out */ )
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get rank for symbol table leaf nodes");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -539,9 +539,9 @@ H5Pset_istore_k(hid_t plist_id, unsigned ik)
{
unsigned btree_k[H5B_NUM_BTREE_ID];
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_istore_k, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, ik);
/* Check arguments */
@@ -560,7 +560,7 @@ H5Pset_istore_k(hid_t plist_id, unsigned ik)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set rank for btree interanl nodes");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -592,7 +592,7 @@ H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out */ )
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_istore_k, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, ik);
/* Get the plist structure */
@@ -636,7 +636,7 @@ H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_shared_mesg_nindexes, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, nindexes);
/* Check argument */
@@ -651,7 +651,7 @@ H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set number of indexes");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pset_shared_mesg_nindexes() */
@@ -674,7 +674,7 @@ H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_shared_mesg_nindexes, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", plist_id, nindexes);
/* Get the plist structure */
@@ -715,7 +715,7 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_
unsigned minsizes[H5O_SHMESG_MAX_NINDEXES]; /* Array of min_mesg_sizes*/
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_shared_mesg_index, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iIuIuIu", plist_id, index_num, mesg_type_flags, min_mesg_size);
/* Check arguments */
@@ -776,9 +776,9 @@ H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type
unsigned nindexes; /* Number of SOHM indexes */
unsigned type_flags[H5O_SHMESG_MAX_NINDEXES]; /* Array of mesg_type_flags*/
unsigned minsizes[H5O_SHMESG_MAX_NINDEXES]; /* Array of min_mesg_sizes*/
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_shared_mesg_index, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iIu*Iu*Iu", plist_id, index_num, mesg_type_flags,
min_mesg_size);
@@ -806,7 +806,7 @@ H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type
*min_mesg_size = minsizes[index_num];
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pset_shared_mesg_index() */
@@ -833,9 +833,9 @@ herr_t
H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_shared_mesg_phase_change, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, max_list, min_btree);
/* Check that values are sensible. The min_btree value must be no greater
@@ -866,7 +866,7 @@ H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set B-tree minimum in property list");
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pset_shared_mesg_phase_change() */
@@ -887,9 +887,9 @@ herr_t
H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_shared_mesg_phase_change, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*Iu*Iu", plist_id, max_list, min_btree);
/* Get the plist structure */
@@ -907,7 +907,7 @@ H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *mi
}
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pget_shared_mesg_phase_change() */
@@ -934,7 +934,7 @@ H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t thresh
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_file_space, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iFfh", plist_id, strategy, threshold);
if((unsigned)strategy >= H5F_FILE_SPACE_NTYPES)
@@ -976,7 +976,7 @@ H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *thre
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_file_space, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*Ff*h", plist_id, strategy, threshold);
/* Get the plist structure */
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index 43c6055..7828fb2 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -110,7 +110,7 @@ H5P_fmnt_reg_prop(H5P_genclass_t *pclass)
hbool_t local = H5F_MNT_SYM_LOCAL_DEF; /* Whether symlinks are local to file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_fmnt_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register property of whether symlinks is local to file */
if(H5P_register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &local, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 72784eb..983929d 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -110,7 +110,7 @@ H5P_gcrt_reg_prop(H5P_genclass_t *pclass)
H5O_linfo_t linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_gcrt_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register group info property */
if(H5P_register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &ginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -143,7 +143,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint)
H5O_ginfo_t ginfo; /* Group information structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_local_heap_size_hint, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", plist_id, size_hint);
/* Get the plist structure */
@@ -183,7 +183,7 @@ H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_local_heap_size_hint, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, size_hint);
if(size_hint) {
@@ -231,7 +231,7 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
H5O_ginfo_t ginfo; /* Group information structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_link_phase_change, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, max_compact, min_dense);
/* Range check values */
@@ -284,7 +284,7 @@ H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_link_phase_change, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", plist_id, max_compact, min_dense);
/* Get values */
@@ -337,7 +337,7 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name
H5O_ginfo_t ginfo; /* Group information structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_est_link_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, est_num_entries, est_name_len);
/* Range check values */
@@ -388,7 +388,7 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_est_link_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", plist_id, est_num_entries, est_name_len);
/* Get values */
@@ -433,7 +433,7 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags)
H5O_linfo_t linfo; /* Link information structure */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_link_creation_order, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, crt_order_flags);
/* Check for bad combination of flags */
@@ -478,7 +478,7 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_link_creation_order, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, crt_order_flags);
/* Get values */
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 4ae274e..08b8af6 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -265,7 +265,7 @@ H5P_do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb)
H5P_genprop_t *pcopy=NULL; /* Copy of property to insert into skip list */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_do_prop_cb1)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate space for a temporary copy of the property value */
if(NULL == (tmp_value = H5MM_malloc(prop->size)))
@@ -326,7 +326,7 @@ H5P_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -351,7 +351,7 @@ H5P_init_interface(void)
size_t pass_init; /* # of classes initialized in each pass */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Initialize the Generic Property class & object groups.
@@ -451,7 +451,7 @@ H5P_term_interface(void)
int nclass=0;
int n=0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
/* Destroy HDF5 library property classes & lists */
@@ -551,7 +551,7 @@ H5P_copy_pclass(H5P_genclass_t *pclass)
H5P_genprop_t *pcopy; /* Copy of property to insert into class */
H5P_genclass_t *ret_value=NULL; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_copy_pclass)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
@@ -632,7 +632,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */
hid_t ret_value=FAIL; /* return value */
- FUNC_ENTER_NOAPI(H5P_copy_plist, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(old_plist);
@@ -650,11 +650,11 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
new_plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
/* Initialize the skip list to hold the changed properties */
- if((new_plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((new_plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties")
/* Create the skip list for deleted properties */
- if((new_plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((new_plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties")
/* Create the skip list to hold names of properties already seen
@@ -662,7 +662,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
* 'create' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR))== NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL))== NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
nseen = 0;
@@ -842,7 +842,7 @@ H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
H5P_genprop_t *prop = NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_dup_prop)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oprop);
HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
@@ -956,7 +956,7 @@ H5P_create_prop(const char *name, size_t size, H5P_prop_within_t type,
H5P_genprop_t *prop=NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_create_prop)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(name);
HDassert((size>0 && value!=NULL) || (size==0));
@@ -1036,7 +1036,7 @@ H5P_add_prop(H5SL_t *slist, H5P_genprop_t *prop)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_add_prop, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(slist);
HDassert(prop);
@@ -1074,7 +1074,7 @@ H5P_find_prop_plist(H5P_genplist_t *plist, const char *name)
{
H5P_genprop_t *ret_value; /* Property pointer return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_find_prop_plist)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(plist);
HDassert(name);
@@ -1134,7 +1134,7 @@ H5P_find_prop_pclass(H5P_genclass_t *pclass, const char *name)
{
H5P_genprop_t *ret_value; /* Property pointer return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_find_prop_pclass)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
HDassert(name);
@@ -1169,7 +1169,7 @@ done:
static herr_t
H5P_free_prop(H5P_genprop_t *prop)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(prop);
@@ -1213,7 +1213,7 @@ H5P_free_prop_cb(void *item, void UNUSED *key, void *op_data)
H5P_genprop_t *tprop=(H5P_genprop_t *)item; /* Temporary pointer to property */
hbool_t make_cb = *(hbool_t *)op_data; /* Whether to make property 'close' callback */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_prop_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(tprop);
@@ -1252,7 +1252,7 @@ H5P_free_del_name_cb(void *item, void UNUSED *key, void UNUSED *op_data)
{
char *del_name=(char *)item; /* Temporary pointer to deleted name */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_free_del_name_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(del_name);
@@ -1288,7 +1288,7 @@ H5P_free_del_name_cb(void *item, void UNUSED *key, void UNUSED *op_data)
herr_t
H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_access_class)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pclass);
HDassert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
@@ -1384,7 +1384,7 @@ H5P_check_class(void *_obj, hid_t UNUSED id, void *_key)
const H5P_check_class_t *key=(const H5P_check_class_t *)_key; /* Pointer to key information for comparison */
int ret_value=0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_check_class)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(obj);
HDassert(H5I_GENPROP_CLS==H5I_get_type(id));
@@ -1443,7 +1443,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, hbool_t internal,
H5P_genclass_t *pclass=NULL; /* Property list class created */
H5P_genclass_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_create_class, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(name);
/* Allow internal classes to break some rules */
@@ -1468,7 +1468,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, hbool_t internal,
pclass->revision = H5P_GET_NEXT_REV; /* Get a revision number for the class */
/* Create the skip list for properties */
- if(NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR)))
+ if(NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR, NULL)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for properties")
/* Set callback functions and pass-along data */
@@ -1540,7 +1540,7 @@ H5P_create(H5P_genclass_t *pclass)
H5SL_t *seen=NULL; /* Skip list to hold names of properties already seen */
H5P_genplist_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_create)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
@@ -1558,11 +1558,11 @@ H5P_create(H5P_genclass_t *pclass)
plist->class_init = FALSE; /* Initially, wait until the class callback finishes to set */
/* Create the skip list for changed properties */
- if((plist->props = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for changed properties")
/* Create the skip list for deleted properties */
- if((plist->del = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for deleted properties")
/* Create the skip list to hold names of properties already seen
@@ -1570,7 +1570,7 @@ H5P_create(H5P_genclass_t *pclass)
* 'create' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,NULL,"can't create skip list for seen properties")
/*
@@ -1679,7 +1679,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
hid_t plist_id = FAIL; /* Property list ID */
hid_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_create_id, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pclass);
@@ -1889,7 +1889,7 @@ H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
H5P_genprop_t *new_prop = NULL; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_register_real, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pclass);
HDassert(0 == pclass->plists);
@@ -2089,7 +2089,7 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
H5P_genclass_t *new_class = NULL; /* New class pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_register, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(ppclass);
@@ -2299,7 +2299,7 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
H5P_genprop_t *new_prop = NULL; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_insert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(plist);
HDassert(name);
@@ -2392,7 +2392,7 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_set, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(plist);
HDassert(name);
@@ -2541,7 +2541,7 @@ H5P_exist_plist(H5P_genplist_t *plist, const char *name)
{
htri_t ret_value = FAIL; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_plist)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(plist);
HDassert(name);
@@ -2601,7 +2601,7 @@ H5P_exist_pclass(H5P_genclass_t *pclass, const char *name)
{
htri_t ret_value = FAIL; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_exist_pclass)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pclass);
HDassert(name);
@@ -2658,7 +2658,7 @@ H5P_get_size_plist(H5P_genplist_t *plist, const char *name, size_t *size)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_plist)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(plist);
HDassert(name);
@@ -2704,7 +2704,7 @@ H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_get_size_pclass)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
HDassert(name);
@@ -2746,7 +2746,7 @@ H5P_get_class(const H5P_genplist_t *plist)
{
H5P_genclass_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(plist);
@@ -2780,7 +2780,7 @@ H5P_get_class(const H5P_genplist_t *plist)
herr_t
H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_nprops_plist)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(plist);
HDassert(nprops);
@@ -2818,7 +2818,7 @@ H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recu
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_get_nprops_pclass, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pclass);
HDassert(nprops);
@@ -2866,7 +2866,7 @@ H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
int cmp_value; /* Value from comparison */
int ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_prop)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(prop1);
HDassert(prop2);
@@ -2957,7 +2957,7 @@ H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
int cmp_value; /* Value from comparison */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_class)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pclass1);
HDassert(pclass2);
@@ -3063,7 +3063,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2)
int cmp_value; /* Value from comparison */
int ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_cmp_plist)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(plist1);
HDassert(plist2);
@@ -3169,7 +3169,7 @@ H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_isa_class_real)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pclass1);
HDassert(pclass2);
@@ -3222,7 +3222,7 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id)
H5P_genclass_t *pclass; /* Property list class */
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_isa_class, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
@@ -3272,7 +3272,7 @@ H5P_object_verify(hid_t plist_id, hid_t pclass_id)
{
H5P_genplist_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_object_verify, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Compare the property list's class against the other class */
if(H5P_isa_class(plist_id, pclass_id) != TRUE)
@@ -3349,7 +3349,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_
int curr_idx = 0; /* Current iteration index */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_plist)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx);
HDassert(iter_func);
@@ -3359,7 +3359,7 @@ H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, void *iter_
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Create the skip list to hold names of properties already seen */
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
/* Walk through the changed properties in the list */
@@ -3505,7 +3505,7 @@ H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func, void *ite
int curr_idx=0; /* Current iteration index */
int ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_iterate_pclass)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(idx);
HDassert(iter_func);
@@ -3577,7 +3577,7 @@ H5P_peek_unsigned(H5P_genplist_t *plist, const char *name)
{
unsigned ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_peek_unsigned, UFAIL)
+ FUNC_ENTER_NOAPI(UFAIL)
HDassert(plist);
HDassert(name);
@@ -3622,7 +3622,7 @@ H5P_peek_hid_t(H5P_genplist_t *plist, const char *name)
{
hid_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_peek_hid_t, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(plist);
HDassert(name);
@@ -3667,7 +3667,7 @@ H5P_peek_voidp(H5P_genplist_t *plist, const char *name)
{
void * ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_peek_voidp, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(plist);
HDassert(name);
@@ -3712,7 +3712,7 @@ H5P_peek_size_t(H5P_genplist_t *plist, const char *name)
{
size_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_peek_size_t, UFAIL)
+ FUNC_ENTER_NOAPI(UFAIL)
HDassert(plist);
HDassert(name);
@@ -3760,7 +3760,7 @@ H5P_get(const H5P_genplist_t *plist, const char *name, void *value)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_get, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(plist);
HDassert(name);
@@ -3907,7 +3907,7 @@ H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name)
char *del_name; /* Pointer to deleted name */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_remove, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(plist);
HDassert(name);
@@ -4044,7 +4044,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
H5P_genprop_t *new_prop=NULL; /* Pointer to new property */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_plist)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(name);
@@ -4151,7 +4151,7 @@ H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_copy_prop_pclass)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(name);
@@ -4226,7 +4226,7 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_unregister)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
HDassert(name);
@@ -4291,7 +4291,7 @@ H5P_close(void *_plist)
unsigned make_cb=0; /* Operator data for property free callback */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_close)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(plist);
@@ -4316,7 +4316,7 @@ H5P_close(void *_plist)
* 'close' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR)) == NULL)
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
nseen = 0;
@@ -4450,7 +4450,7 @@ H5P_get_class_name(H5P_genclass_t *pclass)
{
char *ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_get_class_name, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(pclass);
@@ -4491,7 +4491,7 @@ H5P_get_class_path(H5P_genclass_t *pclass)
size_t my_path_len; /* This class's name's length */
char *ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_get_class_path)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
@@ -4558,7 +4558,7 @@ H5P_open_class_path(const char *path)
H5P_genclass_t *ret_value; /* Return value */
H5P_check_class_t check_info; /* Structure to hold the information for checking duplicate names */
- FUNC_ENTER_NOAPI_NOINIT(H5P_open_class_path)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(path);
@@ -4631,7 +4631,7 @@ H5P_get_class_parent(const H5P_genclass_t *pclass)
{
H5P_genclass_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_class_parent)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(pclass);
@@ -4665,7 +4665,7 @@ H5P_close_class(void *_pclass)
H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_close_class)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pclass);
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 438a297..6c80493 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -155,7 +155,7 @@ H5P_lacc_reg_prop(H5P_genclass_t *pclass)
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_lacc_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register property for number of links traversed */
if(H5P_register_real(pclass, H5L_ACS_NLINKS_NAME, H5L_ACS_NLINKS_SIZE, &nlinks, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -202,7 +202,7 @@ H5P_lacc_elink_fapl_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UN
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_lacc_elink_fapl_del, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(value);
@@ -236,7 +236,7 @@ H5P_lacc_elink_fapl_copy(const char UNUSED *name, size_t UNUSED size, void *valu
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5P_lacc_elink_fapl_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(value);
@@ -277,7 +277,7 @@ H5P_lacc_elink_fapl_close(const char UNUSED *name, size_t UNUSED size, void *val
hid_t l_fapl_id;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5P_lacc_elink_fapl_close)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(value);
@@ -306,7 +306,7 @@ done:
static herr_t
H5P_lacc_elink_pref_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_lacc_elink_pref_del)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(value);
@@ -332,7 +332,7 @@ H5P_lacc_elink_pref_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UN
static herr_t
H5P_lacc_elink_pref_copy(const char UNUSED *name, size_t UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_lacc_elink_pref_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(value);
@@ -358,7 +358,7 @@ H5P_lacc_elink_pref_copy(const char UNUSED *name, size_t UNUSED size, void *valu
static herr_t
H5P_lacc_elink_pref_close(const char UNUSED *name, size_t UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_lacc_elink_pref_close)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(value);
@@ -395,7 +395,7 @@ H5Pset_nlinks(hid_t plist_id, size_t nlinks)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_nlinks, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", plist_id, nlinks);
if(nlinks <= 0)
@@ -436,7 +436,7 @@ H5Pget_nlinks(hid_t plist_id, size_t *nlinks)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_nlinks, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*z", plist_id, nlinks);
if(!nlinks)
@@ -476,7 +476,7 @@ H5Pset_elink_prefix(hid_t plist_id, const char *prefix)
char *my_prefix; /* Copy of prefix string */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_elink_prefix, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", plist_id, prefix);
/* Get the plist structure */
@@ -527,7 +527,7 @@ H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size)
size_t len; /* Length of prefix string */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pget_elink_prefix, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "i*sz", plist_id, prefix, size);
/* Get the plist structure */
@@ -577,7 +577,7 @@ H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id)
hid_t l_fapl_id, new_fapl_id;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_elink_fapl, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", lapl_id, fapl_id);
/* Check arguments */
@@ -628,7 +628,7 @@ H5Pget_elink_fapl(hid_t lapl_id)
hid_t l_fapl_id;
hid_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_API(H5Pget_elink_fapl, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", lapl_id);
/* Get the plist structure */
@@ -672,7 +672,7 @@ H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_elink_acc_flags, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", lapl_id, flags);
/* Check that flags are valid */
@@ -711,7 +711,7 @@ H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_elink_acc_flags, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", lapl_id, flags);
/* Get the plist structure */
@@ -749,7 +749,7 @@ H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data)
H5L_elink_cb_t cb_info; /* Callback info struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_elink_cb, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ix*x", lapl_id, func, op_data);
/* Check if the callback function is NULL and the user data is non-NULL.
@@ -794,7 +794,7 @@ H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data)
H5L_elink_cb_t cb_info; /* Callback info struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_elink_cb, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x**x", lapl_id, func, op_data);
/* Get the plist structure */
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index ffc68fa..60b4e37 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -116,7 +116,7 @@ H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
unsigned intmd_group = H5L_CRT_INTERMEDIATE_GROUP_DEF; /* Default setting for creating intermediate groups */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_lcrt_reg_prop, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Register create intermediate groups property */
if(H5P_register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &intmd_group, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -147,7 +147,7 @@ H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_create_intermediate_group, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, crt_intmd_group);
/* Get the plist structure */
@@ -182,7 +182,7 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_create_intermediate_group, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, crt_intmd_group);
/* Get the plist structure */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index dec2cfe..217d0ba 100755
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -133,7 +133,7 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass)
H5O_pline_t pline = H5O_CRT_PIPELINE_DEF; /* Default I/O pipeline setting */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_ocrt_reg_prop)
+ FUNC_ENTER_NOAPI_NOINIT
/* Register max. compact attribute storage property */
if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &attr_max_compact, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -180,7 +180,7 @@ H5P_ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
H5P_genplist_t *dst_plist; /* Pointer to destination property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_ocrt_copy)
+ FUNC_ENTER_NOAPI_NOINIT
/* Verify property list IDs */
if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id)))
@@ -228,7 +228,7 @@ H5P_ocrt_close(hid_t dcpl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5P_ocrt_close)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
@@ -275,7 +275,7 @@ H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_attr_phase_change, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIuIu", plist_id, max_compact, min_dense);
/* Range check values */
@@ -319,7 +319,7 @@ H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_de
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_attr_phase_change, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*Iu*Iu", plist_id, max_compact, min_dense);
/* Get the plist structure */
@@ -360,7 +360,7 @@ H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags)
uint8_t ohdr_flags; /* Object header flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_attr_creation_order, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, crt_order_flags);
/* Check for bad combination of flags */
@@ -409,7 +409,7 @@ H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_attr_creation_order, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Iu", plist_id, crt_order_flags);
/* Get values */
@@ -471,7 +471,7 @@ H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times)
uint8_t ohdr_flags; /* Object header flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_obj_track_times, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ib", plist_id, track_times);
/* Get the plist structure */
@@ -514,7 +514,7 @@ H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_obj_track_times, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*b", plist_id, track_times);
/* Get values */
@@ -582,7 +582,7 @@ H5P_modify_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned flags,
H5O_pline_t pline;
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5P_modify_filter, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the pipeline property to modify */
if(H5P_get(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
@@ -651,7 +651,7 @@ H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pmodify_filter, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iZfIuz*[a3]Iu", plist_id, filter, flags, cd_nelmts, cd_values);
/* Check args */
@@ -728,7 +728,7 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_filter, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iZfIuz*[a3]Iu", plist_id, filter, flags, cd_nelmts, cd_values);
/* Check args */
@@ -794,7 +794,7 @@ H5Pget_nfilters(hid_t plist_id)
H5O_pline_t pline; /* Filter pipeline */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_nfilters, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", plist_id);
/* Get the plist structure */
@@ -855,7 +855,7 @@ H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags/*out*/,
const H5Z_filter_info_t *filter; /* Pointer to filter information */
H5Z_filter_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_filter2, H5Z_FILTER_ERROR)
+ FUNC_ENTER_API(H5Z_FILTER_ERROR)
H5TRACE8("Zf", "iIux*zxzxx", plist_id, idx, flags, cd_nelmts, cd_values,
namelen, name, filter_config);
@@ -938,7 +938,7 @@ H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, unsigned int *flags
H5Z_filter_info_t *filter; /* Pointer to filter information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_get_filter_by_id, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get pipeline info */
if(H5P_get(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
@@ -992,11 +992,9 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags/*out*/
size_t namelen, char name[]/*out*/, unsigned *filter_config)
{
H5P_genplist_t *plist; /* Property list */
- H5O_pline_t pline; /* Filter pipeline */
- const H5Z_filter_info_t *filter; /* Pointer to filter information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_filter_by_id2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE8("e", "iZfx*zxzx*Iu", plist_id, id, flags, cd_nelmts, cd_values,
namelen, name, filter_config);
@@ -1064,7 +1062,7 @@ H5Pall_filters_avail(hid_t plist_id)
H5O_pline_t pline; /* Filter pipeline */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Pall_filters_avail, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", plist_id);
/* Get the plist structure */
@@ -1111,7 +1109,7 @@ H5Premove_filter(hid_t plist_id, H5Z_filter_t filter)
H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Premove_filter, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iZf", plist_id, filter);
/* Get the plist structure */
@@ -1175,7 +1173,7 @@ H5Pset_deflate(hid_t plist_id, unsigned level)
H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_deflate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, level);
/* Check arguments */
@@ -1230,7 +1228,7 @@ H5Pset_fletcher32(hid_t plist_id)
H5O_pline_t pline; /* Filter pipeline */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_fletcher32, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", plist_id);
/* Get the plist structure */
@@ -1272,7 +1270,7 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/,
size_t namelen, char name[]/*out*/,
unsigned *filter_config /*out*/)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_get_filter)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check arguments */
HDassert(filter);
@@ -1353,7 +1351,7 @@ H5P_ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED si
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5P_ocrt_pipeline_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(pline1);
@@ -1450,7 +1448,7 @@ H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags/*out*/,
H5P_genplist_t *plist; /* Property list pointer */
H5Z_filter_t ret_value; /* return value */
- FUNC_ENTER_API(H5Pget_filter1, H5Z_FILTER_ERROR)
+ FUNC_ENTER_API(H5Z_FILTER_ERROR)
H5TRACE7("Zf", "iIux*zxzx", plist_id, idx, flags, cd_nelmts, cd_values, namelen,
name);
@@ -1531,7 +1529,7 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags/*out*/
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pget_filter_by_id1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE7("e", "iZfx*zxzx", plist_id, id, flags, cd_nelmts, cd_values, namelen,
name);
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 963dddc..af50d80 100755
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -115,7 +115,7 @@ H5P_ocpy_reg_prop(H5P_genclass_t *pclass)
unsigned ocpy_option = H5O_CPY_OPTION_DEF; /* Default object copy flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_ocpy_reg_prop, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Register copy options property */
if(H5P_register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &ocpy_option, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -153,7 +153,7 @@ H5Pset_copy_object(hid_t plist_id, unsigned cpy_option)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Pset_copy_object, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iIu", plist_id, cpy_option);
/* Check parameters */
@@ -191,7 +191,7 @@ H5Pget_copy_object(hid_t plist_id, unsigned *cpy_option /*out*/)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_copy_object, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, cpy_option);
/* Get the plist structure */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index ba6106e..68627d4 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -120,6 +120,38 @@ typedef H5P_prp_cb1_t H5P_prp_close_func_t;
/* Define property list iteration function type */
typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data);
+/* Actual IO mode property */
+typedef enum H5D_mpio_actual_chunk_opt_mode_t {
+ /* The default value, H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all I/O
+ * operations that do not use chunk optimizations, including non-collective
+ * I/O and contiguous collective I/O.
+ */
+ H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0,
+ H5D_MPIO_LINK_CHUNK,
+ H5D_MPIO_MULTI_CHUNK,
+ H5D_MPIO_MULTI_CHUNK_NO_OPT
+} H5D_mpio_actual_chunk_opt_mode_t;
+
+typedef enum H5D_mpio_actual_io_mode_t {
+ /* The following four values are conveniently defined as a bit field so that
+ * we can switch from the default to indpendent or collective and then to
+ * mixed without having to check the original value.
+ *
+ * NO_COLLECTIVE means that either collective I/O wasn't requested or that
+ * no I/O took place.
+ *
+ * CHUNK_INDEPENDENT means that collective I/O was requested, but the
+ * chunk optimization scheme chose independent I/O for each chunk.
+ */
+ H5D_MPIO_NO_COLLECTIVE = 0x0,
+ H5D_MPIO_CHUNK_INDEPENDENT = 0x1,
+ H5D_MPIO_CHUNK_COLLECTIVE = 0x2,
+ H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2,
+
+ /* The contiguous case is separate from the bit field. */
+ H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4
+} H5D_mpio_actual_io_mode_t;
+
/********************/
/* Public Variables */
/********************/
@@ -359,6 +391,10 @@ H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size);
H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size/*out*/);
H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void* operate_data);
H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void** operate_data);
+#ifdef H5_HAVE_PARALLEL
+H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode);
+H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode);
+#endif /* H5_HAVE_PARALLEL */
/* Link creation property list (LCPL) routines */
H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd);
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index 5125511..91cf70b 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -114,7 +114,7 @@ H5P_strcrt_reg_prop(H5P_genclass_t *pclass)
H5T_cset_t char_encoding = H5P_STRCRT_CHAR_ENCODING_DEF; /* Default character set encoding */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_strcrt_reg_prop, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Register character encoding */
if(H5P_register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -145,7 +145,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_char_encoding, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTc", plist_id, encoding);
/* Check arguments */
@@ -161,7 +161,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5P_set_char_encoding() */
@@ -182,7 +182,7 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/)
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_char_encoding, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, encoding);
/* Get the plist structure */
@@ -195,6 +195,6 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Pget_char_encoding() */
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 575d6d3..b36da6a 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -63,7 +63,7 @@ H5P_get_class_path_test(hid_t pclass_id)
H5P_genclass_t *pclass; /* Property class to query */
char *ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_get_class_path_test, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Check arguments. */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
@@ -104,7 +104,7 @@ H5P_open_class_path_test(const char *path)
H5P_genclass_t *pclass=NULL;/* Property class to query */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5P_open_class_path_test, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
if (NULL == path || *path=='\0')
@@ -122,7 +122,7 @@ done:
if(ret_value<0 && pclass)
H5P_close_class(pclass);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5P_open_class_path_test() */
@@ -149,7 +149,7 @@ H5P_reset_external_file_test(hid_t dcpl_id)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5P_reset_external_file_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
diff --git a/src/H5R.c b/src/H5R.c
index 2d2766d..65ac7da 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -38,8 +38,6 @@
/* Static functions */
static herr_t H5R_create(void *ref, H5G_loc_t *loc, const char *name,
H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id);
-static hid_t H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type,
- const void *_ref, hbool_t app_ref);
static H5S_t * H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref);
static ssize_t H5R_get_name(H5F_t *file, hid_t lapl_id, hid_t dxpl_id, hid_t id,
H5R_type_t ref_type, const void *_ref, char *name, size_t size);
@@ -63,7 +61,7 @@ H5R_init(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5R_init, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
@@ -88,14 +86,14 @@ H5R_init_interface(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5R_init_interface);
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
if(H5I_register_type(H5I_REFERENCE, (size_t)H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS, (H5I_free_t)NULL) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to initialize interface");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -121,7 +119,7 @@ H5R_term_interface(void)
{
int n=0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5R_term_interface);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_REFERENCE))) {
@@ -133,7 +131,7 @@ H5R_term_interface(void)
}
}
- FUNC_LEAVE_NOAPI(n);
+ FUNC_LEAVE_NOAPI(n)
}
@@ -173,7 +171,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5
hbool_t obj_found = FALSE; /* Object location found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5R_create)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(_ref);
HDassert(loc);
@@ -312,7 +310,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
H5S_t *space = NULL; /* Pointer to dataspace containing region */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Rcreate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xi*sRti", ref, loc_id, name, ref_type, space_id);
/* Check args */
@@ -361,9 +359,13 @@ done:
Currently only set up to work with references to datasets
EXAMPLES
REVISION LOG
+ Raymond Lu
+ 13 July 2011
+ I added the OAPL_ID parameter for the object being referenced. It only
+ supports dataset access property list currently.
--------------------------------------------------------------------------*/
-static hid_t
-H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, const void *_ref, hbool_t app_ref)
+hid_t
+H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type, const void *_ref, hbool_t app_ref)
{
H5O_loc_t oloc; /* Object location */
H5G_name_t path; /* Path of object */
@@ -372,7 +374,7 @@ H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, const void *_re
H5O_type_t obj_type; /* Type of object */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5R_dereference)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(_ref);
HDassert(ref_type > H5R_BADTYPE || ref_type < H5R_MAXTYPE);
@@ -462,11 +464,16 @@ H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, const void *_re
case H5O_TYPE_DATASET:
{
- hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
H5D_t *dset; /* Pointer to dataset to open */
+ /* Get correct property list */
+ if(H5P_DEFAULT == oapl_id)
+ oapl_id = H5P_DATASET_ACCESS_DEFAULT;
+ else if(TRUE != H5P_isa_class(oapl_id, H5P_DATASET_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+
/* Open the dataset */
- if(NULL == (dset = H5D_open(&loc, dapl_id, dxpl_id)))
+ if(NULL == (dset = H5D_open(&loc, oapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
/* Create an atom for the dataset */
@@ -488,13 +495,14 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5Rdereference
+ H5Rdereference2
PURPOSE
Opens the HDF5 object referenced.
USAGE
- hid_t H5Rdereference(ref)
+ hid_t H5Rdereference2(ref)
hid_t id; IN: Dataset reference object is in or location ID of
object that the dataset is located within.
+ hid_t oapl_id; IN: Property list of the object being referenced.
H5R_type_t ref_type; IN: Type of reference to create
void *ref; IN: Reference to open.
@@ -507,20 +515,26 @@ done:
COMMENTS, BUGS, ASSUMPTIONS
EXAMPLES
REVISION LOG
+ Raymond Lu
+ 13 July 2011
+ I added the OAPL_ID parameter for the object being referenced. It only
+ supports dataset access property list currently.
--------------------------------------------------------------------------*/
hid_t
-H5Rdereference(hid_t id, H5R_type_t ref_type, const void *_ref)
+H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_ref)
{
H5G_loc_t loc; /* Group location */
H5F_t *file = NULL; /* File object */
hid_t ret_value;
- FUNC_ENTER_API(H5Rdereference, FAIL)
- H5TRACE3("i", "iRt*x", id, ref_type, _ref);
+ FUNC_ENTER_API(FAIL)
+ H5TRACE4("i", "iiRt*x", obj_id, oapl_id, ref_type, _ref);
/* Check args */
- if(H5G_loc(id, &loc) < 0)
+ if(H5G_loc(obj_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(oapl_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
if(_ref == NULL)
@@ -530,12 +544,12 @@ H5Rdereference(hid_t id, H5R_type_t ref_type, const void *_ref)
file = loc.oloc->file;
/* Create reference */
- if((ret_value = H5R_dereference(file, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable dereference object")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Rdereference() */
+} /* end H5Rdereference2() */
/*--------------------------------------------------------------------------
@@ -568,7 +582,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref)
uint8_t *buf = NULL; /* Buffer to store serialized selection in */
H5S_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5R_get_region)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(_ref);
HDassert(file);
@@ -637,7 +651,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
H5S_t *space = NULL; /* Dataspace object */
hid_t ret_value;
- FUNC_ENTER_API(H5Rget_region, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "iRt*x", id, ref_type, ref);
/* Check args */
@@ -691,7 +705,7 @@ H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type,
unsigned rc; /* Reference count of object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5R_get_obj_type)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
HDassert(_ref);
@@ -777,7 +791,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref,
H5G_loc_t loc; /* Object location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Rget_obj_type2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iRt*x*Ot", id, ref_type, ref, obj_type);
/* Check args */
@@ -833,7 +847,7 @@ H5R_get_name(H5F_t *f, hid_t lapl_id, hid_t dxpl_id, hid_t id, H5R_type_t ref_ty
H5O_loc_t oloc; /* Object location describing object for reference */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5R_get_name)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(f);
@@ -931,7 +945,7 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
H5F_t *file; /* File object */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Rget_name, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("Zs", "iRt*x*sz", id, ref_type, _ref, name, size);
/* Check args */
diff --git a/src/H5RC.c b/src/H5RC.c
index ecec03a..6abe837 100644
--- a/src/H5RC.c
+++ b/src/H5RC.c
@@ -57,7 +57,7 @@ H5RC_create(void *o, H5RC_free_func_t free_func)
{
H5RC_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5RC_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(o);
@@ -101,7 +101,7 @@ H5RC_decr(H5RC_t *rc)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5RC_decr, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(rc);
diff --git a/src/H5RS.c b/src/H5RS.c
index 06fc81e..dc6795e 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -63,7 +63,7 @@ H5RS_xstrdup(const char *s)
{
char *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5RS_xstrdup)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(s) {
size_t len = HDstrlen(s) + 1;
@@ -103,7 +103,7 @@ H5RS_create(const char *s)
{
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5RS_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate ref-counted string structure */
if(NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
@@ -143,7 +143,7 @@ H5RS_wrap(const char *s)
{
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5RS_wrap, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate ref-counted string structure */
if(NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
@@ -185,7 +185,7 @@ H5RS_own(char *s)
{
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5RS_own, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate ref-counted string structure */
if(NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
@@ -223,7 +223,7 @@ done:
herr_t
H5RS_decr(H5RS_str_t *rs)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_decr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs);
@@ -261,7 +261,7 @@ H5RS_decr(H5RS_str_t *rs)
herr_t
H5RS_incr(H5RS_str_t *rs)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_incr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs);
@@ -305,7 +305,7 @@ H5RS_incr(H5RS_str_t *rs)
H5RS_str_t *
H5RS_dup(H5RS_str_t *ret_value)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_dup)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check for valid reference counted string */
if(ret_value != NULL)
@@ -341,7 +341,7 @@ H5RS_dup_str(const char *s)
size_t path_len; /* Length of the path */
H5RS_str_t *ret_value;
- FUNC_ENTER_NOAPI(H5RS_dup_str, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(s);
@@ -389,7 +389,7 @@ int
H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
{
/* Can't return invalid value from this function */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5RS_cmp)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs1);
@@ -422,7 +422,7 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
ssize_t
H5RS_len(const H5RS_str_t *rs)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_len)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs);
@@ -456,7 +456,7 @@ H5RS_len(const H5RS_str_t *rs)
char *
H5RS_get_str(const H5RS_str_t *rs)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_get_str)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs);
@@ -488,7 +488,7 @@ H5RS_get_str(const H5RS_str_t *rs)
unsigned
H5RS_get_count(const H5RS_str_t *rs)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5RS_get_count)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(rs);
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 0e2acc8..d0c79a8 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -46,7 +46,7 @@
#include "H5Gprivate.h" /* Groups */
#include "H5Oprivate.h" /* Object headers */
#include "H5Rpkg.h" /* References */
-
+#include "H5Ppublic.h" /* for using H5P_DATASET_ACCESS_DEFAULT */
#ifndef H5_NO_DEPRECATED_SYMBOLS
/****************/
@@ -100,7 +100,7 @@ DESCRIPTION
static herr_t
H5R_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5R_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5R_init())
} /* H5R_init_deprec_interface() */
@@ -136,7 +136,7 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref)
H5O_type_t obj_type; /* Object type */
H5G_obj_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Rget_obj_type1, H5G_UNKNOWN)
+ FUNC_ENTER_API(H5G_UNKNOWN)
H5TRACE3("Go", "iRt*x", id, ref_type, ref);
/* Check args */
@@ -158,5 +158,57 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Rget_obj_type1() */
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5Rdereference1
+ PURPOSE
+ Opens the HDF5 object referenced.
+ USAGE
+ hid_t H5Rdereference1(ref)
+ hid_t id; IN: Dataset reference object is in or location ID of
+ object that the dataset is located within.
+ H5R_type_t ref_type; IN: Type of reference to create
+ void *ref; IN: Reference to open.
+
+ RETURNS
+ Valid ID on success, Negative on failure
+ DESCRIPTION
+ Given a reference to some object, open that object and return an ID for
+ that object.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+hid_t
+H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *_ref)
+{
+ H5G_loc_t loc; /* Group location */
+ H5F_t *file = NULL; /* File object */
+ hid_t ret_value;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("i", "iRt*x", obj_id, ref_type, _ref);
+
+ /* Check args */
+ if(H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
+ if(_ref == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
+
+ /* Get the file pointer from the entry */
+ file = loc.oloc->file;
+
+ /* Create reference */
+ if((ret_value = H5R_dereference(file, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable dereference object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Rdereference1() */
+
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 82382fb..8c66a90 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -57,6 +57,8 @@
H5_DLL herr_t H5R_init(void);
H5_DLL herr_t H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type,
const void *_ref, H5O_type_t *obj_type);
+H5_DLL hid_t H5R_dereference(H5F_t *file, hid_t dapl_id, hid_t dxpl_id, H5R_type_t ref_type,
+ const void *_ref, hbool_t app_ref);
#endif /* _H5Rpkg_H */
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index 04d319b..997309f 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -60,7 +60,7 @@ extern "C" {
/* Functions in H5R.c */
H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name,
H5R_type_t ref_type, hid_t space_id);
-H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref);
+H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref);
H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref);
H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref,
H5O_type_t *obj_type);
@@ -81,6 +81,7 @@ H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref,
/* Function prototypes */
H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref);
+H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5S.c b/src/H5S.c
index 21029ef..5d99066 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -75,7 +75,7 @@ H5S_init_interface(void)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
if(H5I_register_type(H5I_DATASPACE, (size_t)H5I_DATASPACEID_HASHSIZE, H5S_RESERVED_ATOMS, (H5I_free_t)H5S_close) < 0)
@@ -86,7 +86,7 @@ H5S_init_interface(void)
/* Allow MPI buf-and-file-type optimizations? */
const char *s = HDgetenv ("HDF5_MPI_OPT_TYPES");
if (s && HDisdigit(*s))
- H5S_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0);
+ H5S_mpi_opt_types_g = (hbool_t)HDstrtol (s, NULL, 0);
}
#endif /* H5_HAVE_PARALLEL */
@@ -117,7 +117,7 @@ H5S_term_interface(void)
{
int n = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
if((n = H5I_nmembers(H5I_DATASPACE))) {
@@ -161,7 +161,7 @@ H5S_create(H5S_class_t type)
H5S_t *new_ds = NULL; /* New dataspace created */
H5S_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Create a new dataspace */
if(NULL == (new_ds = H5FL_MALLOC(H5S_t)))
@@ -186,6 +186,7 @@ H5S_create(H5S_class_t type)
new_ds->extent.nelem = 0;
break;
+ case H5S_NO_CLASS:
default:
HDassert("unknown dataspace (extent) type" && 0);
break;
@@ -239,7 +240,7 @@ H5Screate(H5S_class_t type)
H5S_t *new_ds=NULL; /* New dataspace structure */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Screate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "Sc", type);
/* Check args */
@@ -282,7 +283,7 @@ H5S_extent_release(H5S_extent_t *extent)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_extent_release, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(extent);
@@ -316,7 +317,7 @@ H5S_close(H5S_t *ds)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(ds);
@@ -357,7 +358,7 @@ H5Sclose(hid_t space_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", space_id);
/* Check args */
@@ -396,7 +397,7 @@ H5Scopy(hid_t space_id)
H5S_t *dst = NULL;
hid_t ret_value;
- FUNC_ENTER_API(H5Scopy, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", space_id);
/* Check args */
@@ -442,7 +443,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id)
H5S_t *dst;
hid_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Sextent_copy, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", dst_id, src_id);
/* Check args */
@@ -480,7 +481,7 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_extent_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Copy the regular fields */
dst->type = src->type;
@@ -512,6 +513,7 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
dst->max = NULL;
break;
+ case H5S_NO_CLASS:
default:
HDassert("unknown dataspace type" && 0);
break;
@@ -553,7 +555,7 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
H5S_t *dst = NULL;
H5S_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_copy, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(NULL == (dst = H5FL_MALLOC(H5S_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -604,7 +606,7 @@ H5S_get_simple_extent_npoints(const H5S_t *ds)
{
hssize_t ret_value;
- FUNC_ENTER_NOAPI(H5S_get_simple_extent_npoints, -1)
+ FUNC_ENTER_NOAPI(-1)
/* check args */
HDassert(ds);
@@ -640,7 +642,7 @@ H5Sget_simple_extent_npoints(hid_t space_id)
H5S_t *ds;
hssize_t ret_value;
- FUNC_ENTER_API(H5Sget_simple_extent_npoints, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", space_id);
/* Check args */
@@ -681,7 +683,7 @@ H5S_get_npoints_max(const H5S_t *ds)
hsize_t ret_value;
unsigned u;
- FUNC_ENTER_NOAPI(H5S_get_npoints_max, 0)
+ FUNC_ENTER_NOAPI(0)
/* check args */
assert(ds);
@@ -712,6 +714,7 @@ H5S_get_npoints_max(const H5S_t *ds)
}
break;
+ case H5S_NO_CLASS:
default:
assert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)")
@@ -744,7 +747,7 @@ H5Sget_simple_extent_ndims(hid_t space_id)
H5S_t *ds;
int ret_value;
- FUNC_ENTER_API(H5Sget_simple_extent_ndims, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", space_id);
/* Check args */
@@ -784,7 +787,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_get_simple_extent_ndims, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(ds);
@@ -796,6 +799,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds)
ret_value = (int)ds->extent.rank;
break;
+ case H5S_NO_CLASS:
default:
HDassert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
@@ -835,7 +839,7 @@ H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[]/*out*/,
H5S_t *ds;
int ret_value;
- FUNC_ENTER_API(H5Sget_simple_extent_dims, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Is", "ixx", space_id, dims, maxdims);
/* Check args */
@@ -869,7 +873,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
int i; /* Local index variable */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_extent_get_dims, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(ext);
@@ -894,6 +898,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[])
} /* end for */
break;
+ case H5S_NO_CLASS:
default:
HDassert("unknown dataspace class" && 0);
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)")
@@ -926,7 +931,7 @@ H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[])
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_get_simple_extent_dims, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(ds);
@@ -958,7 +963,7 @@ H5S_write(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned update_flags, H5S_t *ds)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_write, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(oh);
@@ -999,7 +1004,7 @@ H5S_append(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5S_t *ds)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_append, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(f);
HDassert(oh);
@@ -1035,7 +1040,7 @@ H5S_read(const H5O_loc_t *loc, hid_t dxpl_id)
H5S_t *ds = NULL; /* Dataspace to return */
H5S_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_read, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(loc);
@@ -1082,7 +1087,7 @@ H5S_is_simple(const H5S_t *sdim)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_is_simple)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args and all the boring stuff. */
HDassert(sdim);
@@ -1115,7 +1120,7 @@ H5Sis_simple(hid_t space_id)
H5S_t *space; /* dataspace to modify */
htri_t ret_value;
- FUNC_ENTER_API(H5Sis_simple, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", space_id);
/* Check args and all the boring stuff. */
@@ -1172,7 +1177,7 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/],
int u; /* local counting variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sset_extent_simple, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iIs*[a1]h*[a1]h", space_id, rank, dims, max);
/* Check args */
@@ -1228,7 +1233,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_set_extent_simple)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rank <= H5S_MAX_RANK);
@@ -1321,7 +1326,7 @@ H5Screate_simple(int rank, const hsize_t dims[/*rank*/],
int i;
hid_t ret_value;
- FUNC_ENTER_API(H5Screate_simple, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "Is*[a0]h*[a0]h", rank, dims, maxdims);
/* Check arguments */
@@ -1387,7 +1392,7 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/],
{
H5S_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_create_simple, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Check arguments */
assert(rank <=H5S_MAX_RANK);
@@ -1427,7 +1432,7 @@ H5Sencode(hid_t obj_id, void *buf, size_t *nalloc)
H5S_t *dspace;
herr_t ret_value=SUCCEED;
- FUNC_ENTER_API (H5Sencode, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x*z", obj_id, buf, nalloc);
/* Check argument and retrieve object */
@@ -1467,7 +1472,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc)
H5F_t *f = NULL; /* Fake file structure*/
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5S_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate "fake" file structure */
if(NULL == (f = H5F_fake_alloc((uint8_t)0)))
@@ -1540,7 +1545,7 @@ H5Sdecode(const void *buf)
H5S_t *ds;
hid_t ret_value;
- FUNC_ENTER_API (H5Sdecode, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "*x", buf);
if(buf == NULL)
@@ -1584,7 +1589,7 @@ H5S_decode(const unsigned char *buf)
uint8_t sizeof_size; /* 'Size of sizes' for file */
H5S_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Decode the type of the information */
if(*buf++ != H5O_SDSPACE_ID)
@@ -1666,7 +1671,7 @@ H5S_get_simple_extent_type(const H5S_t *space)
{
H5S_class_t ret_value;
- FUNC_ENTER_NOAPI(H5S_get_simple_extent_type, H5S_NO_CLASS)
+ FUNC_ENTER_NOAPI(H5S_NO_CLASS)
assert(space);
@@ -1701,7 +1706,7 @@ H5Sget_simple_extent_type(hid_t sid)
H5S_t *space;
H5S_class_t ret_value;
- FUNC_ENTER_API(H5Sget_simple_extent_type, H5S_NO_CLASS)
+ FUNC_ENTER_API(H5S_NO_CLASS)
H5TRACE1("Sc", "i", sid);
/* Check arguments */
@@ -1735,7 +1740,7 @@ H5Sset_extent_none(hid_t space_id)
H5S_t *space; /* dataspace to modify */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sset_extent_none, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", space_id);
/* Check args */
@@ -1775,7 +1780,7 @@ H5Soffset_simple(hid_t space_id, const hssize_t *offset)
H5S_t *space; /* dataspace to modify */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Soffset_simple, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Hs", space_id, offset);
/* Check args */
@@ -1815,7 +1820,7 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
unsigned u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5S_set_extent, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
@@ -1827,7 +1832,7 @@ H5S_set_extent(H5S_t *space, const hsize_t *size)
/* Check for invalid dimension size modification */
if(space->extent.max && H5S_UNLIMITED != space->extent.max[u] &&
space->extent.max[u] < size[u])
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "dimension cannot exceed the existing maximal size")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "dimension cannot exceed the existing maximal size (new: %llu max: %llu)", (unsigned long long)size[u], (unsigned long long)space->extent.max[u])
/* Indicate that dimension size can be modified */
ret_value = TRUE;
@@ -1864,7 +1869,7 @@ H5S_has_extent(const H5S_t *ds)
{
hbool_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_has_extent)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(ds);
@@ -1897,7 +1902,7 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_set_extent_real, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
@@ -1944,7 +1949,7 @@ H5Sextent_equal(hid_t space1_id, hid_t space2_id)
const H5S_t *ds1, *ds2; /* Dataspaces to compare */
htri_t ret_value;
- FUNC_ENTER_API(H5Sextent_equal, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", space1_id, space2_id);
/* check args */
@@ -1980,7 +1985,7 @@ H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2)
unsigned u; /* Local index variable */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_extent_equal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(ds1);
@@ -2038,7 +2043,7 @@ done:
hsize_t
H5S_extent_nelem(const H5S_extent_t *ext)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_extent_nelem)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
HDassert(ext);
@@ -2063,9 +2068,7 @@ H5S_extent_nelem(const H5S_extent_t *ext)
herr_t
H5S_set_latest_version(H5S_t *ds)
{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_set_latest_version, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ds);
@@ -2073,8 +2076,7 @@ H5S_set_latest_version(H5S_t *ds)
/* Set encoding of extent to latest version */
ds->extent.version = H5O_SDSPACE_VERSION_LATEST;
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_set_latest_version() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -2099,7 +2101,7 @@ H5S_extend(H5S_t *space, const hsize_t *size)
unsigned u;
int ret_value = 0;
- FUNC_ENTER_NOAPI(H5S_extend, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space && H5S_SIMPLE == H5S_GET_EXTENT_TYPE(space));
diff --git a/src/H5SL.c b/src/H5SL.c
index c996392..b6c9f8e 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -82,32 +82,42 @@
/* Define a code template for comparing scalar keys for the "CMP" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_SCALAR_CMP(TYPE, PNODE, PKEY, HASHVAL) \
+#define H5SL_LOCATE_SCALAR_CMP(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
(*(TYPE *)((PNODE)->key) < *(TYPE *)PKEY)
/* Define a code template for comparing string keys for the "CMP" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_STRING_CMP(TYPE, PNODE, PKEY, HASHVAL) \
+#define H5SL_LOCATE_STRING_CMP(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
(((PNODE)->hashval == HASHVAL) ? \
(HDstrcmp((const char *)(PNODE)->key, (const char *)PKEY) < 0) : \
((PNODE)->hashval < HASHVAL))
/* Define a code template for comparing H5_obj_t keys for the "CMP" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_OBJ_CMP(TYPE, PNODE, PKEY, HASHVAL) \
- ((((TYPE *)((PNODE)->key))->fileno < ((TYPE *)PKEY)->fileno) ? TRUE : (((TYPE *)((PNODE)->key))->addr < ((TYPE *)PKEY)->addr))
+#define H5SL_LOCATE_OBJ_CMP(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
+ ((((TYPE *)((PNODE)->key))->fileno == ((TYPE *)PKEY)->fileno) \
+ ? (((TYPE *)((PNODE)->key))->addr < ((TYPE *)PKEY)->addr) \
+ : (((TYPE *)((PNODE)->key))->fileno < ((TYPE *)PKEY)->fileno))
+
+/* Define a code template for comparing generic keys for the "CMP" in the H5SL_LOCATE macro */
+#define H5SL_LOCATE_GENERIC_CMP(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
+ ((SLIST)->cmp((TYPE *)((PNODE)->key), (TYPE *)PKEY) < 0)
/* Define a code template for comparing scalar keys for the "EQ" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_SCALAR_EQ(TYPE, PNODE, PKEY, HASHVAL) \
+#define H5SL_LOCATE_SCALAR_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
(*(TYPE *)((PNODE)->key) == *(TYPE *)PKEY)
/* Define a code template for comparing string keys for the "EQ" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_STRING_EQ(TYPE, PNODE, PKEY, HASHVAL) \
+#define H5SL_LOCATE_STRING_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
(((PNODE)->hashval == HASHVAL) && (HDstrcmp((const char *)(PNODE)->key, (const char *)PKEY) == 0))
/* Define a code template for comparing H5_obj_t keys for the "EQ" in the H5SL_LOCATE macro */
-#define H5SL_LOCATE_OBJ_EQ(TYPE, PNODE, PKEY, HASHVAL) \
+#define H5SL_LOCATE_OBJ_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
((((TYPE *)((PNODE)->key))->fileno == ((TYPE *)PKEY)->fileno) && (((TYPE *)((PNODE)->key))->addr == ((TYPE *)PKEY)->addr))
+/* Define a code template for comparing generic keys for the "EQ" in the H5SL_LOCATE macro */
+#define H5SL_LOCATE_GENERIC_EQ(SLIST, TYPE, PNODE, PKEY, HASHVAL) \
+ ((SLIST)->cmp((TYPE *)((PNODE)->key), (TYPE *)PKEY) == 0)
+
/* Define a code template for initializing the hash value for scalar keys for the "HASHINIT" in the H5SL_LOCATE macro */
#define H5SL_LOCATE_SCALAR_HASHINIT(KEY, HASHVAL)
@@ -119,6 +129,9 @@
/* Define a code template for initializing the hash value for H5_obj_t keys for the "HASHINIT" in the H5SL_LOCATE macro */
#define H5SL_LOCATE_OBJ_HASHINIT(KEY, HASHVAL)
+/* Define a code template for initializing the hash value for generic keys for the "HASHINIT" in the H5SL_LOCATE macro */
+#define H5SL_LOCATE_GENERIC_HASHINIT(KEY, HASHVAL)
+
/* Macro used to find node for operation */
#define H5SL_LOCATE(OP, CMP, SLIST, X, TYPE, KEY, HASHVAL) \
@@ -130,15 +143,15 @@
for(_i = (int)SLIST->curr_level; _i >= 0; _i--) { \
_count = 0; \
while(_count < 3 && X->forward[_i] && \
- H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, X->forward[_i], KEY, HASHVAL) ) { \
+ H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X->forward[_i], KEY, HASHVAL) ) { \
X = X->forward[_i]; \
_count++; \
} /* end while */ \
} /* end for */ \
X = X->forward[0]; \
- if(X != NULL && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(TYPE, X, KEY, HASHVAL) ) { \
+ if(X != NULL && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, X, KEY, HASHVAL) ) { \
/* What to do when a node is found */ \
- H5_GLUE3(H5SL_LOCATE_,OP,_FOUND)(SLIST, X, _i) \
+ H5_GLUE3(H5SL_LOCATE_,OP,_FOUND)(SLIST, X, _i) \
} /* end if */ \
}
@@ -266,7 +279,7 @@
} /* end if */ \
\
/* Check if this node is the start of the next gap */ \
- if(!_drop && !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, X->forward[_i], KEY, HASHVAL)) \
+ if(!_drop && !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X->forward[_i], KEY, HASHVAL)) \
_drop = X; \
\
/* No need to check the last node in the gap if there are 3, as */ \
@@ -280,7 +293,7 @@
X = X->forward[_i]; \
} /* end for */ \
HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Promote the middle node if necessary */ \
if(_count == 3) { \
@@ -293,7 +306,7 @@
_next = _drop->forward[_i]; \
} /* end for */ \
\
- if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(TYPE, _next, KEY, HASHVAL)) \
+ if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, _next, KEY, HASHVAL)) \
HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't insert duplicate key") \
}
@@ -316,7 +329,7 @@
H5_GLUE3(H5SL_LOCATE_,CMP,_HASHINIT)(KEY, HASHVAL) \
\
/* Find the gap to drop in to at the highest level */ \
- while(X && (!X->key || H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, X, KEY, HASHVAL))) { \
+ while(X && (!X->key || H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X, KEY, HASHVAL))) { \
_llast = _last; \
_last = X; \
X = X->forward[_i]; \
@@ -347,7 +360,7 @@
break; \
} else { /* !_drop */ \
/* Check if this node is the start of the next gap */ \
- if (!H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, X->forward[_i], KEY, HASHVAL)) { \
+ if (!H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, X->forward[_i], KEY, HASHVAL)) { \
_drop = X; \
/* Again check if we can stop searching */ \
if(_count) { \
@@ -370,7 +383,7 @@
} /* end for */ \
HDassert(_count >= 1 && _count <= 3); \
HDassert(!_drop->forward[_i] || \
- !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(TYPE, _drop->forward[_i], KEY, HASHVAL)); \
+ !H5_GLUE3(H5SL_LOCATE_,CMP,_CMP)(SLIST, TYPE, _drop->forward[_i], KEY, HASHVAL)); \
\
/* Check if we need to adjust node heights */ \
if(_count == 1) { \
@@ -431,7 +444,7 @@
} /* end for */ \
\
/* Check if we've found the node */ \
- if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(TYPE, _next, KEY, HASHVAL)) { \
+ if(_next && H5_GLUE3(H5SL_LOCATE_,CMP,_EQ)(SLIST, TYPE, _next, KEY, HASHVAL)) { \
void *tmp = _next->item; \
X = _next; \
\
@@ -485,6 +498,7 @@ struct H5SL_node_t {
struct H5SL_t {
/* Static values for each list */
H5SL_type_t type; /* Type of skip list */
+ H5SL_cmp_t cmp; /* Comparison callback, if type is H5SL_TYPE_GENERIC */
/* Dynamic values for each list */
int curr_level; /* Current top level used in list */
@@ -531,7 +545,7 @@ static size_t H5SL_fac_nalloc_g;
static herr_t
H5SL_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Allocate space for array of factories */
H5SL_fac_g = (H5FL_fac_head_t **)H5MM_malloc(sizeof(H5FL_fac_head_t *));
@@ -572,7 +586,7 @@ H5SL_new_node(void *item, const void *key, uint32_t hashval)
{
H5SL_node_t *ret_value; /* New skip list node */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_new_node)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate the node */
if(NULL == (ret_value = (H5SL_node_t *)H5FL_MALLOC(H5SL_node_t)))
@@ -623,7 +637,7 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_insert_common);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -667,6 +681,10 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
H5SL_INSERT(OBJ, slist, prev, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_INSERT(GENERIC, slist, prev, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -699,7 +717,7 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
ret_value=x;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_insert_common() */
@@ -733,7 +751,7 @@ H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
H5SL_node_t *node, *next_node; /* Pointers to skip list nodes */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SL_release_common);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert(slist);
@@ -772,7 +790,7 @@ H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
slist->nobjs=0;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_release_common() */
@@ -804,7 +822,7 @@ H5SL_close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SL_close_common)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -834,7 +852,7 @@ done:
PURPOSE
Create a skip list
USAGE
- H5SL_t *H5SL_create(H5SL_type_t type)
+ H5SL_t *H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
RETURNS
Returns a pointer to a skip list on success, NULL on failure.
@@ -846,16 +864,16 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5SL_t *
-H5SL_create(H5SL_type_t type)
+H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
{
H5SL_t *new_slist = NULL; /* Pointer to new skip list object created */
H5SL_node_t *header; /* Pointer to skip list header node */
H5SL_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5SL_create,NULL);
+ FUNC_ENTER_NOAPI(NULL)
/* Check args */
- HDassert(type>=H5SL_TYPE_INT && type<=H5SL_TYPE_OBJ);
+ HDassert(type>=H5SL_TYPE_INT && type<=H5SL_TYPE_GENERIC);
/* Allocate skip list structure */
if(NULL == (new_slist = H5FL_MALLOC(H5SL_t)))
@@ -863,6 +881,8 @@ H5SL_create(H5SL_type_t type)
/* Set the static internal fields */
new_slist->type = type;
+ HDassert((type == H5SL_TYPE_GENERIC) == !!cmp);
+ new_slist->cmp = cmp;
/* Set the dynamic internal fields */
new_slist->curr_level = -1;
@@ -917,7 +937,7 @@ done:
size_t
H5SL_count(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_count);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -925,7 +945,7 @@ H5SL_count(H5SL_t *slist)
/* Check internal consistency */
/* (Pre-condition) */
- FUNC_LEAVE_NOAPI(slist->nobjs);
+ FUNC_LEAVE_NOAPI(slist->nobjs)
} /* end H5SL_count() */
@@ -955,7 +975,7 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_insert);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert(slist);
@@ -969,7 +989,7 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key)
HGOTO_ERROR(H5E_SLIST,H5E_CANTINSERT,FAIL,"can't create new skip list node")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_insert() */
@@ -1002,7 +1022,7 @@ H5SL_add(H5SL_t *slist, void *item, const void *key)
{
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_add);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert(slist);
@@ -1016,7 +1036,7 @@ H5SL_add(H5SL_t *slist, void *item, const void *key)
HGOTO_ERROR(H5E_SLIST,H5E_CANTINSERT,NULL,"can't create new skip list node")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_add() */
@@ -1046,7 +1066,7 @@ H5SL_remove(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_remove)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -1090,6 +1110,10 @@ H5SL_remove(H5SL_t *slist, const void *key)
H5SL_REMOVE(OBJ, slist, x, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_REMOVE(GENERIC, slist, x, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -1127,7 +1151,7 @@ H5SL_remove_first(H5SL_t *slist)
size_t level = slist->curr_level; /* Skip list level */
size_t i; /* Index */
- FUNC_ENTER_NOAPI_NOINIT(H5SL_remove_first)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -1225,7 +1249,7 @@ H5SL_search(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_search);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -1269,6 +1293,10 @@ H5SL_search(H5SL_t *slist, const void *key)
H5SL_SEARCH(OBJ, slist, x, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_SEARCH(GENERIC, slist, x, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -1277,7 +1305,7 @@ H5SL_search(H5SL_t *slist, const void *key)
ret_value=NULL;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_search() */
@@ -1310,7 +1338,7 @@ H5SL_less(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_less);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -1354,6 +1382,10 @@ H5SL_less(H5SL_t *slist, const void *key)
H5SL_SEARCH(OBJ, slist, x, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_SEARCH(GENERIC, slist, x, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -1375,7 +1407,7 @@ H5SL_less(H5SL_t *slist, const void *key)
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_less() */
@@ -1408,7 +1440,7 @@ H5SL_greater(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_greater);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(slist);
@@ -1452,6 +1484,10 @@ H5SL_greater(H5SL_t *slist, const void *key)
H5SL_SEARCH(OBJ, slist, x, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_SEARCH(GENERIC, slist, x, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -1464,7 +1500,7 @@ H5SL_greater(H5SL_t *slist, const void *key)
ret_value = NULL;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_greater() */
@@ -1496,7 +1532,7 @@ H5SL_find(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_find);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -1540,6 +1576,10 @@ H5SL_find(H5SL_t *slist, const void *key)
H5SL_FIND(OBJ, slist, x, const H5_obj_t, key, -)
break;
+ case H5SL_TYPE_GENERIC:
+ H5SL_FIND(GENERIC, slist, x, const void, key, -)
+ break;
+
default:
HDassert(0 && "Unknown skiplist type!");
} /* end switch */
@@ -1548,7 +1588,7 @@ H5SL_find(H5SL_t *slist, const void *key)
ret_value=NULL;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_find() */
@@ -1581,7 +1621,7 @@ H5SL_below(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_below)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(slist);
@@ -1624,6 +1664,10 @@ H5SL_below(H5SL_t *slist, const void *key)
case H5SL_TYPE_OBJ:
H5SL_FIND(OBJ, slist, x, const H5_obj_t, key, -)
break;
+
+ case H5SL_TYPE_GENERIC:
+ H5SL_FIND(GENERIC, slist, x, const void, key, -)
+ break;
} /* end switch */
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1676,7 +1720,7 @@ H5SL_above(H5SL_t *slist, const void *key)
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_above)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(slist);
@@ -1719,6 +1763,10 @@ H5SL_above(H5SL_t *slist, const void *key)
case H5SL_TYPE_OBJ:
H5SL_FIND(OBJ, slist, x, const H5_obj_t, key, -)
break;
+
+ case H5SL_TYPE_GENERIC:
+ H5SL_FIND(GENERIC, slist, x, const void, key, -)
+ break;
} /* end switch */
/* An exact match for 'key' must not have been found in list, if we get here */
@@ -1755,7 +1803,7 @@ done:
H5SL_node_t *
H5SL_first(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_first);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -1763,7 +1811,7 @@ H5SL_first(H5SL_t *slist)
/* Check internal consistency */
/* (Pre-condition) */
- FUNC_LEAVE_NOAPI(slist->header->forward[0]);
+ FUNC_LEAVE_NOAPI(slist->header->forward[0])
} /* end H5SL_first() */
@@ -1789,7 +1837,7 @@ H5SL_first(H5SL_t *slist)
H5SL_node_t *
H5SL_next(H5SL_node_t *slist_node)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_next);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist_node);
@@ -1797,7 +1845,7 @@ H5SL_next(H5SL_node_t *slist_node)
/* Check internal consistency */
/* (Pre-condition) */
- FUNC_LEAVE_NOAPI(slist_node->forward[0]);
+ FUNC_LEAVE_NOAPI(slist_node->forward[0])
} /* end H5SL_next() */
@@ -1823,7 +1871,7 @@ H5SL_next(H5SL_node_t *slist_node)
H5SL_node_t *
H5SL_prev(H5SL_node_t *slist_node)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_prev);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist_node);
@@ -1832,7 +1880,7 @@ H5SL_prev(H5SL_node_t *slist_node)
/* (Pre-condition) */
/* Walk backward, detecting the header node (which has it's key set to NULL) */
- FUNC_LEAVE_NOAPI(slist_node->backward->key==NULL ? NULL : slist_node->backward);
+ FUNC_LEAVE_NOAPI(slist_node->backward->key==NULL ? NULL : slist_node->backward)
} /* end H5SL_prev() */
@@ -1858,7 +1906,7 @@ H5SL_prev(H5SL_node_t *slist_node)
H5SL_node_t *
H5SL_last(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_last);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -1867,7 +1915,7 @@ H5SL_last(H5SL_t *slist)
/* (Pre-condition) */
/* Find last node, avoiding the header node */
- FUNC_LEAVE_NOAPI(slist->last==slist->header ? NULL : slist->last);
+ FUNC_LEAVE_NOAPI(slist->last==slist->header ? NULL : slist->last)
} /* end H5SL_last() */
@@ -1892,7 +1940,7 @@ H5SL_last(H5SL_t *slist)
void *
H5SL_item(H5SL_node_t *slist_node)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_item);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist_node);
@@ -1900,7 +1948,7 @@ H5SL_item(H5SL_node_t *slist_node)
/* Check internal consistency */
/* (Pre-condition) */
- FUNC_LEAVE_NOAPI(slist_node->item);
+ FUNC_LEAVE_NOAPI(slist_node->item)
} /* end H5SL_item() */
@@ -1943,7 +1991,7 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
H5SL_node_t *node; /* Pointers to skip list nodes */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_iterate)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(slist);
@@ -1989,7 +2037,7 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
herr_t
H5SL_release(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_release);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -2000,7 +2048,7 @@ H5SL_release(H5SL_t *slist)
/* Free skip list nodes */
H5SL_release_common(slist,NULL,NULL); /* always succeeds */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SL_release() */
@@ -2035,7 +2083,7 @@ H5SL_release(H5SL_t *slist)
herr_t
H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_free);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -2046,7 +2094,7 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
/* Free skip list nodes */
H5SL_release_common(slist,op,op_data); /* always succeeds */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SL_free() */
@@ -2081,7 +2129,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_destroy);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -2092,7 +2140,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
/* Close skip list */
(void)H5SL_close_common(slist,op,op_data); /* always succeeds */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_destroy() */
@@ -2118,7 +2166,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
herr_t
H5SL_close(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_close);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(slist);
@@ -2129,7 +2177,7 @@ H5SL_close(H5SL_t *slist)
/* Close skip list */
(void)H5SL_close_common(slist,NULL,NULL); /* always succeeds */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SL_close() */
@@ -2158,7 +2206,7 @@ int H5SL_term_interface(void)
herr_t ret;
int n = H5_interface_initialize_g ? 1 : 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SL_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(n) {
/* Terminate all the factories */
@@ -2176,6 +2224,6 @@ int H5SL_term_interface(void)
H5_interface_initialize_g = 0;
} /* end if */
- FUNC_LEAVE_NOAPI(n);
+ FUNC_LEAVE_NOAPI(n)
} /* H5SL_term_interface() */
diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h
index 40fbfa9..07ee414 100644
--- a/src/H5SLprivate.h
+++ b/src/H5SLprivate.h
@@ -47,13 +47,17 @@ typedef enum {
H5SL_TYPE_HSIZE, /* Skip list keys are 'hsize_t's */
H5SL_TYPE_UNSIGNED, /* Skip list keys are 'unsigned's */
H5SL_TYPE_SIZE, /* Skip list keys are 'size_t's */
- H5SL_TYPE_OBJ /* Skip list keys are 'H5_obj_t's */
+ H5SL_TYPE_OBJ, /* Skip list keys are 'H5_obj_t's */
+ H5SL_TYPE_GENERIC /* Skip list keys are unknown, comparison callback supplied */
} H5SL_type_t;
/**********/
/* Macros */
/**********/
+/* Typedef for comparison operations */
+typedef int (*H5SL_cmp_t)(const void *key1, const void *key2);
+
/* Typedef for iteration operations */
typedef herr_t (*H5SL_operator_t)(void *item, void *key,
void *operator_data/*in,out*/);
@@ -61,7 +65,7 @@ typedef herr_t (*H5SL_operator_t)(void *item, void *key,
/********************/
/* Private routines */
/********************/
-H5_DLL H5SL_t *H5SL_create(H5SL_type_t type);
+H5_DLL H5SL_t *H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp);
H5_DLL size_t H5SL_count(H5SL_t *slist);
H5_DLL herr_t H5SL_insert(H5SL_t *slist, void *item, const void *key);
H5_DLL H5SL_node_t *H5SL_add(H5SL_t *slist, void *item, const void *key);
diff --git a/src/H5SM.c b/src/H5SM.c
index a971fb0..8c00d34 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -17,7 +17,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
@@ -26,7 +25,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
#include "H5MMprivate.h" /* Memory management */
@@ -66,7 +65,7 @@ static herr_t H5SM_convert_list_to_btree(H5F_t * f, H5SM_index_header_t * header
static herr_t H5SM_convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header, hid_t dxpl_id);
static herr_t H5SM_incr_ref(void *record, void *_op_data, hbool_t *changed);
static herr_t H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- H5SM_index_header_t *header, unsigned type_id, void *mesg,
+ H5SM_index_header_t *header, hbool_t defer, unsigned type_id, void *mesg,
unsigned *cache_flags_ptr);
static herr_t H5SM_decr_ref(void *record, void *op_data, hbool_t *changed);
static herr_t H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
@@ -74,7 +73,7 @@ static herr_t H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
unsigned *cache_flags, void ** /*out*/ encoded_mesg);
static herr_t H5SM_type_to_flag(unsigned type_id, unsigned *type_flag);
static herr_t H5SM_read_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence,
- hbool_t *oh_modified, void *_udata);
+ unsigned *oh_modified, void *_udata);
static herr_t H5SM_read_mesg_fh_cb(const void *obj, size_t obj_len, void *_udata);
static herr_t H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap,
H5O_t * open_oh, hid_t dxpl_id, size_t *encoding_size /*out*/,
@@ -131,16 +130,16 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
unsigned x; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_init, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
/* File should not already have a SOHM table */
- HDassert(f->shared->sohm_addr == HADDR_UNDEF);
+ HDassert(!H5F_addr_defined(H5F_SOHM_ADDR(f)));
/* Initialize master table */
if(NULL == (table = H5FL_MALLOC(H5SM_master_table_t)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table")
- table->num_indexes = f->shared->sohm_nindexes;
+ table->num_indexes = H5F_SOHM_NINDEXES(f);
table->table_size = H5SM_TABLE_SIZE(f);
/* Get information from fcpl */
@@ -213,18 +212,18 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache")
/* Record the address of the master table in the file */
- f->shared->sohm_addr = table_addr;
+ H5F_SET_SOHM_ADDR(f, table_addr);
/* Check for sharing attributes in this file, which means that creation
* indices must be tracked on object header message in the file.
*/
if(type_flags_used & H5O_SHMESG_ATTR_FLAG)
- f->shared->store_msg_crt_idx = TRUE;
+ H5F_SET_STORE_MSG_CRT_IDX(f, TRUE);
/* Write shared message information to the superblock extension */
- sohm_table.addr = f->shared->sohm_addr;
- sohm_table.version = f->shared->sohm_vers;
- sohm_table.nindexes = f->shared->sohm_nindexes;
+ sohm_table.addr = H5F_SOHM_ADDR(f);
+ sohm_table.version = H5F_SOHM_VERS(f);
+ sohm_table.nindexes = H5F_SOHM_NINDEXES(f);
if(H5O_msg_create(ext_loc, H5O_SHMESG_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &sohm_table, dxpl_id) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to update SOHM header message")
@@ -257,7 +256,7 @@ H5SM_type_to_flag(unsigned type_id, unsigned *type_flag)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_type_to_flag)
+ FUNC_ENTER_NOAPI_NOINIT
/* Translate the H5O type_id into an H5SM type flag */
switch(type_id) {
@@ -305,7 +304,7 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
unsigned type_flag;
ssize_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_get_index)
+ FUNC_ENTER_NOAPI_NOINIT
/* Translate the H5O type_id into an H5SM type flag */
if(H5SM_type_to_flag(type_id, &type_flag) < 0)
@@ -346,20 +345,20 @@ H5SM_type_shared(H5F_t *f, unsigned type_id, hid_t dxpl_id)
size_t u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_type_shared, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Translate the H5O type_id into an H5SM type flag */
if(H5SM_type_to_flag(type_id, &type_flag) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't map message type to flag")
/* Look up the master SOHM table */
- if(H5F_addr_defined(f->shared->sohm_addr)) {
+ if(H5F_addr_defined(H5F_SOHM_ADDR(f))) {
H5SM_table_cache_ud_t cache_udata; /* User-data for callback */
/* Set up user data for callback */
cache_udata.f = f;
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
} /* end if */
else
@@ -375,7 +374,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id, hid_t dxpl_id)
done:
/* Release the master SOHM table */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
@@ -403,7 +402,7 @@ H5SM_get_fheap_addr(H5F_t *f, hid_t dxpl_id, unsigned type_id, haddr_t *fheap_ad
ssize_t index_num; /* Which index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_get_fheap_addr, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity checks */
HDassert(f);
@@ -413,7 +412,7 @@ H5SM_get_fheap_addr(H5F_t *f, hid_t dxpl_id, unsigned type_id, haddr_t *fheap_ad
cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Look up index for message type */
@@ -425,7 +424,7 @@ H5SM_get_fheap_addr(H5F_t *f, hid_t dxpl_id, unsigned type_id, haddr_t *fheap_ad
done:
/* Release the master SOHM table */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
@@ -452,7 +451,7 @@ H5SM_create_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_create_index)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(header);
@@ -478,8 +477,8 @@ H5SM_create_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
/* Create the v2 B-tree index */
bt2_cparam.cls = H5SM_INDEX;
- bt2_cparam.node_size = (size_t)H5SM_B2_NODE_SIZE;
- bt2_cparam.rrec_size = (size_t)H5SM_SOHM_ENTRY_SIZE(f);
+ bt2_cparam.node_size = (uint32_t)H5SM_B2_NODE_SIZE;
+ bt2_cparam.rrec_size = (uint32_t)H5SM_SOHM_ENTRY_SIZE(f);
bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT;
bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT;
if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f)))
@@ -557,7 +556,7 @@ H5SM_delete_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_delete_index)
+ FUNC_ENTER_NOAPI_NOINIT
/* Determine whether index is a list or a B-tree. */
if(header->index_type == H5SM_LIST) {
@@ -630,7 +629,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
haddr_t addr = HADDR_UNDEF; /* Address of the list on disk */
haddr_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_create_list, dxpl_id, H5AC__SOHM_TAG, HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, HADDR_UNDEF)
HDassert(f);
HDassert(header);
@@ -711,7 +710,7 @@ H5SM_convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header,
void * encoding_buf = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_convert_list_to_btree)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(_list && *_list);
HDassert(header);
@@ -721,8 +720,8 @@ H5SM_convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header,
/* Create the new v2 B-tree for tracking the messages */
bt2_cparam.cls = H5SM_INDEX;
- bt2_cparam.node_size = (size_t)H5SM_B2_NODE_SIZE;
- bt2_cparam.rrec_size = (size_t)H5SM_SOHM_ENTRY_SIZE(f);
+ bt2_cparam.node_size = (uint32_t)H5SM_B2_NODE_SIZE;
+ bt2_cparam.rrec_size = (uint32_t)H5SM_SOHM_ENTRY_SIZE(f);
bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT;
bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT;
if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f)))
@@ -813,7 +812,7 @@ H5SM_convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header, hid_t dxpl_i
haddr_t btree_addr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_convert_btree_to_list, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Remember the address of the old B-tree, but change the header over to be
* a list..
@@ -873,11 +872,11 @@ H5SM_can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
{
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_can_share_common)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check whether this message ought to be shared or not */
/* If sharing is disabled in this file, don't share the message */
- if(!H5F_addr_defined(f->shared->sohm_addr))
+ if(!H5F_addr_defined(H5F_SOHM_ADDR(f)))
HGOTO_DONE(FALSE)
/* Type-specific check */
@@ -922,7 +921,7 @@ H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table,
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI_TAG(H5SM_can_share, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
if((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
@@ -940,7 +939,7 @@ H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table,
/* Set up user data for callback */
cache_udata.f = f;
- if(NULL == (my_table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (my_table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
} /* end if */
@@ -964,7 +963,7 @@ H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table,
done:
/* Release the master SOHM table, if we protected it */
- if(my_table && my_table != table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, my_table, H5AC__NO_FLAGS_SET) < 0)
+ if(my_table && my_table != table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), my_table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
@@ -989,6 +988,12 @@ done:
* header it needs (which can cause an error if that OH is
* already protected!).
*
+ * DEFER_FLAGS indicates whether the sharing operation should
+ * actually occur, or whether this is just a set up call for a
+ * future sharing operation. In the latter case this argument
+ * should be H5SM_DEFER. If the message was previously deferred
+ * this argument should be H5SM_WAS_DEFERRED.
+ *
* MESG_FLAGS will have the H5O_MSG_FLAG_SHAREABLE or
* H5O_MSG_FLAG_SHARED flag set if one is appropriate. This is
* the only way to tell the difference between a message that
@@ -1026,17 +1031,33 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
- void *mesg, unsigned *mesg_flags)
+H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned defer_flags,
+ unsigned type_id, void *mesg, unsigned *mesg_flags)
{
H5SM_master_table_t *table = NULL;
H5SM_table_cache_ud_t cache_udata; /* User-data for callback */
unsigned cache_flags = H5AC__NO_FLAGS_SET;
ssize_t index_num;
htri_t tri_ret;
+#ifndef NDEBUG
+ unsigned deferred_type = -1u;
+#endif
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI_TAG(H5SM_try_share, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
+
+ /* If we previously deferred this operation, the saved message type should
+ * be the same as the one we get here. In debug mode, we make sure this
+ * holds true; otherwise we can leave now if it wasn't shared in the DEFER
+ * pass. */
+ if(defer_flags & H5SM_WAS_DEFERRED)
+#ifndef NDEBUG
+ deferred_type = ((H5O_shared_t *)mesg)->type;
+#else /* NDEBUG */
+ if((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE)
+ && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM))
+ HGOTO_DONE(FALSE);
+#endif /* NDEBUG */
/* "trivial" sharing checks */
if(mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE))
@@ -1050,7 +1071,7 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_WRITE)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* "complex" sharing checks */
@@ -1072,22 +1093,33 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
* message to become shared (if it is unique, it will not be shared).
*/
if(H5SM_write_mesg(f, dxpl_id, open_oh, &(table->indexes[index_num]),
- type_id, mesg, &cache_flags) < 0)
+ (defer_flags & H5SM_DEFER) != 0, type_id, mesg, &cache_flags) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "can't write shared message")
- /* Set flags if this message was "written" without error; it is now
- * either fully shared or "shareable".
+ /* Set flags if this message was "written" without error and wasn't a
+ * 'defer' attempt; it is now either fully shared or "shareable".
*/
- if(mesg_flags) {
+ if(mesg_flags && !(defer_flags & H5SM_DEFER)) {
if(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE)
*mesg_flags |= H5O_MSG_FLAG_SHAREABLE;
- else
+ else {
+ HDassert(((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
*mesg_flags |= H5O_MSG_FLAG_SHARED;
+ } /* end else */
} /* end if */
done:
+ HDassert(!ret_value || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_HERE
+ || ((H5O_shared_t *)mesg)->type == H5O_SHARE_TYPE_SOHM);
+#ifndef NDEBUG
+ /* If we previously deferred this operation, make sure the saved message
+ * type is the same as the one we get here. */
+ if(defer_flags & H5SM_WAS_DEFERRED)
+ HDassert(deferred_type == ((H5O_shared_t *)mesg)->type);
+#endif /* NDEBUG */
+
/* Release the master SOHM table */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
@@ -1118,7 +1150,7 @@ H5SM_incr_ref(void *record, void *_op_data, hbool_t *changed)
H5SM_incr_ref_opdata *op_data = (H5SM_incr_ref_opdata *) _op_data;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_incr_ref)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(record);
HDassert(op_data);
@@ -1158,19 +1190,28 @@ done:
/*-------------------------------------------------------------------------
* Function: H5SM_write_mesg
*
- * Purpose: Adds a shareable message to an index. If this is the first
- * such message and we have an object header location for this
- * message, we record it in the index but don't modify the
- * message passed in.
- *
- * If the message is already in the index or we don't have an
- * object header location for it, it is shared in the heap
- * and this function sets its sharing struct to reflect this.
+ * Purpose: This routine adds a shareable message to an index.
+ * The behavior is controlled by the DEFER parameter:
+ *
+ * If DEFER is TRUE, this routine Simulates adding a shareable
+ * message to an index. It determines what the outcome would
+ * be with DEFER set the FALSE and updates the shared message
+ * info, but does not actually add the message to a heap, list,
+ * or b-tree. Assumes that an open object header will be
+ * available when H5SM_write_mesg is called with DEFER set to
+ * FALSE.
+ *
+ * If DEFER is FALSE, this routine adds a shareable message to
+ * an index. If this is the first such message and we have an
+ * object header location for this message, we record it in the
+ * index but don't modify the message passed in. If the message
+ * is already in the index or we don't have an object header
+ * location for it, it is shared in the heap and this function
+ * sets its sharing struct to reflect this.
*
* The index could be a list or a B-tree.
*
- * Return: TRUE if message is now shared
- * FALSE if message is in index but is not shared
+ * Return: Non-negative on success
* Negative on failure
*
* Programmer: James Laird
@@ -1180,7 +1221,7 @@ done:
*/
static herr_t
H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- H5SM_index_header_t *header, unsigned type_id, void *mesg,
+ H5SM_index_header_t *header, hbool_t defer, unsigned type_id, void *mesg,
unsigned *cache_flags_ptr)
{
H5SM_list_t *list = NULL; /* List index */
@@ -1195,7 +1236,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
size_t empty_pos = UFAIL; /* Empty entry in list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_write_mesg, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(header);
@@ -1235,7 +1276,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
cache_udata.header = header;
/* The index is a list; get it from the cache */
- if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC_WRITE)))
+ if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, &cache_udata, defer ? H5AC_READ : H5AC_WRITE)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index")
/* See if the message is already in the index and get its location.
@@ -1243,55 +1284,75 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
* later.
*/
list_pos = H5SM_find_in_list(list, &key, &empty_pos);
- if(list_pos != UFAIL) {
- /* If the message was previously shared in an object header, share
- * it in the heap now.
- */
- if(list->messages[list_pos].location == H5SM_IN_OH) {
- /* Put the message in the heap and record its new heap ID */
- if(H5HF_insert(fheap, dxpl_id, key.encoding_size, key.encoding, &shared.u.heap_id) < 0)
- HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap")
-
- list->messages[list_pos].location = H5SM_IN_HEAP;
- list->messages[list_pos].u.heap_loc.fheap_id = shared.u.heap_id;
- list->messages[list_pos].u.heap_loc.ref_count = 2;
- } /* end if */
- else {
- /* If the message was already in the heap, increase its ref count */
- HDassert(list->messages[list_pos].location == H5SM_IN_HEAP);
- ++(list->messages[list_pos].u.heap_loc.ref_count);
- } /* end else */
-
- /* Set up the shared location to point to the shared location */
- shared.u.heap_id = list->messages[list_pos].u.heap_loc.fheap_id;
- found = TRUE;
+ if(defer) {
+ if(list_pos != UFAIL)
+ found = TRUE;
} /* end if */
+ else {
+ if(list_pos != UFAIL) {
+ /* If the message was previously shared in an object header, share
+ * it in the heap now.
+ */
+ if(list->messages[list_pos].location == H5SM_IN_OH) {
+ /* Put the message in the heap and record its new heap ID */
+ if(H5HF_insert(fheap, dxpl_id, key.encoding_size, key.encoding, &shared.u.heap_id) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap")
+
+ list->messages[list_pos].location = H5SM_IN_HEAP;
+ list->messages[list_pos].u.heap_loc.fheap_id = shared.u.heap_id;
+ list->messages[list_pos].u.heap_loc.ref_count = 2;
+ } /* end if */
+ else {
+ /* If the message was already in the heap, increase its ref count */
+ HDassert(list->messages[list_pos].location == H5SM_IN_HEAP);
+ ++(list->messages[list_pos].u.heap_loc.ref_count);
+ } /* end else */
+
+ /* Set up the shared location to point to the shared location */
+ shared.u.heap_id = list->messages[list_pos].u.heap_loc.fheap_id;
+ found = TRUE;
+ } /* end if */
+ } /* end else */
} /* end if */
/* Index is a B-tree */
else {
- H5SM_incr_ref_opdata op_data;
-
HDassert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
- /* Set up callback info */
- op_data.key = &key;
- op_data.dxpl_id = dxpl_id;
+ if(defer) {
+ htri_t bt2_find; /* Result from searching in the v2 B-tree */
- /* If this returns failure, it means that the message wasn't found. */
- /* If it succeeds, set the heap_id in the shared struct. It will
- * return a heap ID, since a message with a reference count greater
- * than 1 is always shared in the heap.
- */
- if(H5B2_modify(bt2, dxpl_id, &key, H5SM_incr_ref, &op_data) >= 0) {
- shared.u.heap_id = op_data.fheap_id;
- found = TRUE;
+ /* If this returns 0, it means that the message wasn't found. */
+ /* If it return 1, set the heap_id in the shared struct. It will
+ * return a heap ID, since a message with a reference count greater
+ * than 1 is always shared in the heap.
+ */
+ if((bt2_find = H5B2_find(bt2, dxpl_id, &key, NULL, NULL)) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index")
+ found = (hbool_t)bt2_find;
} /* end if */
- else
- H5E_clear_stack(NULL); /*ignore error*/
+ else {
+ H5SM_incr_ref_opdata op_data;
+
+ /* Set up callback info */
+ op_data.key = &key;
+ op_data.dxpl_id = dxpl_id;
+
+ /* If this returns failure, it means that the message wasn't found. */
+ /* If it succeeds, set the heap_id in the shared struct. It will
+ * return a heap ID, since a message with a reference count greater
+ * than 1 is always shared in the heap.
+ */
+ if(H5B2_modify(bt2, dxpl_id, &key, H5SM_incr_ref, &op_data) >= 0) {
+ shared.u.heap_id = op_data.fheap_id;
+ found = TRUE;
+ } /* end if */
+ else
+ H5E_clear_stack(NULL); /*ignore error*/
+ } /* end else */
} /* end else */
if(found)
@@ -1309,11 +1370,21 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'share in ohdr' check returned error")
/* If this message can be shared in an object header location, it is
- * "shareable" but not shared in the heap. Insert it in the index
- * but don't modify the original message.
+ * "shareable" but not shared in the heap.
+ *
+ * If 'defer' flag is set:
+ * We will insert it in the index but not modify the original
+ * message.
+ * If it can't be shared in an object header location, we will
+ * insert it in the heap. Note that we will only share
+ * the message in the object header if there is an
+ * "open_oh" available.
*
- * If it can't be shared in an object header location or there's no
- * object header location available, insert it in the heap.
+ * If 'defer' flag is not set:
+ * Insert it in the index but don't modify the original message.
+ * If it can't be shared in an object header location or there's
+ * no object header location available, insert it in the
+ * heap.
*/
if(share_in_ohdr && open_oh) {
/* Set up shared component info */
@@ -1322,62 +1393,71 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
/* Retrieve any creation index from the native message */
if(H5O_msg_get_crt_index(type_id, mesg, &shared.u.loc.index) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to retrieve creation index")
- shared.u.loc.oh_addr = H5O_OH_GET_ADDR(open_oh);
- /* Copy shared component info into key for inserting into index */
- key.message.location = H5SM_IN_OH;
- key.message.u.mesg_loc = shared.u.loc;
+ if(defer)
+ shared.u.loc.oh_addr = HADDR_UNDEF;
+ else {
+ shared.u.loc.oh_addr = H5O_OH_GET_ADDR(open_oh);
+
+ /* Copy shared component info into key for inserting into index */
+ key.message.location = H5SM_IN_OH;
+ key.message.u.mesg_loc = shared.u.loc;
+ } /* end else */
} /* end if */
else {
- /* Put the message in the heap and record its new heap ID */
- if(H5HF_insert(fheap, dxpl_id, key.encoding_size, key.encoding, &shared.u.heap_id) < 0)
- HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap")
-
/* Set up shared component info */
- /* (heap ID set above) */
+ /* (heap ID set below, if not deferred) */
shared.type = H5O_SHARE_TYPE_SOHM;
- key.message.location = H5SM_IN_HEAP;
- key.message.u.heap_loc.fheap_id = shared.u.heap_id;
- key.message.u.heap_loc.ref_count = 1;
- } /* end else */
-
- /* Set common information */
- key.message.msg_type_id = type_id;
+ if(!defer) {
+ /* Put the message in the heap and record its new heap ID */
+ if(H5HF_insert(fheap, dxpl_id, key.encoding_size, key.encoding, &shared.u.heap_id) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap")
- /* Check whether the list has grown enough that it needs to become a B-tree */
- if(header->index_type == H5SM_LIST && header->num_messages >= header->list_max)
- if(H5SM_convert_list_to_btree(f, header, &list, fheap, open_oh, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to convert list to B-tree")
-
- /* Insert the new message into the SOHM index */
- if(header->index_type == H5SM_LIST) {
- /* Index is a list. Find an empty spot if we haven't already */
- if(empty_pos == UFAIL)
- if((H5SM_find_in_list(list, NULL, &empty_pos) == UFAIL) || empty_pos == UFAIL)
- HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list")
-
- /* Insert message into list */
- HDassert(list->messages[empty_pos].location == H5SM_NO_LOC);
- HDassert(key.message.location != H5SM_NO_LOC);
- list->messages[empty_pos] = key.message;
- } /* end if */
- /* Index is a B-tree */
- else {
- HDassert(header->index_type == H5SM_BTREE);
+ key.message.location = H5SM_IN_HEAP;
+ key.message.u.heap_loc.fheap_id = shared.u.heap_id;
+ key.message.u.heap_loc.ref_count = 1;
+ } /* end if */
+ } /* end else */
- /* Open the index v2 B-tree, if it isn't already */
- if(NULL == bt2) {
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
- HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
+ if(!defer) {
+ /* Set common information */
+ key.message.msg_type_id = type_id;
+
+ /* Check whether the list has grown enough that it needs to become a B-tree */
+ if(header->index_type == H5SM_LIST && header->num_messages >= header->list_max)
+ if(H5SM_convert_list_to_btree(f, header, &list, fheap, open_oh, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to convert list to B-tree")
+
+ /* Insert the new message into the SOHM index */
+ if(header->index_type == H5SM_LIST) {
+ /* Index is a list. Find an empty spot if we haven't already */
+ if(empty_pos == UFAIL)
+ if((H5SM_find_in_list(list, NULL, &empty_pos) == UFAIL) || empty_pos == UFAIL)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list")
+
+ /* Insert message into list */
+ HDassert(list->messages[empty_pos].location == H5SM_NO_LOC);
+ HDassert(key.message.location != H5SM_NO_LOC);
+ list->messages[empty_pos] = key.message;
} /* end if */
+ /* Index is a B-tree */
+ else {
+ HDassert(header->index_type == H5SM_BTREE);
- if(H5B2_insert(bt2, dxpl_id, &key) < 0)
- HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree")
- } /* end else */
+ /* Open the index v2 B-tree, if it isn't already */
+ if(NULL == bt2) {
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
+ } /* end if */
+
+ if(H5B2_insert(bt2, dxpl_id, &key) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree")
+ } /* end else */
- ++(header->num_messages);
- (*cache_flags_ptr) |= H5AC__DIRTIED_FLAG;
+ ++(header->num_messages);
+ (*cache_flags_ptr) |= H5AC__DIRTIED_FLAG;
+ } /* end if */
} /* end else */
/* Set the file pointer & message type for the shared component */
@@ -1396,7 +1476,7 @@ done:
HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for SOHM index")
/* If we got a list out of the cache, release it (it is always dirty after writing a message) */
- if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DIRTIED_FLAG) < 0)
+ if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, list, defer ? H5AC__NO_FLAGS_SET : H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index")
if(encoding_buf)
@@ -1436,10 +1516,10 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg)
unsigned type_id; /* Message type ID to operate on */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_TAG(H5SM_delete, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
- HDassert(f->shared->sohm_addr != HADDR_UNDEF);
+ HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
HDassert(sh_mesg);
/* Get message type */
@@ -1449,7 +1529,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg)
cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_WRITE)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and try to delete from it */
@@ -1464,7 +1544,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete mesage from SOHM index")
/* Release the master SOHM table */
- if(H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
+ if(H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
table = NULL;
@@ -1482,7 +1562,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg)
done:
/* Release the master SOHM table (should only happen on error) */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
/* Release any native message we decoded */
@@ -1524,7 +1604,7 @@ H5SM_find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *e
size_t x;
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_find_in_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(list);
/* Both key and empty_pos can be NULL, but not both! */
@@ -1538,7 +1618,7 @@ H5SM_find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t *e
* Also record the first empty position we find.
*/
for(x = 0; x < list->header->list_max; x++) {
- if(key && (list->messages[x].location != H5SM_NO_LOC) &&
+ if((list->messages[x].location != H5SM_NO_LOC) &&
(0 == H5SM_message_compare(key, &(list->messages[x]))))
HGOTO_DONE(x)
else if(empty_pos && list->messages[x].location == H5SM_NO_LOC) {
@@ -1577,7 +1657,7 @@ H5SM_get_hash_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5SM_fh_ud_gh_t *udata = (H5SM_fh_ud_gh_t *)_udata; /* User data for fractal heap 'op' callback */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_get_hash_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Compute hash value on raw message */
udata->hash = H5_checksum_lookup3(obj, obj_len, udata->type_id);
@@ -1610,7 +1690,7 @@ H5SM_decr_ref(void *record, void *op_data, hbool_t *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *) record;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_decr_ref)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(record);
HDassert(op_data);
@@ -1665,7 +1745,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
unsigned type_id; /* Message type to operate on */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_delete_from_index, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
@@ -1846,17 +1926,17 @@ herr_t
H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
{
H5F_t *f = ext_loc->file; /* File pointer (convenience variable) */
- H5F_file_t *shared = f->shared; /* Shared file info (convenience variable) */
H5O_shmesg_table_t sohm_table; /* SOHM message from superblock extension */
H5SM_master_table_t *table = NULL; /* SOHM master table */
+ unsigned tmp_sohm_nindexes; /* Number of shared messages indexes in the table */
htri_t status; /* Status for message existing */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_get_info, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(ext_loc);
- HDassert(f && shared);
+ HDassert(f);
HDassert(fc_plist);
/* Check for the extension having a 'shared message info' message */
@@ -1879,28 +1959,28 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
HDmemset(minsizes, 0, sizeof(minsizes));
/* Set SOHM info from file */
- shared->sohm_addr = sohm_table.addr;
- shared->sohm_vers = sohm_table.version;
- shared->sohm_nindexes = sohm_table.nindexes;
- HDassert(H5F_addr_defined(shared->sohm_addr));
- HDassert(shared->sohm_nindexes > 0 && shared->sohm_nindexes <= H5O_SHMESG_MAX_NINDEXES);
+ H5F_SET_SOHM_ADDR(f, sohm_table.addr);
+ H5F_SET_SOHM_VERS(f, sohm_table.version);
+ H5F_SET_SOHM_NINDEXES(f, sohm_table.nindexes);
+ HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
+ HDassert(H5F_SOHM_NINDEXES(f) > 0 && H5F_SOHM_NINDEXES(f) <= H5O_SHMESG_MAX_NINDEXES);
/* Set up user data for callback */
cache_udata.f = f;
/* Read the rest of the SOHM table information from the cache */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Get index conversion limits */
- sohm_l2b = table->indexes[0].list_max;
- sohm_b2l = table->indexes[0].btree_min;
+ sohm_l2b = (unsigned)table->indexes[0].list_max;
+ sohm_b2l = (unsigned)table->indexes[0].btree_min;
/* Iterate through all indices */
for(u = 0; u < table->num_indexes; ++u) {
/* Pack information about the individual SOHM index */
index_flags[u] = table->indexes[u].mesg_types;
- minsizes[u] = table->indexes[u].min_mesg_size;
+ minsizes[u] = (unsigned)table->indexes[u].min_mesg_size;
/* Sanity check */
HDassert(sohm_l2b == table->indexes[u].list_max);
@@ -1910,11 +1990,12 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
* indices must be tracked on object header message in the file.
*/
if(index_flags[u] & H5O_SHMESG_ATTR_FLAG)
- shared->store_msg_crt_idx = TRUE;
+ H5F_SET_STORE_MSG_CRT_IDX(f, TRUE);
} /* end for */
/* Set values in the property list */
- if(H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &shared->sohm_nindexes) < 0)
+ tmp_sohm_nindexes = H5F_SOHM_NINDEXES(f);
+ if(H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &tmp_sohm_nindexes) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes")
if(H5P_set(fc_plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, index_flags) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set type flags for indexes")
@@ -1927,18 +2008,19 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
} /* end if */
else {
/* No SOHM info in file */
- shared->sohm_addr = HADDR_UNDEF;
- shared->sohm_nindexes = 0;
- shared->sohm_vers = 0;
+ H5F_SET_SOHM_ADDR(f, HADDR_UNDEF);
+ H5F_SET_SOHM_VERS(f, 0);
+ H5F_SET_SOHM_NINDEXES(f, 0);
/* Shared object header messages are disabled */
- if(H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &shared->sohm_nindexes) < 0)
+ tmp_sohm_nindexes = H5F_SOHM_NINDEXES(f);
+ if(H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &tmp_sohm_nindexes) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes")
} /* end else */
done:
/* Release the master SOHM table if we took it out of the cache */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
@@ -1962,7 +2044,7 @@ herr_t
H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id,
H5O_fheap_id_t heap_id)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_reconstitute)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check args */
HDassert(sh_mesg);
@@ -1995,7 +2077,7 @@ H5SM_get_refcount_bt2_cb(const void *_record, void *_op_data)
const H5SM_sohm_t *record = (const H5SM_sohm_t *)_record; /* v2 B-tree record for message */
H5SM_sohm_t *op_data = (H5SM_sohm_t *)_op_data; /* "op data" from v2 B-tree find */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_get_refcount_bt2_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
@@ -2039,7 +2121,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id,
void * encoding_buf = NULL; /* Buffer for encoded message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_get_refcount, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
@@ -2050,7 +2132,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id,
tbl_cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &tbl_cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &tbl_cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and find the message in it */
@@ -2124,7 +2206,7 @@ done:
/* Release resources */
if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, list, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index")
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
if(fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
@@ -2157,12 +2239,12 @@ done:
*/
static herr_t
H5SM_read_iter_op(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5SM_read_udata_t *udata = (H5SM_read_udata_t *) _udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_read_iter_op)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -2219,7 +2301,7 @@ H5SM_read_mesg_fh_cb(const void *obj, size_t obj_len, void *_udata)
H5SM_read_udata_t *udata = (H5SM_read_udata_t *)_udata;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_read_mesg_fh_cb)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate a buffer to hold the message */
if(NULL == (udata->encoding_buf = H5MM_malloc(obj_len)))
@@ -2257,7 +2339,7 @@ H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap,
H5O_t *oh = NULL; /* Object header for message in object header */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_read_mesg, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(mesg);
@@ -2350,7 +2432,7 @@ done:
herr_t
H5SM_table_free(H5SM_master_table_t *table)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_table_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(table);
@@ -2379,7 +2461,7 @@ H5SM_table_free(H5SM_master_table_t *table)
herr_t
H5SM_list_free(H5SM_list_t *list)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_list_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(list);
HDassert(list->messages);
@@ -2417,7 +2499,7 @@ H5SM_table_debug(H5F_t *f, hid_t dxpl_id, haddr_t table_addr,
unsigned x; /* Counter variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_table_debug, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(table_addr != HADDR_UNDEF);
@@ -2429,12 +2511,12 @@ H5SM_table_debug(H5F_t *f, hid_t dxpl_id, haddr_t table_addr,
* userblock
*/
if(table_vers == UFAIL)
- table_vers = f->shared->sohm_vers;
- else if(table_vers != f->shared->sohm_vers)
+ table_vers = H5F_SOHM_VERS(f);
+ else if(table_vers != H5F_SOHM_VERS(f))
HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n");
if(num_indexes == UFAIL)
- num_indexes = f->shared->sohm_nindexes;
- else if(num_indexes != f->shared->sohm_nindexes)
+ num_indexes = H5F_SOHM_NINDEXES(f);
+ else if(num_indexes != H5F_SOHM_NINDEXES(f))
HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n");
/* Check arguments. Version must be 0, the only version implemented so far */
@@ -2508,7 +2590,7 @@ H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
unsigned x; /* Counter variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_list_debug, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(list_addr != HADDR_UNDEF);
@@ -2598,11 +2680,11 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5SM_ih_size, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
- HDassert(H5F_addr_defined(f->shared->sohm_addr));
+ HDassert(H5F_addr_defined(H5F_SOHM_ADDR(f)));
HDassert(hdr_size);
HDassert(ih_info);
@@ -2610,7 +2692,7 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info)
cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Get SOHM header size */
@@ -2662,7 +2744,7 @@ done:
HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
if(bt2 && H5B2_close(bt2, dxpl_id) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for SOHM index")
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 156a6c5..daa1e4f 100755
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -102,7 +102,7 @@ H5SM_bt2_crt_context(void *_f)
H5SM_bt2_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_bt2_crt_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -140,7 +140,7 @@ H5SM_bt2_dst_context(void *_ctx)
{
H5SM_bt2_ctx_t *ctx = (H5SM_bt2_ctx_t *)_ctx; /* Callback context structure */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_bt2_dst_context)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -172,7 +172,7 @@ H5SM_bt2_store(void *native, const void *udata)
{
const H5SM_mesg_key_t *key = (const H5SM_mesg_key_t *)udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_bt2_store)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Copy the source message to the B-tree */
*(H5SM_sohm_t *)native = key->message;
@@ -200,7 +200,7 @@ H5SM_bt2_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
{
const H5SM_sohm_t *sohm = (const H5SM_sohm_t *)record;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_bt2_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(sohm->location == H5SM_IN_HEAP)
HDfprintf(stream, "%*s%-*s {%a, %lo, %Hx}\n", indent, "", fwidth,
@@ -236,7 +236,7 @@ H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr)
H5SM_bt2_ctx_t *ctx; /* Callback context structure */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_bt2_crt_dbg_context)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(f);
@@ -279,7 +279,7 @@ H5SM_bt2_convert_to_list_op(const void * record, void *op_data)
const H5SM_list_t *list = (const H5SM_list_t *)op_data;
size_t mesg_idx; /* Index of message to modify */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_bt2_convert_to_list_op)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
HDassert(record);
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 1511fd0..9955f39 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -17,7 +17,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
@@ -25,7 +24,7 @@
/* Headers */
/***********/
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
#include "H5MMprivate.h" /* Memory management */
@@ -128,21 +127,21 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *udata)
size_t x; /* Counter variable for index headers */
H5SM_master_table_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_table_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Verify that we're reading version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(f->shared->sohm_vers == HDF5_SHAREDHEADER_VERSION);
+ HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Allocate space for the master table in memory */
if(NULL == (table = H5FL_CALLOC(H5SM_master_table_t)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
/* Read number of indexes and version from file superblock */
- table->num_indexes = f->shared->sohm_nindexes;
+ table->num_indexes = H5F_SOHM_NINDEXES(f);
- HDassert(addr == f->shared->sohm_addr);
+ HDassert(addr == H5F_SOHM_ADDR(f));
HDassert(addr != HADDR_UNDEF);
HDassert(table->num_indexes > 0);
@@ -257,7 +256,7 @@ H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_ma
uint8_t tbl_buf[H5SM_TBL_BUF_SIZE]; /* Buffer for table */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_table_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -273,7 +272,7 @@ H5SM_table_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_ma
/* Verify that we're writing version 0 of the table; this is the only
* version defined so far.
*/
- HDassert(f->shared->sohm_vers == HDF5_SHAREDHEADER_VERSION);
+ HDassert(H5F_SOHM_VERS(f) == HDF5_SHAREDHEADER_VERSION);
/* Wrap the local buffer for serialized header info */
if(NULL == (wb = H5WB_wrap(tbl_buf, sizeof(tbl_buf))))
@@ -362,7 +361,7 @@ H5SM_table_dest(H5F_t UNUSED *f, H5SM_master_table_t* table)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_table_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(table);
@@ -394,7 +393,7 @@ H5SM_table_clear(H5F_t *f, H5SM_master_table_t *table, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_table_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -428,7 +427,7 @@ done:
static herr_t
H5SM_table_size(const H5F_t UNUSED *f, const H5SM_master_table_t *table, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_table_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(f);
@@ -469,7 +468,7 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
size_t x; /* Counter variable for messages in list */
H5SM_list_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_list_load)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(udata->header);
@@ -566,7 +565,7 @@ H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis
uint8_t lst_buf[H5SM_LST_BUF_SIZE]; /* Buffer for list index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_list_flush)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
HDassert(f);
@@ -615,7 +614,7 @@ H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis
computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);
UINT32ENCODE(p, computed_chksum);
#ifdef H5_CLEAR_MEMORY
-HDmemset(p, 0, (list->header->list_size - (p - buf)));
+HDmemset(p, 0, (list->header->list_size - (size_t)(p - buf)));
#endif /* H5_CLEAR_MEMORY */
/* Write the list to disk */
@@ -656,7 +655,7 @@ H5SM_list_dest(H5F_t *f, H5SM_list_t* list)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_list_dest)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(list);
@@ -700,7 +699,7 @@ H5SM_list_clear(H5F_t *f, H5SM_list_t *list, hbool_t destroy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_list_clear)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -734,7 +733,7 @@ done:
static herr_t
H5SM_list_size(const H5F_t UNUSED *f, const H5SM_list_t *list, size_t *size_ptr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_list_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check arguments */
HDassert(f);
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index 0d41a09..a9a58a4 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -52,7 +52,7 @@ typedef struct H5SM_compare_udata_t {
/********************/
static herr_t H5SM_compare_cb(const void *obj, size_t obj_len, void *udata);
static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence,
- hbool_t *oh_modified, void *udata);
+ unsigned *oh_modified, void *udata);
/*********************/
@@ -92,7 +92,7 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_compare_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* If the encoding sizes are different, it's not the same object */
if(udata->key->encoding_size > obj_len)
@@ -125,12 +125,12 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
*/
static herr_t
H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
- hbool_t UNUSED *oh_modified, void *_udata/*in,out*/)
+ unsigned UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *) _udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_compare_iter_op)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
@@ -192,7 +192,7 @@ H5SM_message_compare(const void *rec1, const void *rec2)
const H5SM_sohm_t *mesg = (const H5SM_sohm_t *) rec2;
herr_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_message_compare)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* If the key has an fheap ID, we're looking for a message that's
* already in the index; if the fheap ID matches, we've found the message
@@ -291,7 +291,7 @@ H5SM_message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
H5SM_bt2_ctx_t *ctx = (H5SM_bt2_ctx_t *)_ctx; /* Callback context structure */
const H5SM_sohm_t *message = (const H5SM_sohm_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_message_encode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(ctx);
@@ -335,7 +335,7 @@ H5SM_message_decode(const uint8_t *raw, void *_nrecord, void *_ctx)
H5SM_bt2_ctx_t *ctx = (H5SM_bt2_ctx_t *)_ctx; /* Callback context structure */
H5SM_sohm_t *message = (H5SM_sohm_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_message_decode)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
message->location = (H5SM_storage_loc_t)*raw++;
UINT32DECODE(raw, message->hash);
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index 84c2bf4..68dc484 100755
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -83,7 +83,7 @@
H5SM_METADATA_PREFIX_SIZE \
\
/* Indices */ \
- + ((f)->shared->sohm_nindexes * H5SM_INDEX_HEADER_SIZE(f)) \
+ + (H5F_SOHM_NINDEXES(f) * H5SM_INDEX_HEADER_SIZE(f)) \
)
#define H5SM_LIST_SIZE(f, num_mesg) ( \
diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h
index 46a43ad..d072434 100755
--- a/src/H5SMprivate.h
+++ b/src/H5SMprivate.h
@@ -26,6 +26,16 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Pprivate.h" /* Property lists */
+/**************************/
+/* Library Private Macros */
+/**************************/
+
+/* Flags for the "defer_flags" argument to H5SM_try_share
+ */
+#define H5SM_DEFER 0x01u /* Don't actually write shared message to index, heap; just update shared info */
+#define H5SM_WAS_DEFERRED 0x02u /* Message was previously updated by a call to H5SM_try_share with H5SM_DEFER */
+
+
/****************************/
/* Library Private Typedefs */
/****************************/
@@ -44,7 +54,7 @@ H5_DLL herr_t H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist,
H5_DLL htri_t H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table,
ssize_t *sohm_index_num, unsigned type_id, const void *mesg);
H5_DLL htri_t H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
- unsigned type_id, void *mesg, unsigned *mesg_flags);
+ unsigned defer_flags, unsigned type_id, void *mesg, unsigned *mesg_flags);
H5_DLL herr_t H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
H5O_shared_t *sh_mesg);
H5_DLL herr_t H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist,
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 5f4a89b..12ed766 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -17,7 +17,6 @@
/* Module Setup */
/****************/
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
#define H5SM_TESTING /*suppress warning about H5SM testing funcs*/
@@ -28,7 +27,8 @@
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* File access */
+#include "H5Fprivate.h" /* File access */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5SMpkg.h" /* Shared object header messages */
@@ -82,14 +82,14 @@ H5SM_get_mesg_count_test(H5F_t *f, hid_t dxpl_id, unsigned type_id,
H5SM_master_table_t *table = NULL; /* SOHM master table */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_get_mesg_count_test, dxpl_id, H5AC__SOHM_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
HDassert(mesg_count);
/* Check for shared messages being enabled */
- if(H5F_addr_defined(f->shared->sohm_addr)) {
+ if(H5F_addr_defined(H5F_SOHM_ADDR(f))) {
H5SM_index_header_t *header; /* Index header for message type */
H5SM_table_cache_ud_t cache_udata; /* User-data for callback */
ssize_t index_num; /* Table index for message type */
@@ -98,7 +98,7 @@ H5SM_get_mesg_count_test(H5F_t *f, hid_t dxpl_id, unsigned type_id,
cache_udata.f = f;
/* Look up the master SOHM table */
- if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, &cache_udata, H5AC_READ)))
+ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index for this message type */
@@ -115,7 +115,7 @@ H5SM_get_mesg_count_test(H5F_t *f, hid_t dxpl_id, unsigned type_id,
done:
/* Release resources */
- if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
diff --git a/src/H5ST.c b/src/H5ST.c
index 77e4bb4..7b61aa1 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -52,7 +52,7 @@ H5ST_create(void)
{
H5ST_tree_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate wrapper for TST */
if(NULL == (ret_value = H5FL_MALLOC(H5ST_tree_t)))
@@ -87,7 +87,7 @@ done:
static herr_t
H5ST_close_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_close_internal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Recursively free TST */
if(p) {
@@ -125,7 +125,7 @@ H5ST_close(H5ST_tree_t *tree)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments */
if(NULL == tree)
@@ -172,7 +172,7 @@ H5ST_insert(H5ST_tree_t *tree, const char *s, void *obj)
H5ST_ptr_t up=NULL; /* Pointer to up node */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_insert,FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Find the correct location to insert object */
p = &tree->root;
@@ -247,7 +247,7 @@ H5ST_search(H5ST_tree_t *tree, const char *s)
H5ST_ptr_t p; /* Temporary pointer to TST node */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5ST_search)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
p = tree->root;
while (p) {
@@ -291,7 +291,7 @@ H5ST_find_internal(H5ST_ptr_t p, const char *s)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_find_internal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
while (p) {
if (*s < p->splitchar)
@@ -334,7 +334,7 @@ H5ST_find(H5ST_tree_t *tree, const char *s)
{
H5ST_ptr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_find, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(NULL == (ret_value = H5ST_find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
@@ -369,7 +369,7 @@ H5ST_locate(H5ST_tree_t *tree, const char *s)
H5ST_ptr_t node; /* Pointer to node located */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_locate, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
if(NULL == (node = H5ST_find_internal(tree->root, s)))
@@ -406,7 +406,7 @@ H5ST_findfirst_internal(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_findfirst_internal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
while(p) {
/* Find least node in current tree */
@@ -452,7 +452,7 @@ H5ST_findfirst(H5ST_tree_t *tree)
{
H5ST_ptr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_findfirst, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(NULL == (ret_value = H5ST_findfirst_internal(tree->root)))
HGOTO_ERROR(H5E_TST,H5E_NOTFOUND,NULL,"no nodes in TST");
@@ -485,7 +485,7 @@ H5ST_getnext(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_getnext)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* If the node to continue from has higher-valued nodes attached */
if(p->hikid) {
@@ -544,7 +544,7 @@ H5ST_findnext(H5ST_ptr_t p)
H5ST_ptr_t q; /* Temporary pointer to TST node */
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5ST_findnext)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Find the next node at the current level, or go back up the tree */
do {
@@ -587,7 +587,7 @@ H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
H5ST_ptr_t q, /* Temporary pointer to TST node */
newp; /* Pointer to node which will replace deleted node in tree */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_delete_internal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Find node to replace one being deleted */
if(p->lokid) {
@@ -663,7 +663,7 @@ H5ST_delete(H5ST_tree_t *tree, H5ST_ptr_t p)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5ST_delete_internal(&tree->root, p) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTDELETE, FAIL, "can't delete node from TST")
@@ -698,7 +698,7 @@ H5ST_remove(H5ST_tree_t *tree, const char *s)
H5ST_ptr_t node; /* Pointer to node to remove */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_remove, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
if(NULL == (node = H5ST_find_internal(tree->root, s)))
@@ -738,7 +738,7 @@ done:
herr_t
H5ST_dump_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_dump_internal)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(p) {
printf("p=%p\n", p);
@@ -782,7 +782,7 @@ H5ST_dump_internal(H5ST_ptr_t p)
herr_t
H5ST_dump(H5ST_tree_t *tree)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5ST_dump, NULL)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Dump the tree */
H5ST_dump_internal(tree->root);
diff --git a/src/H5Sall.c b/src/H5Sall.c
index c98781a..c99d699 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -115,7 +115,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
herr_t
H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_iter_init);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (space && H5S_SEL_ALL==H5S_GET_SELECT_TYPE(space));
@@ -131,7 +131,7 @@ H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_all;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_init() */
@@ -155,7 +155,7 @@ H5S_all_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_all_iter_coords);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert (iter);
@@ -166,7 +166,7 @@ H5S_all_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve coordinates");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_all_iter_coords() */
@@ -190,7 +190,7 @@ H5S_all_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_block);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
@@ -207,7 +207,7 @@ H5S_all_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
end[u]=iter->dims[u]-1;
} /* end for */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_coords() */
@@ -228,12 +228,12 @@ H5S_all_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S_all_iter_nelmts (const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_nelmts);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
- FUNC_LEAVE_NOAPI(iter->elmt_left);
+ FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* H5S_all_iter_nelmts() */
@@ -257,12 +257,12 @@ H5S_all_iter_nelmts (const H5S_sel_iter_t *iter)
static htri_t
H5S_all_iter_has_next_block (const H5S_sel_iter_t UNUSED *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_has_next_block);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
- FUNC_LEAVE_NOAPI(FALSE);
+ FUNC_LEAVE_NOAPI(FALSE)
} /* H5S_all_iter_has_next_block() */
@@ -287,7 +287,7 @@ H5S_all_iter_has_next_block (const H5S_sel_iter_t UNUSED *iter)
static herr_t
H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_next);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
@@ -297,7 +297,7 @@ H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
iter->u.all.elmt_offset+=nelem;
iter->u.all.byte_offset+=(nelem*iter->elmt_size);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_next() */
@@ -321,12 +321,12 @@ H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
static herr_t
H5S_all_iter_next_block(H5S_sel_iter_t UNUSED *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_next_block);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
- FUNC_LEAVE_NOAPI(FAIL);
+ FUNC_LEAVE_NOAPI(FAIL)
} /* H5S_all_iter_next_block() */
@@ -350,12 +350,12 @@ H5S_all_iter_next_block(H5S_sel_iter_t UNUSED *iter)
static herr_t
H5S_all_iter_release (H5S_sel_iter_t UNUSED * iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_iter_release);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert (iter);
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_release() */
@@ -379,7 +379,7 @@ H5S_all_iter_release (H5S_sel_iter_t UNUSED * iter)
static herr_t
H5S_all_release(H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -413,7 +413,7 @@ H5S_all_release(H5S_t *space)
static herr_t
H5S_all_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(src);
HDassert(dst);
@@ -448,11 +448,11 @@ H5S_all_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection
htri_t
H5S_all_is_valid (const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_valid);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
- FUNC_LEAVE_NOAPI(TRUE);
+ FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S_all_is_valid() */
@@ -478,7 +478,7 @@ H5S_all_is_valid (const H5S_t UNUSED *space)
hssize_t
H5S_all_serial_size (const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_serial_size);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
@@ -486,7 +486,7 @@ H5S_all_serial_size (const H5S_t UNUSED *space)
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> = 16 bytes
*/
- FUNC_LEAVE_NOAPI(16);
+ FUNC_LEAVE_NOAPI(16)
} /* end H5S_all_serial_size() */
@@ -512,7 +512,7 @@ H5S_all_serial_size (const H5S_t UNUSED *space)
herr_t
H5S_all_serialize (const H5S_t *space, uint8_t *buf)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_serialize);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
@@ -522,7 +522,7 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf)
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_serialize() */
@@ -550,7 +550,7 @@ H5S_all_deserialize(H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_all_deserialize, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(space);
@@ -594,7 +594,7 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
unsigned rank; /* Dataspace rank */
unsigned i; /* index variable */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_bounds)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(start);
@@ -636,7 +636,7 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
herr_t
H5S_all_offset(const H5S_t UNUSED *space, hsize_t *offset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(offset);
@@ -669,11 +669,11 @@ H5S_all_offset(const H5S_t UNUSED *space, hsize_t *offset)
htri_t
H5S_all_is_contiguous(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_contiguous);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
- FUNC_LEAVE_NOAPI(TRUE);
+ FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_contiguous() */
@@ -698,11 +698,11 @@ H5S_all_is_contiguous(const H5S_t UNUSED *space)
htri_t
H5S_all_is_single(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_single);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
- FUNC_LEAVE_NOAPI(TRUE);
+ FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_single() */
@@ -728,12 +728,12 @@ H5S_all_is_single(const H5S_t UNUSED *space)
htri_t
H5S_all_is_regular(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_regular);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
- FUNC_LEAVE_NOAPI(TRUE);
+ FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_regular() */
@@ -758,7 +758,7 @@ H5S_all_is_regular(const H5S_t UNUSED *space)
herr_t
H5S_all_adjust_u(H5S_t UNUSED *space, const hsize_t UNUSED *offset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_adjust_u)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -784,7 +784,7 @@ H5S_all_adjust_u(H5S_t UNUSED *space, const hsize_t UNUSED *offset)
static herr_t
H5S_all_project_scalar(const H5S_t UNUSED *space, hsize_t *offset)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_all_project_scalar)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
@@ -815,7 +815,7 @@ H5S_all_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *offse
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_all_project_simple)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
@@ -854,7 +854,7 @@ H5S_select_all(H5S_t *space, hbool_t rel_prev)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_all, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space);
@@ -898,7 +898,7 @@ H5Sselect_all(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Sselect_all, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", spaceid);
/* Check args */
@@ -952,7 +952,7 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i
{
size_t elem_used; /* The number of elements used */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_all_get_seq_list);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -983,6 +983,6 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i
iter->u.all.elmt_offset+=elem_used;
iter->u.all.byte_offset+=len[0];
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_all_get_seq_list() */
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index 352795e..df033da 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -93,7 +93,7 @@ H5S_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent,
{
const H5S_t *mesg = (const H5S_t*)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
switch(H5S_GET_EXTENT_TYPE(mesg)) {
case H5S_NULL:
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 2622101..1eeb098 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -140,7 +140,7 @@ H5FL_DEFINE_STATIC(H5S_hyper_span_info_t);
static herr_t
H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned depth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans_helper)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
while(span) {
HDfprintf(f,"%s: depth=%u, span=%p, (%d, %d), nelem=%u, pstride=%u\n",FUNC,depth,span,(int)span->low,(int)span->high,(unsigned)span->nelem,(unsigned)span->pstride);
@@ -157,7 +157,7 @@ H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned dep
herr_t
H5S_hyper_print_spans(FILE *f, const struct H5S_hyper_span_info_t *span_lst)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(span_lst!=NULL) {
HDfprintf(f,"%s: spans=%p, count=%u, scratch=%p, head=%p\n",FUNC,span_lst,span_lst->count,span_lst->scratch,span_lst->head);
@@ -170,7 +170,7 @@ H5S_hyper_print_spans(FILE *f, const struct H5S_hyper_span_info_t *span_lst)
herr_t
H5S_space_print_spans(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_space_print_spans)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
H5S_hyper_print_spans(f,space->select.sel_info.hslab->span_lst);
@@ -182,7 +182,7 @@ H5S_hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, const
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo_helper)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(dinfo!=NULL) {
HDfprintf(f,"%s: %s: start=[",FUNC,field);
@@ -207,7 +207,7 @@ H5S_hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, const
herr_t
H5S_hyper_print_diminfo(FILE *f, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
H5S_hyper_print_diminfo_helper(f,"opt_diminfo",space->extent.rank,space->select.sel_info.hslab->opt_diminfo);
H5S_hyper_print_diminfo_helper(f,"app_diminfo",space->extent.rank,space->select.sel_info.hslab->app_diminfo);
@@ -243,7 +243,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
unsigned u; /* Index variable */
int i; /* Index variable */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_iter_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -428,7 +428,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
static herr_t
H5S_hyper_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -520,7 +520,7 @@ H5S_hyper_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -568,7 +568,7 @@ H5S_hyper_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S_hyper_iter_nelmts (const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_nelmts)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -600,7 +600,7 @@ H5S_hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
unsigned u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_has_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -658,7 +658,7 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned i; /* Counters */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection */
@@ -873,7 +873,7 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
int fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned u; /* Counters */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check for the special case of just one H5Sselect_hyperslab call made */
/* (i.e. a regular hyperslab selection */
@@ -1055,7 +1055,7 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter)
static herr_t
H5S_hyper_iter_release (H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_iter_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -1095,7 +1095,7 @@ H5S_hyper_new_span(hsize_t low, hsize_t high, H5S_hyper_span_info_t *down, H5S_h
{
H5S_hyper_span_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_new_span)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate a new span node */
if(NULL == (ret_value = H5FL_MALLOC(H5S_hyper_span_t)))
@@ -1143,7 +1143,7 @@ H5S_hyper_span_precompute_helper (H5S_hyper_span_info_t *spans, size_t elmt_size
H5S_hyper_span_t *span; /* Hyperslab span */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_precompute_helper)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(spans);
@@ -1201,7 +1201,7 @@ H5S_hyper_span_precompute(H5S_hyper_span_info_t *spans, size_t elmt_size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_precompute)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(spans);
@@ -1237,7 +1237,7 @@ done:
static void
H5S_hyper_span_scratch(H5S_hyper_span_info_t *spans, void *scr_value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_span_scratch)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(spans);
@@ -1290,7 +1290,7 @@ H5S_hyper_copy_span_helper (H5S_hyper_span_info_t *spans)
H5S_hyper_span_info_t *new_down; /* New down span tree */
H5S_hyper_span_info_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_copy_span_helper)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(spans);
@@ -1376,7 +1376,7 @@ H5S_hyper_copy_span(H5S_hyper_span_info_t *spans)
{
H5S_hyper_span_info_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_copy_span)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(spans);
@@ -1419,7 +1419,7 @@ H5S_hyper_cmp_spans (H5S_hyper_span_info_t *span_info1, H5S_hyper_span_info_t *s
htri_t nest=FAIL;
htri_t ret_value=FAIL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_cmp_spans)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check for redundant comparison */
if(span_info1==span_info2)
@@ -1520,7 +1520,7 @@ H5S_hyper_free_span_info (H5S_hyper_span_info_t *span_info)
H5S_hyper_span_t *span, *next_span;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span_info)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(span_info);
@@ -1572,7 +1572,7 @@ H5S_hyper_free_span (H5S_hyper_span_t *span)
{
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_free_span)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(span);
@@ -1621,7 +1621,7 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
const H5S_hyper_sel_t *src_hslab; /* Pointer to source hyperslab info */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(src);
HDassert(dst);
@@ -1693,7 +1693,7 @@ H5S_hyper_is_valid_helper (const H5S_hyper_span_info_t *spans, const hssize_t *o
htri_t tmp; /* temporary return value */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_is_valid_helper)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(spans);
HDassert(offset);
@@ -1755,7 +1755,7 @@ H5S_hyper_is_valid (const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_valid)
+ FUNC_ENTER_NOAPI_NOERR
HDassert(space);
@@ -1816,7 +1816,7 @@ H5S_hyper_span_nblocks(H5S_hyper_span_info_t *spans)
H5S_hyper_span_t *span; /* Hyperslab span */
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_span_nblocks)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Count the number of elements in the span tree */
if(spans != NULL) {
@@ -1860,7 +1860,7 @@ H5S_get_select_hyper_nblocks(H5S_t *space)
{
hsize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_get_select_hyper_nblocks)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -1902,7 +1902,7 @@ H5Sget_select_hyper_nblocks(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
hssize_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_hyper_nblocks, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", spaceid);
/* Check args */
@@ -1944,7 +1944,7 @@ H5S_hyper_serial_size(const H5S_t *space)
hsize_t block_count; /* block counter for regular hyperslabs */
hssize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_serial_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -2000,7 +2000,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start,
hsize_t u; /* Index variable */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_serialize_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(spans);
@@ -2084,7 +2084,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
unsigned ndims; /* Rank of the dataspace */
int done; /* Whether we are done with the iteration */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_serialize)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -2247,7 +2247,7 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf)
unsigned i,j; /* local counting variables */
herr_t ret_value=FAIL; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_deserialize, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space);
@@ -2330,7 +2330,7 @@ H5S_hyper_span_blocklist(H5S_hyper_span_info_t *spans, hsize_t start[], hsize_t
hsize_t u; /* Index variable */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_blocklist)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(spans);
@@ -2429,7 +2429,7 @@ H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startbloc
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_get_select_hyper_blocklist)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(buf);
@@ -2587,7 +2587,7 @@ H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock,
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_hyper_blocklist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "ihh*[a2]h", spaceid, startblock, numblocks, buf);
/* Check args */
@@ -2643,7 +2643,7 @@ H5S_hyper_bounds_helper(const H5S_hyper_span_info_t *spans, const hssize_t *offs
H5S_hyper_span_t *curr; /* Hyperslab information nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_bounds_helper)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(spans);
HDassert(offset);
@@ -2712,7 +2712,7 @@ H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
unsigned i; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_hyper_bounds, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(space);
HDassert(start);
@@ -2782,7 +2782,7 @@ H5S_hyper_offset(const H5S_t *space, hsize_t *offset)
int i; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_hyper_offset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(space);
HDassert(offset);
@@ -2886,7 +2886,7 @@ H5S_hyper_is_contiguous(const H5S_t *space)
unsigned u; /* index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_contiguous)
+ FUNC_ENTER_NOAPI_NOERR
HDassert(space);
@@ -3071,7 +3071,7 @@ H5S_hyper_is_single(const H5S_t *space)
unsigned u; /* index variable */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_single)
+ FUNC_ENTER_NOAPI_NOERR
HDassert(space);
@@ -3138,7 +3138,7 @@ H5S_hyper_is_regular(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_regular)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -3180,7 +3180,7 @@ H5S_hyper_release(H5S_t *space)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5S_hyper_release, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -3225,7 +3225,7 @@ done:
static herr_t
H5S_hyper_recover_span (unsigned *recover, H5S_hyper_span_t **curr_span, H5S_hyper_span_t *next_span)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_recover_span)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(recover);
HDassert(curr_span);
@@ -3268,7 +3268,7 @@ H5S_hyper_coord_to_span(unsigned rank, hsize_t *coords)
H5S_hyper_span_info_t *down=NULL; /* Pointer to new span tree for next level down */
H5S_hyper_span_t *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_coord_to_span)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(rank > 0);
HDassert(coords);
@@ -3337,7 +3337,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran
H5S_hyper_span_t *new_span; /* New span created for element */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_add_span_element_helper)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(span_tree);
HDassert(rank > 0);
@@ -3535,7 +3535,7 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, hsize_t *coords)
H5S_hyper_span_info_t *head = NULL; /* Pointer to new head of span tree */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_add_span_element)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(rank > 0);
@@ -3611,7 +3611,7 @@ done:
herr_t
H5S_hyper_reset_scratch(H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_reset_scratch)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -3649,7 +3649,7 @@ H5S_hyper_convert(H5S_t *space)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_convert)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
@@ -3721,7 +3721,7 @@ H5S_hyper_intersect_helper (H5S_hyper_span_info_t *spans1, H5S_hyper_span_info_t
htri_t status; /* Status from recursive call */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert((spans1 && spans2) || (spans1 == NULL && spans2 == NULL));
@@ -3788,7 +3788,7 @@ H5S_hyper_intersect (H5S_t *space1, H5S_t *space2)
{
htri_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(space1);
@@ -3840,7 +3840,7 @@ H5S_hyper_intersect_block_helper (const H5S_hyper_span_info_t *spans, hsize_t *s
htri_t status; /* Status from recursive call */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(spans);
@@ -3907,7 +3907,7 @@ H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t *end)
{
htri_t ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_intersect_block)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(space);
@@ -3956,7 +3956,7 @@ H5S_hyper_adjust_helper_u (H5S_hyper_span_info_t *spans, const hsize_t *offset)
{
H5S_hyper_span_t *span; /* Pointer to current span in span tree */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_adjust_helper_u)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(spans);
@@ -4014,7 +4014,7 @@ H5S_hyper_adjust_u(H5S_t *space, const hsize_t *offset)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_u)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(offset);
@@ -4060,7 +4060,7 @@ H5S_hyper_project_scalar(const H5S_t *space, hsize_t *offset)
hsize_t block[H5S_MAX_RANK]; /* Block selected in base dataspace */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_project_scalar)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(space));
@@ -4128,7 +4128,7 @@ H5S_hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space)
H5S_hyper_span_info_t *down; /* Pointer to list of spans */
unsigned curr_dim; /* Current dimension being operated on */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_project_simple_lower)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -4176,7 +4176,7 @@ H5S_hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space)
unsigned curr_dim; /* Current dimension being operated on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_project_simple_higher)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -4264,7 +4264,7 @@ H5S_hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *off
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_project_simple)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base_space && H5S_SEL_HYPERSLABS == H5S_GET_SELECT_TYPE(base_space));
@@ -4432,7 +4432,7 @@ H5S_hyper_adjust_helper_s(H5S_hyper_span_info_t *spans, const hssize_t *offset)
{
H5S_hyper_span_t *span; /* Pointer to current span in span tree */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_adjust_helper_s)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(spans);
@@ -4490,7 +4490,7 @@ H5S_hyper_adjust_s(H5S_t *space, const hssize_t *offset)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_s)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(offset);
@@ -4544,7 +4544,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
unsigned u; /* Local index variable */
herr_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_normalize_offset)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
@@ -4598,7 +4598,7 @@ H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_denormalize_offset)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
@@ -4643,7 +4643,7 @@ H5S_hyper_append_span (H5S_hyper_span_t **prev_span, H5S_hyper_span_info_t ** sp
H5S_hyper_span_t *new_span = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_append_span)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(prev_span);
HDassert(span_tree);
@@ -4767,7 +4767,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
unsigned recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_clip_spans)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(a_spans);
@@ -5257,7 +5257,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
unsigned recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
H5S_hyper_span_info_t *ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_merge_spans_helper)
+ FUNC_ENTER_NOAPI_NOINIT
/* Make certain both 'a' & 'b' spans have down span trees or neither does */
HDassert((a_spans != NULL && b_spans != NULL) || (a_spans == NULL && b_spans == NULL));
@@ -5569,7 +5569,7 @@ done:
static herr_t
H5S_hyper_merge_spans (H5S_t *space, H5S_hyper_span_info_t *new_spans, hbool_t can_own)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_merge_spans)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -5625,7 +5625,7 @@ H5S_hyper_spans_nelem (H5S_hyper_span_info_t *spans)
H5S_hyper_span_t *span; /* Hyperslab span */
hsize_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_spans_nelem)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Count the number of elements in the span tree */
if(spans==NULL)
@@ -5687,7 +5687,7 @@ H5S_hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride,
unsigned u; /* Counters */
H5S_hyper_span_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_make_spans)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rank > 0);
@@ -5828,7 +5828,7 @@ H5S_hyper_rebuild_helper(const H5S_hyper_span_t *span, H5S_hyper_dim_t span_slab
H5S_hyper_dim_t canon_down_span_slab_info[H5S_MAX_RANK];
hbool_t ret_value = TRUE;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_rebuild_helper)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(span) {
/* Initialization */
@@ -5956,7 +5956,7 @@ H5S_hyper_rebuild(H5S_t *space)
unsigned rank, curr_dim;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_rebuild)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -6018,7 +6018,7 @@ H5S_hyper_generate_spans(H5S_t *space)
unsigned u; /* Counter */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_generate_spans)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
@@ -6068,7 +6068,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
H5S_hyper_span_info_t *b_not_a=NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -6314,7 +6314,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
unsigned u; /* Counters */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space);
@@ -6585,7 +6585,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_hyperslab, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
@@ -6639,7 +6639,7 @@ H5S_operate_hyperslab (H5S_t *result, H5S_hyper_span_info_t *spans1, H5S_seloper
H5S_hyper_span_info_t *b_not_a=NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_operate_hyperslab)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(result);
@@ -6846,7 +6846,7 @@ H5S_generate_hyperslab (H5S_t *space, H5S_seloper_t op,
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_generate_hyperslab)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -6923,7 +6923,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
unsigned u; /* Counters */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space);
@@ -7180,7 +7180,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5S_t *space = NULL; /* Dataspace to modify selection of */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_hyperslab, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
@@ -7249,7 +7249,7 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[],
H5S_t *new_space = NULL; /* New dataspace created */
hid_t ret_value;
- FUNC_ENTER_API(H5Scombine_hyperslab, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block);
/* Check args */
@@ -7302,7 +7302,7 @@ H5S_combine_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
H5S_t *ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_combine_select)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space1);
@@ -7374,7 +7374,7 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5S_t *new_space = NULL; /* New Dataspace */
hid_t ret_value;
- FUNC_ENTER_API(H5Scombine_select, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "iSsi", space1_id, op, space2_id);
/* Check args */
@@ -7430,7 +7430,7 @@ H5S_select_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
hbool_t span2_owned=FALSE; /* Flag to indicate that span2 was used in H5S_operate_hyperslab() */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_select_select)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space1);
@@ -7499,7 +7499,7 @@ H5Sselect_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
H5S_t *space2; /* Second Dataspace */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Sselect_select, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iSsi", space1_id, op, space2_id);
/* Check args */
@@ -7583,7 +7583,7 @@ H5S_hyper_get_seq_list_gen(const H5S_t *space,H5S_sel_iter_t *iter,
unsigned u; /* Index variable */
int i; /* Index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_get_seq_list_gen)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -8017,7 +8017,7 @@ H5S_hyper_get_seq_list_opt(const H5S_t *space, H5S_sel_iter_t *iter,
unsigned u; /* Local index variable */
int i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_get_seq_list_opt)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -8447,7 +8447,7 @@ H5S_hyper_get_seq_list_single(const H5S_t *space, H5S_sel_iter_t *iter,
unsigned u; /* Local index variable */
int i; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_get_seq_list_single)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -8715,7 +8715,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_get_seq_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index d6131b9..7cd4c31 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -78,7 +78,7 @@ H5S_mpio_all_type(const H5S_t *space, size_t elmt_size,
hsize_t nelmts; /* Total number of elmts */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_mpio_all_type)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -119,7 +119,7 @@ done:
static herr_t
H5S_mpio_none_type(MPI_Datatype *new_type, int *count, hbool_t *is_derived_type)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_mpio_none_type)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* fill in the return values */
*new_type = MPI_BYTE;
@@ -173,7 +173,7 @@ H5S_mpio_hyper_type(const H5S_t *space, size_t elmt_size,
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5S_mpio_hyper_type)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -439,7 +439,7 @@ H5S_mpio_span_hyper_type(const H5S_t *space, size_t elmt_size,
int mpi_code; /* MPI return code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_mpio_span_hyper_type)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -506,7 +506,7 @@ H5S_obtain_datatype(const hsize_t *down, H5S_hyper_span_t *span,
int mpi_code; /* MPI return status code */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_obtain_datatype)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(span);
@@ -677,7 +677,7 @@ H5S_mpio_space_type(const H5S_t *space, size_t elmt_size,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_mpio_space_type)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -730,7 +730,7 @@ H5S_mpio_space_type(const H5S_t *space, size_t elmt_size,
} /* end switch */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_mpio_space_type() */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 1948f13..e9a3bf9 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -116,7 +116,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_none[1] = {{
herr_t
H5S_none_iter_init(H5S_sel_iter_t *iter, const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_none_iter_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space && H5S_SEL_NONE==H5S_GET_SELECT_TYPE(space));
@@ -147,7 +147,7 @@ H5S_none_iter_init(H5S_sel_iter_t *iter, const H5S_t UNUSED *space)
static herr_t
H5S_none_iter_coords(const H5S_sel_iter_t UNUSED *iter, hsize_t UNUSED *coords)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -175,7 +175,7 @@ H5S_none_iter_coords(const H5S_sel_iter_t UNUSED *iter, hsize_t UNUSED *coords)
static herr_t
H5S_none_iter_block(const H5S_sel_iter_t UNUSED *iter, hsize_t UNUSED *start, hsize_t UNUSED *end)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -203,7 +203,7 @@ H5S_none_iter_block(const H5S_sel_iter_t UNUSED *iter, hsize_t UNUSED *start, hs
static hsize_t
H5S_none_iter_nelmts(const H5S_sel_iter_t UNUSED *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_nelmts)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -232,7 +232,7 @@ H5S_none_iter_nelmts(const H5S_sel_iter_t UNUSED *iter)
static htri_t
H5S_none_iter_has_next_block(const H5S_sel_iter_t UNUSED *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_has_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -262,7 +262,7 @@ H5S_none_iter_has_next_block(const H5S_sel_iter_t UNUSED *iter)
static herr_t
H5S_none_iter_next(H5S_sel_iter_t UNUSED *iter, size_t UNUSED nelem)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -292,7 +292,7 @@ H5S_none_iter_next(H5S_sel_iter_t UNUSED *iter, size_t UNUSED nelem)
static herr_t
H5S_none_iter_next_block(H5S_sel_iter_t UNUSED *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -321,7 +321,7 @@ H5S_none_iter_next_block(H5S_sel_iter_t UNUSED *iter)
static herr_t
H5S_none_iter_release(H5S_sel_iter_t UNUSED * iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_iter_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -350,7 +350,7 @@ H5S_none_iter_release(H5S_sel_iter_t UNUSED * iter)
static herr_t
H5S_none_release(H5S_t UNUSED * space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -381,7 +381,7 @@ H5S_none_release(H5S_t UNUSED * space)
static herr_t
H5S_none_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(src);
HDassert(dst);
@@ -416,7 +416,7 @@ H5S_none_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selectio
static htri_t
H5S_none_is_valid(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -446,7 +446,7 @@ H5S_none_is_valid(const H5S_t UNUSED *space)
static hssize_t
H5S_none_serial_size(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_serial_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -480,7 +480,7 @@ H5S_none_serial_size(const H5S_t UNUSED *space)
static herr_t
H5S_none_serialize(const H5S_t *space, uint8_t *buf)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_serialize)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -518,7 +518,7 @@ H5S_none_deserialize(H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_none_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
@@ -559,7 +559,7 @@ done:
static herr_t
H5S_none_bounds(const H5S_t UNUSED *space, hsize_t UNUSED *start, hsize_t UNUSED *end)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_bounds)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(start);
@@ -592,7 +592,7 @@ H5S_none_bounds(const H5S_t UNUSED *space, hsize_t UNUSED *start, hsize_t UNUSED
herr_t
H5S_none_offset(const H5S_t UNUSED *space, hsize_t UNUSED *offset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_none_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(offset);
@@ -622,7 +622,7 @@ H5S_none_offset(const H5S_t UNUSED *space, hsize_t UNUSED *offset)
static htri_t
H5S_none_is_contiguous(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_contiguous)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -651,7 +651,7 @@ H5S_none_is_contiguous(const H5S_t UNUSED *space)
static htri_t
H5S_none_is_single(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_single)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -681,7 +681,7 @@ H5S_none_is_single(const H5S_t UNUSED *space)
static htri_t
H5S_none_is_regular(const H5S_t UNUSED *space)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_regular)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -711,7 +711,7 @@ H5S_none_is_regular(const H5S_t UNUSED *space)
herr_t
H5S_none_adjust_u(H5S_t UNUSED *space, const hsize_t UNUSED *offset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_none_adjust_u)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -736,7 +736,7 @@ H5S_none_adjust_u(H5S_t UNUSED *space, const hsize_t UNUSED *offset)
static herr_t
H5S_none_project_scalar(const H5S_t UNUSED *space, hsize_t UNUSED *offset)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_project_scalar)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(space));
@@ -764,7 +764,7 @@ H5S_none_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *offs
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_none_project_simple)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base_space && H5S_SEL_NONE == H5S_GET_SELECT_TYPE(base_space));
@@ -802,7 +802,7 @@ H5S_select_none(H5S_t *space)
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_none, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space);
@@ -845,7 +845,7 @@ H5Sselect_none(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Sselect_none, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", spaceid);
/* Check args */
@@ -897,7 +897,7 @@ H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_
size_t UNUSED maxseq, size_t UNUSED maxelem, size_t *nseq, size_t *nelem,
hsize_t UNUSED *off, size_t UNUSED *len)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_get_seq_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index e544371..7e82295 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -123,7 +123,7 @@ H5FL_DEFINE_STATIC(H5S_pnt_list_t);
herr_t
H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_point_iter_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space && H5S_SEL_POINTS==H5S_GET_SELECT_TYPE(space));
@@ -160,7 +160,7 @@ H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
static herr_t
H5S_point_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -191,7 +191,7 @@ H5S_point_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
static herr_t
H5S_point_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -223,7 +223,7 @@ H5S_point_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
static hsize_t
H5S_point_iter_nelmts (const H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_nelmts)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -254,7 +254,7 @@ H5S_point_iter_has_next_block(const H5S_sel_iter_t *iter)
{
htri_t ret_value=TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_has_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -289,7 +289,7 @@ done:
static herr_t
H5S_point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -325,7 +325,7 @@ H5S_point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
static herr_t
H5S_point_iter_next_block(H5S_sel_iter_t *iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -357,7 +357,7 @@ H5S_point_iter_next_block(H5S_sel_iter_t *iter)
static herr_t
H5S_point_iter_release (H5S_sel_iter_t UNUSED * iter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_iter_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(iter);
@@ -392,7 +392,7 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *co
unsigned u; /* Counter */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_add)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(num_elem > 0);
@@ -492,7 +492,7 @@ H5S_point_release (H5S_t *space)
{
H5S_pnt_node_t *curr, *next; /* Point selection nodes */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -552,7 +552,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem,
{
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_select_elements)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -607,7 +607,7 @@ H5S_point_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
H5S_pnt_node_t *curr, *new_node, *new_tail; /* Point information nodes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_copy)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(src);
HDassert(dst);
@@ -688,7 +688,7 @@ H5S_point_is_valid (const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -735,7 +735,7 @@ H5Sget_select_elem_npoints(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
hssize_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_elem_npoints, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", spaceid);
/* Check args */
@@ -776,7 +776,7 @@ H5S_point_serial_size (const H5S_t *space)
H5S_pnt_node_t *curr; /* Point information nodes */
hssize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_serial_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -825,7 +825,7 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf)
uint32_t len=0; /* number of bytes used */
unsigned u; /* local counting variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_serialize)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -893,7 +893,7 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf)
unsigned i, j; /* local counting variables */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_deserialize)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
@@ -963,7 +963,7 @@ H5S_get_select_elem_pointlist(H5S_t *space, hsize_t startpoint, hsize_t numpoint
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_get_select_elem_pointlist)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(buf);
@@ -1028,7 +1028,7 @@ H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint,
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_elem_pointlist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "ihh*[a2]h", spaceid, startpoint, numpoints, buf);
/* Check args */
@@ -1080,7 +1080,7 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
unsigned u; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_bounds)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
HDassert(start);
@@ -1146,7 +1146,7 @@ H5S_point_offset(const H5S_t *space, hsize_t *offset)
int i; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_point_offset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(space);
HDassert(offset);
@@ -1206,7 +1206,7 @@ H5S_point_is_contiguous(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_contiguous)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -1243,7 +1243,7 @@ H5S_point_is_single(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_single)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -1283,7 +1283,7 @@ H5S_point_is_regular(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_regular)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -1322,7 +1322,7 @@ H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_adjust_u)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
HDassert(offset);
@@ -1369,7 +1369,7 @@ H5S_point_project_scalar(const H5S_t *space, hsize_t *offset)
const H5S_pnt_node_t *node; /* Point node */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_project_scalar)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(space));
@@ -1412,7 +1412,7 @@ H5S_point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *off
unsigned rank_diff; /* Difference in ranks between spaces */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_project_simple)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base_space && H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(base_space));
@@ -1554,7 +1554,7 @@ H5Sselect_elements(hid_t spaceid, H5S_seloper_t op, size_t num_elem,
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Sselect_elements, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iSsz*h", spaceid, op, num_elem, coord);
/* Check args */
@@ -1625,7 +1625,7 @@ H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter,
int i; /* Local index variable */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_point_get_seq_list)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(space);
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index db18780..91aed1e 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -63,7 +63,7 @@ static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter);
herr_t
H5S_select_offset(H5S_t *space, const hssize_t *offset)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -109,7 +109,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(dst);
@@ -150,7 +150,7 @@ H5S_select_release(H5S_t *ds)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(ds);
@@ -187,7 +187,7 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_get_seq_list)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(space);
@@ -222,7 +222,7 @@ H5S_select_serial_size(const H5S_t *space)
{
hssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_serial_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
@@ -260,7 +260,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_serialize)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
assert(buf);
@@ -295,7 +295,7 @@ H5Sget_select_npoints(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
hssize_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_npoints, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Hs", "i", spaceid);
/* Check args */
@@ -332,7 +332,7 @@ done:
hssize_t
H5S_get_select_npoints(const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_npoints)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -369,7 +369,7 @@ H5Sselect_valid(hid_t spaceid)
H5S_t *space; /* Dataspace to modify selection of */
htri_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sselect_valid, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", spaceid);
/* Check args */
@@ -411,7 +411,7 @@ H5S_select_valid(const H5S_t *space)
{
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_valid)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(space);
@@ -450,7 +450,7 @@ H5S_select_deserialize (H5S_t *space, const uint8_t *buf)
uint32_t sel_type; /* Pointer to the selection type */
herr_t ret_value=FAIL; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_deserialize, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(space);
@@ -520,7 +520,7 @@ H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[])
H5S_t *space; /* Dataspace to modify selection of */
herr_t ret_value; /* return value */
- FUNC_ENTER_API(H5Sget_select_bounds, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*h*h", spaceid, start, end);
/* Check args */
@@ -568,7 +568,7 @@ H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_bounds)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -609,7 +609,7 @@ H5S_get_select_offset(const H5S_t *space, hsize_t *offset)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -647,7 +647,7 @@ H5S_select_is_contiguous(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_contiguous)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -684,7 +684,7 @@ H5S_select_is_single(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_single)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -721,7 +721,7 @@ H5S_select_is_regular(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_regular)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -758,7 +758,7 @@ H5S_select_adjust_u(H5S_t *space, const hsize_t *offset)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_adjust_u)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -796,7 +796,7 @@ H5S_select_project_scalar(const H5S_t *space, hsize_t *offset)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_project_scalar)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -836,7 +836,7 @@ H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_project_simple)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
@@ -871,7 +871,7 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space, size_t elmt_s
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_init)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(sel_iter);
@@ -926,7 +926,7 @@ H5S_select_iter_coords (const H5S_sel_iter_t *sel_iter, hsize_t *coords)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(sel_iter);
@@ -968,7 +968,7 @@ H5S_select_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_select_iter_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOINIT_NOERR
/* Check args */
assert(iter);
@@ -1008,7 +1008,7 @@ H5S_select_iter_nelmts (const H5S_sel_iter_t *sel_iter)
{
hsize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_nelmts)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(sel_iter);
@@ -1047,7 +1047,7 @@ H5S_select_iter_has_next_block (const H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_select_iter_has_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOINIT_NOERR
/* Check args */
assert(iter);
@@ -1087,7 +1087,7 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_next)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(iter);
@@ -1132,7 +1132,7 @@ H5S_select_iter_next_block(H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_select_iter_next_block)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(iter);
@@ -1170,7 +1170,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_release)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(sel_iter);
@@ -1236,7 +1236,7 @@ H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t
herr_t user_ret=0; /* User's return value */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_iterate, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(buf);
@@ -1345,7 +1345,7 @@ H5Sget_select_type(hid_t space_id)
H5S_t *space; /* dataspace to modify */
H5S_sel_type ret_value; /* Return value */
- FUNC_ENTER_API(H5Sget_select_type, H5S_SEL_ERROR)
+ FUNC_ENTER_API(H5S_SEL_ERROR)
H5TRACE1("St", "i", space_id);
/* Check args */
@@ -1384,7 +1384,7 @@ H5S_get_select_type(const H5S_t *space)
{
H5S_sel_type ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_type)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
assert(space);
@@ -1428,7 +1428,7 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
hbool_t iter_b_init = 0; /* Selection b iteration info has been initialized */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_shape_same, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(space1);
@@ -1767,7 +1767,7 @@ H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr,
hsize_t projected_space_element_offset = 0; /* Offset of selected element in projected buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_construct_projection, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(base_space != NULL);
@@ -1997,7 +1997,7 @@ H5S_select_fill(const void *fill, size_t fill_size, const H5S_t *space, void *_b
size_t max_elem; /* Total number of elements in selection */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_fill, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(fill);
diff --git a/src/H5Stest.c b/src/H5Stest.c
index 5758263..62a4179 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -56,7 +56,7 @@ H5S_select_shape_same_test(hid_t sid1, hid_t sid2)
H5S_t *space2; /* Pointer to 2nd dataspace */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_shape_same_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get dataspace structures */
if(NULL == (space1 = (H5S_t *)H5I_object_verify(sid1, H5I_DATASPACE)))
@@ -97,7 +97,7 @@ H5S_get_rebuild_status_test(hid_t space_id)
H5S_t *space; /* Pointer to 1st dataspace */
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_get_rebuild_status_test, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get dataspace structures */
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
diff --git a/src/H5T.c b/src/H5T.c
index 4b41ddb..01bd6c1 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -521,11 +521,11 @@ H5T_init(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_init, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -556,7 +556,7 @@ H5T_init_inf(void)
size_t u; /* Local index value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_init_inf)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the float datatype */
if(NULL == (dst_p = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT_g)))
@@ -666,7 +666,7 @@ H5T_init_hw(void)
#endif /* H5_HAVE_GET_FPC_CSR */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_hw)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5_HAVE_GET_FPC_CSR
/* [This code is specific to SGI machines] */
@@ -739,7 +739,7 @@ H5T_init_interface(void)
H5P_genclass_t *crt_pclass; /* Property list class for datatype creation properties */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
if(H5I_register_type(H5I_DATATYPE, (size_t)H5I_DATATYPEID_HASHSIZE, H5T_RESERVED_ATOMS, (H5I_free_t)H5T_close)<0)
@@ -1376,7 +1376,7 @@ H5T_unlock_cb(void *_dt, hid_t UNUSED id, void UNUSED *key)
{
H5T_t *dt = (H5T_t *)_dt;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_unlock_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert (dt && dt->shared);
if (H5T_STATE_IMMUTABLE==dt->shared->state)
@@ -1408,7 +1408,7 @@ H5T_term_interface(void)
int i, nprint=0, n=0;
H5T_path_t *path = NULL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_term_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
/* Unregister all conversion functions */
@@ -1585,12 +1585,12 @@ H5Tcreate(H5T_class_t type, size_t size)
H5T_t *dt = NULL; /* New datatype constructed */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tcreate, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "Ttz", type, size);
- /* check args */
- if(size == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid size")
+ /* check args. We support string (fixed-size or variable-length) now. */
+ if(size <= 0 && size != H5T_VARIABLE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive")
/* create the type */
if(NULL == (dt = H5T_create(type, size)))
@@ -1636,7 +1636,7 @@ H5Tcopy(hid_t type_id)
H5T_t *new_dt = NULL;
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tcopy, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", type_id);
switch(H5I_get_type(type_id)) {
@@ -1713,7 +1713,7 @@ H5Tclose(hid_t type_id)
H5T_t *dt; /* Pointer to datatype to close */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tclose, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", type_id);
/* Check args */
@@ -1752,7 +1752,7 @@ H5Tequal(hid_t type1_id, hid_t type2_id)
const H5T_t *dt2; /* Pointer to second datatype */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tequal, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", type1_id, type2_id);
/* check args */
@@ -1798,7 +1798,7 @@ H5Tlock(hid_t type_id)
H5T_t *dt; /* Datatype to operate on */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tlock, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", type_id);
/* Check args */
@@ -1836,7 +1836,7 @@ H5Tget_class(hid_t type_id)
H5T_t *dt; /* Pointer to datatype */
H5T_class_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_class, H5T_NO_CLASS)
+ FUNC_ENTER_API(H5T_NO_CLASS)
H5TRACE1("Tt", "i", type_id);
/* Check args */
@@ -1874,7 +1874,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
{
H5T_class_t ret_value;
- FUNC_ENTER_NOAPI(H5T_get_class, H5T_NO_CLASS);
+ FUNC_ENTER_NOAPI(H5T_NO_CLASS)
assert(dt);
@@ -1889,7 +1889,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_class() */
@@ -1914,7 +1914,7 @@ H5Tdetect_class(hid_t type, H5T_class_t cls)
H5T_t *dt; /* Datatype to query */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tdetect_class, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "iTt", type, cls);
/* Check args */
@@ -1960,7 +1960,7 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
unsigned i;
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5T_detect_class, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dt);
HDassert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
@@ -2035,7 +2035,7 @@ H5Tis_variable_str(hid_t dtype_id)
H5T_t *dt; /* Datatype to query */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tis_variable_str, FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", dtype_id);
/* Check args */
@@ -2047,7 +2047,7 @@ H5Tis_variable_str(hid_t dtype_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't determine if datatype is VL-string")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Tis_variable_str() */
@@ -2066,9 +2066,9 @@ done:
htri_t
H5T_is_variable_str(const H5T_t *dt)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_is_variable_str)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared));
+ FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared))
} /* end H5T_is_variable_str() */
@@ -2094,7 +2094,7 @@ H5Tget_size(hid_t type_id)
H5T_t *dt; /* Datatype to query */
size_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_size, 0)
+ FUNC_ENTER_API(0)
H5TRACE1("z", "i", type_id);
/* Check args */
@@ -2139,7 +2139,7 @@ H5Tset_size(hid_t type_id, size_t size)
H5T_t *dt; /* Datatype to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_size, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", type_id, size);
/* Check args */
@@ -2155,8 +2155,6 @@ H5Tset_size(hid_t type_id, size_t size)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
if(H5T_REFERENCE == dt->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype")
- if(size == 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't adjust size to 0")
/* Modify the datatype */
if(H5T_set_size(dt, size) < 0)
@@ -2191,7 +2189,7 @@ H5Tget_super(hid_t type)
H5T_t *super = NULL; /* Supertype */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_super, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", type);
if(NULL == (dt = (H5T_t *)H5I_object_verify(type,H5I_DATATYPE)))
@@ -2233,7 +2231,7 @@ H5T_get_super(const H5T_t *dt)
{
H5T_t *ret_value=NULL;
- FUNC_ENTER_NOAPI(H5T_get_super, NULL);
+ FUNC_ENTER_NOAPI(NULL)
assert(dt);
@@ -2243,7 +2241,7 @@ H5T_get_super(const H5T_t *dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy parent data type");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -2280,7 +2278,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
int i; /*counter */
herr_t ret_value=SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_register);
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert(src);
@@ -2413,7 +2411,7 @@ done:
H5I_dec_ref(tmp_did);
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_register() */
@@ -2444,7 +2442,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
H5T_t *dst; /*destination data type desc */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_API(H5Tregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "Te*siix", pers, name, src_id, dst_id, func);
/* Check args */
@@ -2496,7 +2494,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
int nprint = 0; /*number of paths shut down */
int i; /*counter */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_unregister)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Remove matching entries from the soft list */
if(H5T_PERS_DONTCARE == pers || H5T_PERS_SOFT == pers) {
@@ -2590,7 +2588,7 @@ H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
H5T_t *src = NULL, *dst = NULL; /* Datatype descriptors */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tunregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE5("e", "Te*siix", pers, name, src_id, dst_id, func);
/* Check arguments */
@@ -2632,7 +2630,7 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata)
H5T_path_t *path;
H5T_conv_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tfind, NULL)
+ FUNC_ENTER_API(NULL)
H5TRACE3("x", "ii**x", src_id, dst_id, pcdata);
/* Check args */
@@ -2680,7 +2678,7 @@ H5Tcompiler_conv(hid_t src_id, hid_t dst_id)
H5T_t *src, *dst;
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tcompiler_conv, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("t", "ii", src_id, dst_id);
/* Check args */
@@ -2728,7 +2726,7 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf,
H5T_t *src, *dst; /*unatomized types */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tconvert, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiz*x*xi", src_id, dst_id, nelmts, buf, background, dxpl_id);
/* Check args */
@@ -2775,7 +2773,7 @@ H5Tencode(hid_t obj_id, void *buf, size_t *nalloc)
H5T_t *dtype;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API (H5Tencode, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x*z", obj_id, buf, nalloc);
/* Check argument and retrieve object */
@@ -2820,7 +2818,7 @@ H5Tdecode(const void *buf)
H5T_t *dt;
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tdecode, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "*x", buf);
/* Check args */
@@ -2868,7 +2866,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc)
H5F_t *f = NULL; /* Fake file structure*/
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5T_encode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate "fake" file structure */
if(NULL == (f = H5F_fake_alloc((uint8_t)0)))
@@ -2924,7 +2922,7 @@ H5T_decode(const unsigned char *buf)
H5F_t *f = NULL; /* Fake file structure*/
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_decode)
+ FUNC_ENTER_NOAPI_NOINIT
/* Allocate "fake" file structure */
if(NULL == (f = H5F_fake_alloc((uint8_t)0)))
@@ -2970,7 +2968,9 @@ done:
* Friday, December 5, 1997
*
* Modifications:
- *
+ * Raymond Lu
+ * 19 May 2011
+ * We support fixed size or variable-length string now.
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -2979,13 +2979,29 @@ H5T_create(H5T_class_t type, size_t size)
H5T_t *dt = NULL;
H5T_t *ret_value = NULL;
- FUNC_ENTER_NOAPI(H5T_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
switch(type) {
case H5T_INTEGER:
case H5T_FLOAT:
case H5T_TIME:
case H5T_STRING:
+ {
+ H5T_t *origin_dt = NULL;
+
+ if(NULL == (origin_dt = (H5T_t *)H5I_object(H5T_C_S1)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "can't get structure for string type")
+
+ /* Copy the default string datatype */
+ if(NULL == (dt = H5T_copy(origin_dt, H5T_COPY_TRANSIENT)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy");
+
+ /* Modify the datatype */
+ if(H5T_set_size(dt, size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set size for string type")
+ }
+ break;
+
case H5T_BITFIELD:
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "type class is not appropriate - use H5Tcopy()")
@@ -3045,7 +3061,9 @@ H5T_create(H5T_class_t type, size_t size)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, NULL, "unknown data type class")
} /* end switch */
- dt->shared->size = size;
+ /* Set the size except VL string */
+ if(H5T_STRING != type || H5T_VARIABLE != size)
+ dt->shared->size = size;
/* Set return value */
ret_value = dt;
@@ -3107,7 +3125,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
char *s;
H5T_t *ret_value;
- FUNC_ENTER_NOAPI(H5T_copy, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* check args */
HDassert(old_dt);
@@ -3377,7 +3395,8 @@ H5T_lock (H5T_t *dt, hbool_t immutable)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_lock, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
+
assert (dt);
switch (dt->shared->state) {
@@ -3395,7 +3414,7 @@ H5T_lock (H5T_t *dt, hbool_t immutable)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -3417,7 +3436,7 @@ H5T_alloc(void)
H5T_t *dt = NULL; /* Pointer to datatype allocated */
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_alloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Allocate & initialize datatype wrapper info */
if(NULL == (dt = H5FL_CALLOC(H5T_t)))
@@ -3466,7 +3485,7 @@ H5T_free(H5T_t *dt)
unsigned i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_free, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dt && dt->shared);
@@ -3564,7 +3583,7 @@ H5T_close(H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_close, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dt && dt->shared);
@@ -3594,6 +3613,11 @@ H5T_close(H5T_t *dt)
if(H5O_close(&dt->oloc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close")
} /* end if */
+ else
+ /* Free object location (i.e. "unhold" the file if appropriate)
+ */
+ if(H5O_loc_free(&(dt->oloc)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
} /* end if */
/* Free the group hier. path since we're not calling H5T_free*/
@@ -3644,7 +3668,7 @@ H5T_set_size(H5T_t *dt, size_t size)
size_t prec, offset;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_set_size, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(dt);
@@ -3689,7 +3713,7 @@ H5T_set_size(H5T_t *dt, size_t size)
case H5T_COMPOUND:
/* If decreasing size, check the last member isn't being cut. */
if(size<dt->shared->size) {
- int num_membs;
+ int num_membs = 0;
unsigned i, max_index=0;
size_t memb_offset, max_offset=0;
size_t max_size;
@@ -3697,18 +3721,20 @@ H5T_set_size(H5T_t *dt, size_t size)
if((num_membs = H5T_get_nmembers(dt))<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to get number of members");
- for(i=0; i<(unsigned)num_membs; i++) {
- memb_offset = H5T_get_member_offset(dt, i);
- if(memb_offset > max_offset) {
- max_offset = memb_offset;
- max_index = i;
- }
- }
+ if(num_membs) {
+ for(i=0; i<(unsigned)num_membs; i++) {
+ memb_offset = H5T_get_member_offset(dt, i);
+ if(memb_offset > max_offset) {
+ max_offset = memb_offset;
+ max_index = i;
+ }
+ }
- max_size = H5T_get_member_size(dt, max_index);
+ max_size = H5T_get_member_size(dt, max_index);
- if(size<(max_offset+max_size))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member ");
+ if(size<(max_offset+max_size))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member ");
+ }
/* Compound must not have been packed previously */
/* We will check if resizing changed the packed state of
@@ -3798,7 +3824,7 @@ H5T_set_size(H5T_t *dt, size_t size)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -3823,13 +3849,13 @@ done:
size_t
H5T_get_size(const H5T_t *dt)
{
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_get_size);
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(dt);
- FUNC_LEAVE_NOAPI(dt->shared->size);
+ FUNC_LEAVE_NOAPI(dt->shared->size)
}
@@ -3860,7 +3886,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
int tmp;
int ret_value = 0;
- FUNC_ENTER_NOAPI(H5T_cmp, 0)
+ FUNC_ENTER_NOAPI(0)
/* Sanity check */
HDassert(dt1);
@@ -4305,7 +4331,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
int nprint = 0; /*lines of output printed */
H5T_path_t *ret_value; /*return value */
- FUNC_ENTER_NOAPI(H5T_path_find, NULL);
+ FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
HDassert(src);
@@ -4439,7 +4465,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
path->cdata.command = H5T_CONV_INIT;
if((H5T_g.soft[i].func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
- H5E_clear_stack(NULL); /*ignore the error*/
+ H5E_clear_stack(H5E_DEFAULT); /*ignore the error*/
} /* end if */
else {
HDstrcpy(path->name, H5T_g.soft[i].name);
@@ -4538,7 +4564,7 @@ done:
if(dst_id >= 0)
H5I_dec_ref(dst_id);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_find() */
@@ -4562,11 +4588,11 @@ done:
hbool_t
H5T_path_noop(const H5T_path_t *p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_path_noop);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(p);
- FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE)));
+ FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
@@ -4603,14 +4629,14 @@ H5T_path_compound_subset(const H5T_path_t *p)
{
H5T_subset_info_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_path_compound_subset);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(p);
if(p->are_compounds)
ret_value = H5T_conv_struct_subset(&(p->cdata));
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_compound_subset */
@@ -4631,11 +4657,11 @@ H5T_path_compound_subset(const H5T_path_t *p)
H5T_bkg_t
H5T_path_bkg(const H5T_path_t *p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_path_bkg);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(p);
- FUNC_LEAVE_NOAPI(p->cdata.need_bkg);
+ FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
@@ -4663,7 +4689,7 @@ H5T_compiler_conv(H5T_t *src, H5T_t *dst)
H5T_path_t *path;
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5T_compiler_conv)
+ FUNC_ENTER_NOAPI_NOINIT
/* Find it */
if (NULL==(path=H5T_path_find(src, dst, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
@@ -4727,7 +4753,7 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts,
#endif
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_convert, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5T_DEBUG
if (H5DEBUG(T)) H5_timer_begin(&timer);
@@ -4745,7 +4771,7 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts,
#endif
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4767,7 +4793,7 @@ H5T_oloc(H5T_t *dt)
{
H5O_loc_t *ret_value = NULL;
- FUNC_ENTER_NOAPI(H5T_oloc, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(dt);
@@ -4806,7 +4832,7 @@ H5T_nameof(H5T_t *dt)
{
H5G_name_t *ret_value = NULL;
- FUNC_ENTER_NOAPI(H5T_nameof, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(dt);
@@ -4847,7 +4873,7 @@ H5T_is_immutable(const H5T_t *dt)
{
htri_t ret_value = FALSE;
- FUNC_ENTER_NOAPI(H5T_is_immutable, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
@@ -4855,7 +4881,7 @@ H5T_is_immutable(const H5T_t *dt)
ret_value = TRUE;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4880,7 +4906,7 @@ H5T_is_named(const H5T_t *dt)
{
htri_t ret_value = FALSE;
- FUNC_ENTER_NOAPI(H5T_is_named, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
@@ -4888,7 +4914,7 @@ H5T_is_named(const H5T_t *dt)
ret_value = TRUE;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4917,7 +4943,7 @@ H5T_get_ref_type(const H5T_t *dt)
{
H5R_type_t ret_value = H5R_BADTYPE;
- FUNC_ENTER_NOAPI(H5T_get_ref_type, H5R_BADTYPE);
+ FUNC_ENTER_NOAPI(H5R_BADTYPE)
assert(dt);
@@ -4925,7 +4951,7 @@ H5T_get_ref_type(const H5T_t *dt)
ret_value=dt->shared->u.atomic.u.r.rtype;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_ref_type() */
@@ -4951,7 +4977,7 @@ H5T_is_sensible(const H5T_t *dt)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI(H5T_is_sensible, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
@@ -4979,7 +5005,7 @@ H5T_is_sensible(const H5T_t *dt)
} /* end switch */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5016,7 +5042,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
int accum_change; /* Amount of change in the offset of the fields */
size_t old_size; /* Previous size of a field */
- FUNC_ENTER_NOAPI(H5T_set_loc, FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
assert(loc>=H5T_LOC_BADLOC && loc<H5T_LOC_MAXLOC);
@@ -5123,7 +5149,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_loc() */
@@ -5152,7 +5178,7 @@ H5T_is_relocatable(const H5T_t *dt)
{
htri_t ret_value = FALSE;
- FUNC_ENTER_NOAPI(H5T_is_relocatable, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dt);
@@ -5186,7 +5212,7 @@ done:
static herr_t
H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_upgrade_version_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(dt);
@@ -5234,7 +5260,7 @@ H5T_upgrade_version(H5T_t *dt, unsigned new_version)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_upgrade_version, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dt);
@@ -5265,7 +5291,7 @@ H5T_set_latest_version(H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_set_latest_version, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dt);
@@ -5280,6 +5306,42 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5T_patch_file
+ *
+ * Purpose: Patch the top-level file pointers contained in dt to point
+ * to f, if dt is a committed type. This is possible because
+ * the top-level file pointer can be closed out from under
+ * dt while dt is contained in the shared file's cache.
+ *
+ * Return: SUCCEED
+ *
+ * Programmer: Neil Fortner
+ * Thursday, July 14, 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_patch_file(H5T_t *dt, H5F_t *f)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity check */
+ HDassert(dt);
+ HDassert(f);
+
+ if(H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state) {
+ dt->oloc.file = f;
+ dt->sh_loc.file = f;
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5T_patch_file() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Tflush
*
* Purpose: Flushes all buffers associated with a named datatype to disk.
@@ -5297,7 +5359,7 @@ H5Tflush(hid_t type_id)
H5T_t *dt; /* Datatype for this operation */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Tflush, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", type_id);
/* Check args */
@@ -5333,7 +5395,7 @@ H5Trefresh(hid_t type_id)
H5T_t * dt = NULL;
hid_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Trefresh, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", type_id);
/* Check args */
diff --git a/src/H5TS.c b/src/H5TS.c
index 480bc2d..6f661ad 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -14,9 +14,9 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* private headers */
-#include "H5private.h" /*library */
-#include "H5Eprivate.h" /*error handling */
-#include "H5MMprivate.h" /*memory management functions */
+#include "H5private.h" /*library */
+#include "H5Eprivate.h" /*error handling */
+#include "H5MMprivate.h" /*memory management functions */
#ifdef H5_HAVE_THREADSAFE
@@ -127,6 +127,12 @@ H5TS_pthread_first_thread_init(void)
{
H5_g.H5_libinit_g = FALSE;
+#ifdef H5_HAVE_WIN32_API
+# ifdef PTW32_STATIC_LIB
+ pthread_win32_process_attach_np();
+# endif
+#endif
+
/* initialize global API mutex lock */
pthread_mutex_init(&H5_g.init_lock.atomic_lock, NULL);
pthread_cond_init(&H5_g.init_lock.cond_var, NULL);
@@ -171,7 +177,7 @@ H5TS_pthread_first_thread_init(void)
herr_t
H5TS_mutex_lock(H5TS_mutex_t *mutex)
{
-#ifdef H5_HAVE_WIN_THREADS
+#ifdef H5_HAVE_WIN_THREADS
EnterCriticalSection( &mutex->CriticalSection);
return 0;
#else /* H5_HAVE_WIN_THREADS */
@@ -226,7 +232,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex)
herr_t
H5TS_mutex_unlock(H5TS_mutex_t *mutex)
{
-#ifdef H5_HAVE_WIN_THREADS
+#ifdef H5_HAVE_WIN_THREADS
/* Releases ownership of the specified critical section object. */
LeaveCriticalSection(&mutex->CriticalSection);
return 0;
@@ -285,7 +291,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex)
herr_t
H5TS_cancel_count_inc(void)
{
-#ifdef H5_HAVE_WIN_THREADS
+#ifdef H5_HAVE_WIN_THREADS
/* unsupported; just return 0 */
return SUCCEED;
#else /* H5_HAVE_WIN_THREADS */
@@ -296,25 +302,25 @@ H5TS_cancel_count_inc(void)
if (!cancel_counter) {
/*
- * First time thread calls library - create new counter and associate
+ * First time thread calls library - create new counter and associate
* with key
*/
- cancel_counter = (H5TS_cancel_t *)H5MM_calloc(sizeof(H5TS_cancel_t));
+ cancel_counter = (H5TS_cancel_t *)H5MM_calloc(sizeof(H5TS_cancel_t));
- if (!cancel_counter) {
- H5E_push_stack(NULL, "H5TS_cancel_count_inc",
- __FILE__, __LINE__, H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
- return FAIL;
- }
+ if (!cancel_counter) {
+ H5E_push_stack(NULL, "H5TS_cancel_count_inc",
+ __FILE__, __LINE__, H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
+ return FAIL;
+ }
ret_value = pthread_setspecific(H5TS_cancel_key_g,
- (void *)cancel_counter);
+ (void *)cancel_counter);
}
if (cancel_counter->cancel_count == 0)
/* thread entering library */
ret_value = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,
- &cancel_counter->previous_state);
+ &cancel_counter->previous_state);
++cancel_counter->cancel_count;
@@ -352,7 +358,7 @@ H5TS_cancel_count_inc(void)
herr_t
H5TS_cancel_count_dec(void)
{
-#ifdef H5_HAVE_WIN_THREADS
+#ifdef H5_HAVE_WIN_THREADS
/* unsupported; will just return 0 */
return SUCCEED;
#else /* H5_HAVE_WIN_THREADS */
@@ -387,13 +393,22 @@ H5TS_cancel_count_dec(void)
*--------------------------------------------------------------------------
*/
H5TS_thread_t
-H5TS_create_thread(void * func, H5TS_attr_t * attr, void*udata)
+H5TS_create_thread(void *func, H5TS_attr_t *attr, void *udata)
{
H5TS_thread_t ret_value;
-#ifdef H5_HAVE_WIN_THREADS
+#ifdef H5_HAVE_WIN_THREADS
- ret_value = CreateThread(NULL, 0, func, udata, 0, NULL);
+ /* When calling C runtime functions, you have to use _beginthread or
+ * _beginthreadex instead of CreateThread. Threads created with
+ * CreateThread risk being killed in low-memory situations.
+ * We use _beginthread instead of _begintheadex because the latter
+ * requires a stdcall function (and we don't need the more advanced
+ * features it exposes).
+ *
+ * NOTE: No error checks here! ret_value will be -1L on errors.
+ */
+ ret_value = _beginthread(func, 0 /* stack size */, udata);
#else /* H5_HAVE_WIN_THREADS */
@@ -405,4 +420,4 @@ H5TS_create_thread(void * func, H5TS_attr_t * attr, void*udata)
} /* H5TS_create_thread */
-#endif /* H5_HAVE_THREADSAFE */
+#endif /* H5_HAVE_THREADSAFE */
diff --git a/src/H5Tarray.c b/src/H5Tarray.c
index f7cddb9..714ecc9 100644
--- a/src/H5Tarray.c
+++ b/src/H5Tarray.c
@@ -94,7 +94,7 @@ DESCRIPTION
static herr_t
H5T_init_array_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_array_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_array_interface() */
@@ -127,7 +127,7 @@ H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */])
unsigned u; /* local index variable */
hid_t ret_value; /* return value */
- FUNC_ENTER_API(H5Tarray_create2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "iIu*h", base_id, ndims, dim);
/* Check args */
@@ -182,7 +182,7 @@ H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
H5T_t *ret_value; /* new array data type */
unsigned u; /* local index variable */
- FUNC_ENTER_NOAPI(H5T_array_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(base);
HDassert(ndims <= H5S_MAX_RANK);
@@ -239,7 +239,7 @@ H5Tget_array_ndims(hid_t type_id)
H5T_t *dt; /* pointer to array datatype */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Tget_array_ndims, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", type_id);
/* Check args */
@@ -273,7 +273,7 @@ done:
int
H5T_get_array_ndims(const H5T_t *dt)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_get_array_ndims)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
HDassert(dt->shared->type == H5T_ARRAY);
@@ -302,7 +302,7 @@ H5Tget_array_dims2(hid_t type_id, hsize_t dims[])
H5T_t *dt; /* pointer to array data type */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Tget_array_dims2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("Is", "i*h", type_id, dims);
/* Check args */
@@ -339,7 +339,7 @@ H5T_get_array_dims(const H5T_t *dt, hsize_t dims[])
unsigned u; /* Local index variable */
int ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5T_get_array_dims, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dt);
HDassert(dt->shared->type == H5T_ARRAY);
@@ -386,7 +386,7 @@ H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
unsigned u; /* local index variable */
hid_t ret_value; /* return value */
- FUNC_ENTER_API(H5Tarray_create1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("i", "iIs*h*Is", base_id, ndims, dim, perm);
/* Check args */
@@ -437,7 +437,7 @@ H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int UNUSED perm[])
H5T_t *dt; /* Array datatype to query */
int ret_value; /* return value */
- FUNC_ENTER_API(H5Tget_array_dims1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("Is", "i*h*Is", type_id, dims, perm);
/* Check args */
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index a52d538..f85ff14 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -46,9 +46,9 @@ void
H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
size_t src_offset, size_t size)
{
- unsigned shift;
- unsigned mask_lo, mask_hi;
- unsigned s_idx, d_idx;
+ size_t shift;
+ size_t mask_lo, mask_hi;
+ size_t s_idx, d_idx;
/*
* Normalize the offset to be a byte number and a bit offset within that
@@ -76,8 +76,8 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
* dst[d_idx+1] dst[d_idx]
*/
while(src_offset && size > 0) {
- unsigned nbits = MIN3(size, 8 - dst_offset, 8 - src_offset);
- unsigned mask = ((unsigned)1 << nbits) - 1;
+ size_t nbits = MIN3(size, 8 - dst_offset, 8 - src_offset);
+ size_t mask = ((size_t)1 << nbits) - 1;
dst[d_idx] &= (uint8_t)~(mask << dst_offset);
dst[d_idx] |= (uint8_t)(((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset);
@@ -119,7 +119,7 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
* to line up with the destination.
*/
shift = dst_offset;
- mask_lo = ((unsigned)1 << (8 - shift)) - 1;
+ mask_lo = ((size_t)1 << (8 - shift)) - 1;
mask_hi = (~mask_lo) & 0xff;
for(/*void*/; size > 8; size -= 8, d_idx++, s_idx++) {
@@ -135,8 +135,8 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
/* Finish up */
while(size > 0) {
- unsigned nbits = (unsigned)MIN3 (size, 8 - dst_offset, 8 - src_offset);
- unsigned mask = ((unsigned)1 << nbits) - 1;
+ size_t nbits = (size_t)MIN3 (size, 8 - dst_offset, 8 - src_offset);
+ size_t mask = ((size_t)1 << nbits) - 1;
dst[d_idx] &= (uint8_t)(~(mask << dst_offset));
dst[d_idx] |= (uint8_t)(((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset);
@@ -185,7 +185,7 @@ H5T_bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_bit_shift, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(buf);
@@ -259,7 +259,7 @@ H5T_bit_get_d(uint8_t *buf, size_t offset, size_t size)
size_t i, hs;
uint64_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5T_bit_get_d)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(8 * sizeof(val) >= size);
@@ -417,8 +417,8 @@ H5T_bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
size_t iu;
ssize_t ret_value = (-1); /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_find)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Some functions call this with value=TRUE */
HDassert(TRUE == 1);
@@ -522,8 +522,8 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
unsigned carry = 1;
unsigned acc, mask;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_inc)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(buf);
@@ -593,8 +593,8 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
uint8_t tmp;
unsigned borrow = 0;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_dec)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(buf);
HDassert(size);
@@ -668,8 +668,8 @@ H5T_bit_neg(uint8_t *buf, size_t start, size_t size)
size_t pos = start % 8;
uint8_t tmp[1];
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_neg);
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(buf);
HDassert(size);
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index d3779e5..a49d66e 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -99,7 +99,7 @@ DESCRIPTION
static herr_t
H5T_init_commit_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_commit_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_commit_interface() */
@@ -126,7 +126,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
H5T_t *type; /* Datatype for ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tcommit2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*siiii", loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id);
/* Check arguments */
@@ -159,7 +159,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
/* Commit the type */
- if(H5T_commit_named(&loc, name, type, lcpl_id, tcpl_id, tapl_id, H5AC_dxpl_id) < 0)
+ if(H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id, tapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
@@ -168,7 +168,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_commit_named
+ * Function: H5T__commit_named
*
* Purpose: Internal routine to save a transient datatype to a file and
* turn the type ID into a "named", immutable type.
@@ -181,7 +181,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt,
+H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt,
hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id)
{
H5O_obj_create_t ocrt_info; /* Information for object creation */
@@ -189,7 +189,7 @@ H5T_commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt,
H5T_state_t old_state = H5T_STATE_TRANSIENT; /* The state of the datatype before H5T_commit. */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_commit_named, FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(loc);
@@ -246,7 +246,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_commit_named() */
+} /* end H5T__commit_named() */
/*-------------------------------------------------------------------------
@@ -275,7 +275,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
H5T_t *type = NULL; /* Datatype created */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tcommit_anon, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "iiii", loc_id, type_id, tcpl_id, tapl_id);
/* Check arguments */
@@ -342,7 +342,7 @@ H5T_commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id)
size_t dtype_size; /* Size of the datatype message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_commit)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(file);
HDassert(type);
@@ -462,7 +462,7 @@ H5Tcommitted(hid_t type_id)
H5T_t *type; /* Datatype to query */
htri_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tcommitted, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "i", type_id);
/* Check arguments */
@@ -493,7 +493,7 @@ htri_t
H5T_committed(const H5T_t *type)
{
/* Use no-init for efficiency */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_committed)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(type);
@@ -520,7 +520,7 @@ H5T_link(const H5T_t *type, int adjust, hid_t dxpl_id)
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_link, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(type);
HDassert(type->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
@@ -561,7 +561,7 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */
hid_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_API(H5Topen2, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("i", "i*si", loc_id, name, tapl_id);
/* Check args */
@@ -643,7 +643,7 @@ H5Tget_create_plist(hid_t dtype_id)
herr_t status; /* Generic status value */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_create_plist, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", dtype_id);
/* Check arguments */
@@ -707,7 +707,7 @@ H5T_open(const H5G_loc_t *loc, hid_t dxpl_id)
H5T_t *dt = NULL;
H5T_t *ret_value;
- FUNC_ENTER_NOAPI(H5T_open, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(loc);
@@ -823,7 +823,7 @@ H5T_open_oid(const H5G_loc_t *loc, hid_t dxpl_id)
H5T_t *dt = NULL; /* Datatype from the file */
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_open_oid)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(loc);
@@ -876,7 +876,7 @@ done:
herr_t
H5T_update_shared(H5T_t *dt)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_update_shared)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 48192d2..e7142e5 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -93,7 +93,7 @@ DESCRIPTION
static herr_t
H5T_init_compound_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_compound_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_compound_interface() */
@@ -125,7 +125,7 @@ H5Tget_member_offset(hid_t type_id, unsigned membno)
H5T_t *dt; /* Datatype to query */
size_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_member_offset, 0)
+ FUNC_ENTER_API(0)
H5TRACE2("z", "iIu", type_id, membno);
/* Check args */
@@ -164,7 +164,7 @@ done:
size_t
H5T_get_member_offset(const H5T_t *dt, unsigned membno)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_get_member_offset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
HDassert(membno < dt->shared->u.compnd.nmembs);
@@ -195,7 +195,7 @@ H5Tget_member_class(hid_t type_id, unsigned membno)
H5T_t *dt; /* Datatype to query */
H5T_class_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_member_class, H5T_NO_CLASS)
+ FUNC_ENTER_API(H5T_NO_CLASS)
H5TRACE2("Tt", "iIu", type_id, membno);
/* Check args */
@@ -239,7 +239,7 @@ H5Tget_member_type(hid_t type_id, unsigned membno)
H5T_t *memb_dt = NULL; /* Member datatype */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_member_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "iIu", type_id, membno);
/* Check args */
@@ -283,7 +283,7 @@ H5T_get_member_type(const H5T_t *dt, unsigned membno, H5T_copy_t method)
{
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_member_type, NULL)
+ FUNC_ENTER_NOAPI(NULL)
HDassert(dt);
HDassert(membno < dt->shared->u.compnd.nmembs);
@@ -313,7 +313,7 @@ done:
size_t
H5T_get_member_size(const H5T_t *dt, unsigned membno)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_get_member_size)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
HDassert(membno < dt->shared->u.compnd.nmembs);
@@ -354,7 +354,7 @@ H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id)
H5T_t *member; /* The member datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tinsert, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*szi", parent_id, name, offset, member_id);
/* Check args */
@@ -399,7 +399,7 @@ H5Tpack(hid_t type_id)
H5T_t *dt; /* Datatype to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tpack, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", type_id);
/* Check args */
@@ -438,7 +438,7 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* check args */
HDassert(parent && H5T_COMPOUND == parent->shared->type);
@@ -530,7 +530,7 @@ H5T_pack(const H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_pack)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(dt);
@@ -607,7 +607,7 @@ H5T_is_packed(const H5T_t *dt)
{
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_is_packed)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
@@ -646,7 +646,7 @@ H5T_update_packed(const H5T_t *dt)
{
unsigned i; /* Index */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_update_packed)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(dt);
HDassert(dt->shared->type == H5T_COMPOUND);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 927a9dc..6795ef1 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -601,7 +601,13 @@
}
/* The main part of every integer hardware conversion macro */
-#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX) \
+{ \
+ herr_t ret_value=SUCCEED; /* Return value */ \
+ \
+ FUNC_ENTER_NOAPI(FAIL) \
+ \
+{ \
size_t elmtno; /*element number */ \
size_t sprec; /*source precision */ \
size_t dprec; /*destination precision */ \
@@ -745,6 +751,10 @@
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
"unknown conversion command"); \
} \
+} \
+ \
+done: \
+ FUNC_LEAVE_NOAPI(ret_value) \
}
/* Macro defining action on source data which needs to be aligned (before main action) */
@@ -955,7 +965,7 @@ DESCRIPTION
static herr_t
H5T_init_conv_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_conv_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_conv_interface() */
@@ -982,7 +992,7 @@ H5T_conv_noop(hid_t UNUSED src_id, hid_t UNUSED dst_id, H5T_cdata_t *cdata,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_noop, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -1035,7 +1045,7 @@ H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_order_opt, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -1443,7 +1453,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t j, md;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_order, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -1548,7 +1558,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
hbool_t reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_b_b, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -1774,7 +1784,7 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
*dst_memb_id = priv->dst_memb_id;
unsigned i;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_conv_struct_free)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
for(i = 0; i < priv->src_nmembs; i++)
if(src2dst[i] >= 0) {
@@ -1852,7 +1862,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, hid_t dxpl_id)
unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_conv_struct_init)
+ FUNC_ENTER_NOAPI_NOINIT
src_nmembs = src->shared->u.compnd.nmembs;
dst_nmembs = dst->shared->u.compnd.nmembs;
@@ -2017,7 +2027,7 @@ H5T_conv_struct_subset(const H5T_cdata_t *cdata)
{
H5T_conv_struct_t *priv;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_conv_struct_subset)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(cdata);
HDassert(cdata->priv);
@@ -2088,7 +2098,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_struct, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -2338,7 +2348,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_struct_opt, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -2570,7 +2580,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_conv_enum_init)
+ FUNC_ENTER_NOAPI_NOINIT
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
@@ -2614,6 +2624,15 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* a native integer type as an index into the `val2dst'. The values of
* that array are the index numbers in the destination type or negative
* if the entry is unused.
+ *
+ * (This optimized algorithm doesn't work when the byte orders are different.
+ * The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));"
+ * can change the value significantly. i.g. if the source value is big-endian 0x0000000f,
+ * executing the casting on little-endian machine will get a big number 0x0f000000.
+ * Then it can't meet the condition
+ * "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)"
+ * Because this is the optimized code, we won't fix it. It should still work in some
+ * situations. SLU - 2011/5/24)
*/
if (1==src->shared->size || sizeof(short)==src->shared->size || sizeof(int)==src->shared->size) {
for (i=0; i<src->shared->u.enumer.nmembs; i++) {
@@ -2690,13 +2709,6 @@ done:
*
* Programmer: Robb Matzke
* Monday, January 4, 1999
- *
- * Modifications:
- * Robb Matzke, 1999-06-16
- * Added support for non-zero strides. If BUF_STRIDE is non-zero
- * then convert one value at each memory location advancing
- * BUF_STRIDE bytes each time; otherwise assume both source and
- * destination values are packed.
*-------------------------------------------------------------------------
*/
herr_t
@@ -2706,6 +2718,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
{
uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
+ H5T_t *src_super = NULL, *dst_super = NULL; /*parent types for src and dst*/
uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
int src_delta, dst_delta; /*conversion strides */
int n; /*src value cast as native int */
@@ -2716,7 +2729,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_enum, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -2796,6 +2809,12 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
for(i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) {
if(priv->length) {
/* Use O(1) lookup */
+ /* (The casting won't work when the byte orders are different. i.g. if the source value
+ * is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big
+ * number 0x0f000000 on little-endian machine. But we won't fix it because it's an
+ * optimization code. Please also see the comment in the H5T_conv_enum_init() function.
+ * SLU - 2011/5/24)
+ */
if(1 == src->shared->size)
n = *((signed char*)s);
else if(sizeof(short) == src->shared->size)
@@ -2856,6 +2875,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end else */
}
}
+
break;
default:
@@ -2903,6 +2923,9 @@ done:
* old data. At this moment, it only frees the first level of
* VL datatype. It doesn't handle nested VL datatypes.
*
+ * Raymond Lu, 8 November 2011
+ * I put a condition check to prevent the conversion of VL strings
+ * between ASCII and UTF8.
*-------------------------------------------------------------------------
*/
herr_t
@@ -2936,7 +2959,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_vlen, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -2953,6 +2976,11 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
if(H5T_VLEN != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype")
+ if(H5T_VLEN_STRING == src->shared->u.vlen.type && H5T_VLEN_STRING == dst->shared->u.vlen.type) {
+ if((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset)
+ || (H5T_CSET_ASCII == dst->shared->u.vlen.cset && H5T_CSET_UTF8 == src->shared->u.vlen.cset))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
+ }
/* Variable-length types don't need a background buffer */
cdata->need_bkg = H5T_BKG_NO;
@@ -3239,7 +3267,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
void *bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_array, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch (cdata->command) {
case H5T_CONV_INIT:
@@ -3404,7 +3432,7 @@ H5T_conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
hbool_t reverse; /*if reverse the order of destination */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_i_i, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -3826,7 +3854,7 @@ H5T_conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
hbool_t reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI(H5T_conv_f_f, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -4350,6 +4378,10 @@ done:
* then convert one value at each memory location advancing
* BUF_STRIDE bytes each time; otherwise assume both source and
* destination values are packed.
+ *
+ * Raymond Lu, 8 November 2011
+ * I put a condition check to prevent the conversion of strings
+ * between ASCII and UTF8.
*-------------------------------------------------------------------------
*/
herr_t
@@ -4367,7 +4399,7 @@ H5T_conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_s_s, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -4381,6 +4413,9 @@ H5T_conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set")
if(H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != dst->shared->u.atomic.u.s.cset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set")
+ if((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset)
+ || (H5T_CSET_ASCII == dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == src->shared->u.atomic.u.s.cset))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The library doesn't convert between strings of ASCII and UTF")
if(src->shared->u.atomic.u.s.pad < 0 || src->shared->u.atomic.u.s.pad >= H5T_NPAD ||
dst->shared->u.atomic.u.s.pad < 0 || dst->shared->u.atomic.u.s.pad >= H5T_NPAD)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad character padding")
@@ -4582,14 +4617,7 @@ H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_uchar, FAIL)
-
H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4615,14 +4643,7 @@ H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_schar, FAIL)
-
H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4648,14 +4669,7 @@ H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_short, FAIL)
-
H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4681,14 +4695,7 @@ H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_ushort, FAIL)
-
H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4714,14 +4721,7 @@ H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_short, FAIL)
-
H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4747,14 +4747,7 @@ H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_ushort, FAIL)
-
H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4779,14 +4772,7 @@ H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_int, FAIL)
-
H5T_CONV_sS(SCHAR, INT, signed char, int, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4811,14 +4797,7 @@ H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_uint, FAIL)
-
H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4843,14 +4822,7 @@ H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_int, FAIL)
-
H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4875,14 +4847,7 @@ H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_uint, FAIL)
-
H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4907,14 +4872,7 @@ H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_long, FAIL)
-
H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4940,14 +4898,7 @@ H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_ulong, FAIL)
-
H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -4972,14 +4923,7 @@ H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_long, FAIL)
-
H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5005,14 +4949,7 @@ H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_ulong, FAIL)
-
H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5038,14 +4975,7 @@ H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_llong, FAIL)
-
H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5071,14 +5001,7 @@ H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_ullong, FAIL)
-
H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5104,14 +5027,7 @@ H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_llong, FAIL)
-
H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5137,14 +5053,7 @@ H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_ullong, FAIL)
-
H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5170,14 +5079,7 @@ H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_schar, FAIL)
-
H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5203,14 +5105,7 @@ H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_uchar, FAIL)
-
H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5236,14 +5131,7 @@ H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_schar, FAIL)
-
H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5269,14 +5157,7 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_uchar, FAIL)
-
H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5302,14 +5183,7 @@ H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_ushort, FAIL)
-
H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5335,14 +5209,7 @@ H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_short, FAIL)
-
H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5368,14 +5235,7 @@ H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_int, FAIL)
-
H5T_CONV_sS(SHORT, INT, short, int, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5401,14 +5261,7 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_uint, FAIL)
-
H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5434,14 +5287,7 @@ H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_int, FAIL)
-
H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5467,14 +5313,7 @@ H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_uint, FAIL)
-
H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5500,14 +5339,7 @@ H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_long, FAIL)
-
H5T_CONV_sS(SHORT, LONG, short, long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5533,14 +5365,7 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_ulong, FAIL)
-
H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5566,14 +5391,7 @@ H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_long, FAIL)
-
H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5599,14 +5417,7 @@ H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_ulong, FAIL)
-
H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5632,14 +5443,7 @@ H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_llong, FAIL)
-
H5T_CONV_sS(SHORT, LLONG, short, long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5665,14 +5469,7 @@ H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_ullong, FAIL)
-
H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5698,14 +5495,7 @@ H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_llong, FAIL)
-
H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5731,14 +5521,7 @@ H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_ullong, FAIL)
-
H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5764,14 +5547,7 @@ H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_schar, FAIL)
-
H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5797,14 +5573,7 @@ H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_uchar, FAIL)
-
H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5830,14 +5599,7 @@ H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_schar, FAIL)
-
H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5863,14 +5625,7 @@ H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_uchar, FAIL)
-
H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5896,14 +5651,7 @@ H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_short, FAIL)
-
H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5929,14 +5677,7 @@ H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_ushort, FAIL)
-
H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5962,14 +5703,7 @@ H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_short, FAIL)
-
H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -5995,14 +5729,7 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_ushort, FAIL)
-
H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6027,14 +5754,7 @@ H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_uint, FAIL)
-
H5T_CONV_su(INT, UINT, int, unsigned, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6059,14 +5779,7 @@ H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_int, FAIL)
-
H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6091,14 +5804,7 @@ H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_long, FAIL)
-
H5T_CONV_sS(INT, LONG, int, long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6123,14 +5829,7 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_ulong, FAIL)
-
H5T_CONV_sU(INT, LONG, int, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6155,14 +5854,7 @@ H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_long, FAIL)
-
H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6187,14 +5879,7 @@ H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_ulong, FAIL)
-
H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6219,14 +5904,7 @@ H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_llong, FAIL)
-
H5T_CONV_sS(INT, LLONG, int, long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6251,14 +5929,7 @@ H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_ullong, FAIL)
-
H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6283,14 +5954,7 @@ H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_llong, FAIL)
-
H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6316,14 +5980,7 @@ H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_ullong, FAIL)
-
H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6348,14 +6005,7 @@ H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_schar, FAIL)
-
H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6380,14 +6030,7 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_uchar, FAIL)
-
H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6413,14 +6056,7 @@ H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_schar, FAIL)
-
H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6446,14 +6082,7 @@ H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_uchar, FAIL)
-
H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6478,14 +6107,7 @@ H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_short, FAIL)
-
H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6511,14 +6133,7 @@ H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_ushort, FAIL)
-
H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6543,14 +6158,7 @@ H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_short, FAIL)
-
H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6576,14 +6184,7 @@ H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_ushort, FAIL)
-
H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6608,14 +6209,7 @@ H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_int, FAIL)
-
H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6640,14 +6234,7 @@ H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_uint, FAIL)
-
H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6672,14 +6259,7 @@ H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_int, FAIL)
-
H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6704,14 +6284,7 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_uint, FAIL)
-
H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6736,14 +6309,7 @@ H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_ulong, FAIL)
-
H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6768,14 +6334,7 @@ H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_long, FAIL)
-
H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6800,14 +6359,7 @@ H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_llong, FAIL)
-
H5T_CONV_sS(LONG, LLONG, long, long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6833,14 +6385,7 @@ H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_ullong, FAIL)
-
H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6866,14 +6411,7 @@ H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_llong, FAIL)
-
H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6899,14 +6437,7 @@ H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_ullong, FAIL)
-
H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6932,14 +6463,7 @@ H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_schar, FAIL)
-
H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6965,14 +6489,7 @@ H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_uchar, FAIL)
-
H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -6998,14 +6515,7 @@ H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_schar, FAIL)
-
H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7031,14 +6541,7 @@ H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_uchar, FAIL)
-
H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7064,14 +6567,7 @@ H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_short, FAIL)
-
H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7097,14 +6593,7 @@ H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_ushort, FAIL)
-
H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7130,14 +6619,7 @@ H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_short, FAIL)
-
H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7163,14 +6645,7 @@ H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_ushort, FAIL)
-
H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7195,14 +6670,7 @@ H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_int, FAIL)
-
H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7227,14 +6695,7 @@ H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_uint, FAIL)
-
H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7259,14 +6720,7 @@ H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_int, FAIL)
-
H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7292,14 +6746,7 @@ H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_uint, FAIL)
-
H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7324,14 +6771,7 @@ H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride,
void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_long, FAIL)
-
H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7357,14 +6797,7 @@ H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_ulong, FAIL)
-
H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7390,14 +6823,7 @@ H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_long, FAIL)
-
H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7423,14 +6849,7 @@ H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_ulong, FAIL)
-
H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7456,14 +6875,7 @@ H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_ullong, FAIL)
-
H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7489,14 +6901,7 @@ H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_llong, FAIL)
-
H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7526,14 +6931,7 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_double, FAIL)
-
H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_FP_FP */
@@ -7560,14 +6958,7 @@ H5T_conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_ldouble, FAIL)
-
H5T_CONV_fF(FLOAT, LDOUBLE, float, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_LDOUBLE*/
@@ -7601,14 +6992,7 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_float, FAIL)
-
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_FP*/
@@ -7635,15 +7019,7 @@ H5T_conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_ldouble, FAIL)
-
H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -);
-
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_LDOUBLE*/
@@ -7670,14 +7046,7 @@ H5T_conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_float, FAIL)
-
H5T_CONV_Ff(LDOUBLE, FLOAT, long double, float, -FLT_MAX, FLT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_FP_LDOUBLE */
@@ -7704,14 +7073,7 @@ H5T_conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_double, FAIL)
-
H5T_CONV_Ff(LDOUBLE, DOUBLE, long double, double, -DBL_MAX, DBL_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_LDOUBLE*/
@@ -7737,14 +7099,7 @@ H5T_conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_float, FAIL)
-
H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7769,14 +7124,7 @@ H5T_conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_double, FAIL)
-
H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7802,14 +7150,7 @@ H5T_conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_schar_ldouble, FAIL)
-
H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -7835,14 +7176,7 @@ H5T_conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_float, FAIL)
-
H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7867,14 +7201,7 @@ H5T_conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_double, FAIL)
-
H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7900,14 +7227,7 @@ H5T_conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uchar_ldouble, FAIL)
-
H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -7933,14 +7253,7 @@ H5T_conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_float, FAIL)
-
H5T_CONV_xF(SHORT, FLOAT, short, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7965,14 +7278,7 @@ H5T_conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_double, FAIL)
-
H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -7998,14 +7304,7 @@ H5T_conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_short_ldouble, FAIL)
-
H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -8031,14 +7330,7 @@ H5T_conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_float, FAIL)
-
H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8063,14 +7355,7 @@ H5T_conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_double, FAIL)
-
H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8096,14 +7381,7 @@ H5T_conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ushort_ldouble, FAIL)
-
H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -8129,14 +7407,7 @@ H5T_conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_float, FAIL)
-
H5T_CONV_xF(INT, FLOAT, int, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8161,14 +7432,7 @@ H5T_conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_double, FAIL)
-
H5T_CONV_xF(INT, DOUBLE, int, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8194,14 +7458,7 @@ H5T_conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_int_ldouble, FAIL)
-
H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -8227,14 +7484,7 @@ H5T_conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_float, FAIL)
-
H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8259,14 +7509,7 @@ H5T_conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_double, FAIL)
-
H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8292,14 +7535,7 @@ H5T_conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_uint_ldouble, FAIL)
-
H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -8325,14 +7561,7 @@ H5T_conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_float, FAIL)
-
H5T_CONV_xF(LONG, FLOAT, long, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8357,14 +7586,7 @@ H5T_conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_double, FAIL)
-
H5T_CONV_xF(LONG, DOUBLE, long, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8390,14 +7612,7 @@ H5T_conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_long_ldouble, FAIL)
-
H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
@@ -8424,14 +7639,7 @@ H5T_conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_float, FAIL)
-
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_ULONG_FLT */
@@ -8458,14 +7666,7 @@ H5T_conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_double, FAIL)
-
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_ULONG_DBL */
@@ -8492,14 +7693,7 @@ H5T_conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ulong_ldouble, FAIL)
-
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_ULONG_LDOUBLE */
@@ -8525,14 +7719,7 @@ H5T_conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_float, FAIL)
-
H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8557,14 +7744,7 @@ H5T_conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_double, FAIL)
-
H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8590,14 +7770,7 @@ H5T_conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_llong_ldouble, FAIL)
-
H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
@@ -8624,14 +7797,7 @@ H5T_conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_float, FAIL)
-
H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_ULLONG_FP*/
@@ -8658,14 +7824,7 @@ H5T_conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_double, FAIL)
-
H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_ULLONG_FP*/
@@ -8692,14 +7851,7 @@ H5T_conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ullong_ldouble, FAIL)
-
H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
@@ -8725,14 +7877,7 @@ H5T_conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_schar, FAIL)
-
H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8757,14 +7902,7 @@ H5T_conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_uchar, FAIL)
-
H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8789,14 +7927,7 @@ H5T_conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_schar, FAIL)
-
H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8821,14 +7952,7 @@ H5T_conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_uchar, FAIL)
-
H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8854,14 +7978,7 @@ H5T_conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_schar, FAIL)
-
H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@@ -8888,14 +8005,7 @@ H5T_conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_uchar, FAIL)
-
H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@@ -8921,14 +8031,7 @@ H5T_conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_short, FAIL)
-
H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8953,14 +8056,7 @@ H5T_conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_ushort, FAIL)
-
H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -8985,14 +8081,7 @@ H5T_conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_short, FAIL)
-
H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9017,14 +8106,7 @@ H5T_conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_ushort, FAIL)
-
H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9050,14 +8132,7 @@ H5T_conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_short, FAIL)
-
H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/
@@ -9084,14 +8159,7 @@ H5T_conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_ushort, FAIL)
-
H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@@ -9117,14 +8185,7 @@ H5T_conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_int, FAIL)
-
H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9149,14 +8210,7 @@ H5T_conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_uint, FAIL)
-
H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9181,14 +8235,7 @@ H5T_conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_int, FAIL)
-
H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9213,14 +8260,7 @@ H5T_conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_uint, FAIL)
-
H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9246,14 +8286,7 @@ H5T_conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_int, FAIL)
-
H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@@ -9280,14 +8313,7 @@ H5T_conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_uint, FAIL)
-
H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */
@@ -9313,14 +8339,7 @@ H5T_conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_long, FAIL)
-
H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9345,14 +8364,7 @@ H5T_conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_ulong, FAIL)
-
H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9377,14 +8389,7 @@ H5T_conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_long, FAIL)
-
H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9409,14 +8414,7 @@ H5T_conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_ulong, FAIL)
-
H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
@@ -9442,14 +8440,7 @@ H5T_conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_long, FAIL)
-
H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_INTEGER*/
@@ -9476,14 +8467,7 @@ H5T_conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_ulong, FAIL)
-
H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
@@ -9510,14 +8494,7 @@ H5T_conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_llong, FAIL)
-
H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /* H5T_CONV_INTERNAL_FP_LLONG */
@@ -9544,14 +8521,7 @@ H5T_conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_float_ullong, FAIL)
-
H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_ULLONG*/
@@ -9578,14 +8548,7 @@ H5T_conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_llong, FAIL)
-
H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_LLONG*/
@@ -9612,14 +8575,7 @@ H5T_conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_double_ullong, FAIL)
-
H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_FP_ULLONG*/
@@ -9646,14 +8602,7 @@ H5T_conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_llong, FAIL)
-
H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
@@ -9680,14 +8629,7 @@ H5T_conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t dxpl_id)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5T_conv_ldouble_ullong, FAIL)
-
H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
@@ -9751,7 +8693,7 @@ H5T_conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_conv_ret_t except_ret; /*return of callback function */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_f_i, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -10340,7 +9282,7 @@ H5T_conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
hbool_t reverse; /*if reverse the order of destination */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_i_f, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
switch(cdata->command) {
case H5T_CONV_INIT:
@@ -10735,7 +9677,7 @@ H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
{
size_t i;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_reverse_order)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(s);
assert(size);
diff --git a/src/H5Tcset.c b/src/H5Tcset.c
index 4ec58ab..33fb32a 100644
--- a/src/H5Tcset.c
+++ b/src/H5Tcset.c
@@ -46,7 +46,7 @@ DESCRIPTION
static herr_t
H5T_init_cset_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_cset_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_cset_interface() */
@@ -78,7 +78,7 @@ H5Tget_cset(hid_t type_id)
H5T_t *dt;
H5T_cset_t ret_value;
- FUNC_ENTER_API(H5Tget_cset, H5T_CSET_ERROR)
+ FUNC_ENTER_API(H5T_CSET_ERROR)
H5TRACE1("Tc", "i", type_id);
/* Check args */
@@ -124,7 +124,7 @@ H5Tset_cset(hid_t type_id, H5T_cset_t cset)
H5T_t *dt;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_cset, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTc", type_id, cset);
/* Check args */
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index 92ab674..c161f9f 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -109,7 +109,7 @@ H5T_print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/)
char bandwidth[32];
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_print_stats)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifdef H5T_DEBUG
if(H5DEBUG(T) && path->stats.ncalls > 0) {
@@ -166,7 +166,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
const char *s1 = "", *s2 = "";
unsigned i;
- FUNC_ENTER_NOAPI_NOFUNC(H5T_debug)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(dt);
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index b3bd298..32080fe 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -101,7 +101,7 @@ DESCRIPTION
static herr_t
H5T_init_deprec_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_deprec_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_deprec_interface() */
@@ -129,7 +129,7 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
H5T_t *type; /* Datatype for ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tcommit1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*si", loc_id, name, type_id);
/* Check arguments */
@@ -141,7 +141,7 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Commit the datatype to the file, using default property list values */
- if(H5T_commit_named(&loc, name, type, H5P_LINK_CREATE_DEFAULT,
+ if(H5T__commit_named(&loc, name, type, H5P_LINK_CREATE_DEFAULT,
H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
@@ -179,7 +179,7 @@ H5Topen1(hid_t loc_id, const char *name)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */
hid_t ret_value = FAIL;
- FUNC_ENTER_API(H5Topen1, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 8ef88f5..1e3d760 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -53,7 +53,7 @@ DESCRIPTION
static herr_t
H5T_init_enum_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_enum_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_enum_interface() */
@@ -83,7 +83,7 @@ H5Tenum_create(hid_t parent_id)
H5T_t *dt = NULL; /*new enumeration data type */
hid_t ret_value; /*return value */
- FUNC_ENTER_API(H5Tenum_create, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", parent_id);
/* Check args */
@@ -125,7 +125,7 @@ H5T_enum_create(const H5T_t *parent)
{
H5T_t *ret_value; /*new enumeration data type */
- FUNC_ENTER_NOAPI(H5T_enum_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(parent);
@@ -169,7 +169,7 @@ H5Tenum_insert(hid_t type, const char *name, const void *value)
H5T_t *dt=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tenum_insert, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*s*x", type, name, value);
/* Check args */
@@ -218,7 +218,7 @@ H5T_enum_insert(const H5T_t *dt, const char *name, const void *value)
uint8_t *values=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_enum_insert, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
assert(name && *name);
@@ -280,7 +280,7 @@ H5Tget_member_value(hid_t type, unsigned membno, void *value/*out*/)
H5T_t *dt=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tget_member_value, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iIux", type, membno, value);
if(NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE)))
@@ -322,7 +322,7 @@ H5T_get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_member_value, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(dt);
assert(value);
@@ -363,7 +363,7 @@ H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/, size_t size)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tenum_nameof, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*xxz", type, value, name, size);
/* Check args */
@@ -421,7 +421,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
hbool_t alloc_name = FALSE; /* Whether name has been allocated */
char *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_enum_nameof)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(dt && H5T_ENUM == dt->shared->type);
@@ -512,7 +512,7 @@ H5Tenum_valueof(hid_t type, const char *name, void *value/*out*/)
H5T_t *dt;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tenum_valueof, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*sx", type, name, value);
/* Check args */
@@ -563,7 +563,7 @@ H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
H5T_t *copied_dt = NULL; /*do sorting in copied datatype */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_enum_valueof)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
assert(dt && H5T_ENUM==dt->shared->type);
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 43f1369..a208f75 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -47,7 +47,7 @@ DESCRIPTION
static herr_t
H5T_init_fields_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_fields_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_fields_interface() */
@@ -79,7 +79,7 @@ H5Tget_nmembers(hid_t type_id)
H5T_t *dt; /* Datatype to query */
int ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_nmembers, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("Is", "i", type_id);
/* Check args */
@@ -119,7 +119,7 @@ H5T_get_nmembers(const H5T_t *dt)
{
int ret_value;
- FUNC_ENTER_NOAPI(H5T_get_nmembers, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(dt);
@@ -162,7 +162,7 @@ H5Tget_member_name(hid_t type_id, unsigned membno)
H5T_t *dt = NULL;
char *ret_value;
- FUNC_ENTER_API(H5Tget_member_name, NULL)
+ FUNC_ENTER_API(NULL)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
@@ -200,7 +200,7 @@ H5T_get_member_name(H5T_t const *dt, unsigned membno)
{
char *ret_value;
- FUNC_ENTER_NOAPI(H5T_get_member_name, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(dt);
@@ -251,7 +251,7 @@ H5Tget_member_index(hid_t type_id, const char *name)
int ret_value=FAIL;
unsigned i;
- FUNC_ENTER_API(H5Tget_member_index, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("Is", "i*s", type_id, name);
/* Check arguments */
@@ -308,7 +308,7 @@ H5T_sort_value(const H5T_t *dt, int *map)
unsigned i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_sort_value, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(dt);
@@ -413,7 +413,7 @@ H5T_sort_name(const H5T_t *dt, int *map)
uint8_t tbuf[32];
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_sort_name, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(dt);
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index 770293a..51737eb 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -46,7 +46,7 @@ DESCRIPTION
static herr_t
H5T_init_fixed_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_fixed_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_fixed_interface() */
@@ -75,7 +75,7 @@ H5Tget_sign(hid_t type_id)
H5T_t *dt = NULL;
H5T_sign_t ret_value;
- FUNC_ENTER_API(H5Tget_sign, H5T_SGN_ERROR)
+ FUNC_ENTER_API(H5T_SGN_ERROR)
H5TRACE1("Ts", "i", type_id);
/* Check args */
@@ -111,7 +111,7 @@ H5T_get_sign(H5T_t const *dt)
{
H5T_sign_t ret_value;
- FUNC_ENTER_NOAPI(H5T_get_sign, H5T_SGN_ERROR)
+ FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
assert(dt);
@@ -154,7 +154,7 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_sign, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTs", type_id, sign);
/* Check args */
diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c
index 88d13fd..7d08d62 100644
--- a/src/H5Tfloat.c
+++ b/src/H5Tfloat.c
@@ -46,7 +46,7 @@ DESCRIPTION
static herr_t
H5T_init_float_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_float_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_float_interface() */
@@ -79,7 +79,7 @@ size_t *esize/*out*/, size_t *mpos/*out*/, size_t *msize/*out*/)
H5T_t *dt; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tget_fields, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "ixxxxx", type_id, spos, epos, esize, mpos, msize);
/* Check args */
@@ -132,7 +132,7 @@ H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize,
H5T_t *dt; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_fields, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE6("e", "izzzzz", type_id, spos, epos, esize, mpos, msize);
/* Check args */
@@ -191,7 +191,7 @@ H5Tget_ebias(hid_t type_id)
H5T_t *dt; /* Datatype */
size_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_ebias, 0)
+ FUNC_ENTER_API(0)
H5TRACE1("z", "i", type_id);
/* Check args */
@@ -232,7 +232,7 @@ H5Tset_ebias(hid_t type_id, size_t ebias)
H5T_t *dt; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_ebias, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", type_id, ebias);
/* Check args */
@@ -274,7 +274,7 @@ H5Tget_norm(hid_t type_id)
H5T_t *dt; /* Datatype */
H5T_norm_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_norm, H5T_NORM_ERROR)
+ FUNC_ENTER_API(H5T_NORM_ERROR)
H5TRACE1("Tn", "i", type_id);
/* Check args */
@@ -312,7 +312,7 @@ H5Tset_norm(hid_t type_id, H5T_norm_t norm)
H5T_t *dt; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_norm, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTn", type_id, norm);
/* Check args */
@@ -358,7 +358,7 @@ H5Tget_inpad(hid_t type_id)
H5T_t *dt; /* Datatype */
H5T_pad_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_inpad, H5T_PAD_ERROR)
+ FUNC_ENTER_API(H5T_PAD_ERROR)
H5TRACE1("Tp", "i", type_id);
/* Check args */
@@ -398,7 +398,7 @@ H5Tset_inpad(hid_t type_id, H5T_pad_t pad)
H5T_t *dt; /* Datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_inpad, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTp", type_id, pad);
/* Check args */
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 3699757..50bb96e 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -60,7 +60,7 @@ DESCRIPTION
static herr_t
H5T_init_native_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_native_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_native_interface() */
@@ -104,7 +104,7 @@ H5Tget_native_type(hid_t type_id, H5T_direction_t direction)
size_t comp_size=0; /* Compound datatype's size */
hid_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_native_type, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("i", "iTd", type_id, direction);
/* check argument */
@@ -170,7 +170,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
unsigned u; /* Local index variable */
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_native_type, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(dtype);
@@ -568,7 +568,7 @@ H5T_get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
} match = H5T_NATIVE_INT_MATCH_UNKNOWN;
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_native_integer, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if(prec <= H5Tget_precision(H5T_NATIVE_SCHAR)) {
@@ -708,7 +708,7 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
} match=H5T_NATIVE_FLOAT_MATCH_UNKNOWN;
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_native_float, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(size>0);
@@ -826,7 +826,7 @@ H5T_get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_a
size_t native_size=0; /* Datatype size of the native type */
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_native_bitfield, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if(prec<=H5Tget_precision(H5T_NATIVE_B8)) {
@@ -909,7 +909,7 @@ H5T_cmp_offset(size_t *comp_size, size_t *offset, size_t elem_size,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5T_cmp_offset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(offset && comp_size) {
if(align>1 && *comp_size%align) {
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index 17351f4..bea8d2b 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -49,7 +49,7 @@ DESCRIPTION
static herr_t
H5T_init_offset_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_offset_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_offset_interface() */
@@ -90,7 +90,7 @@ H5Tget_offset(hid_t type_id)
H5T_t *dt;
int ret_value;
- FUNC_ENTER_API(H5Tget_offset, -1)
+ FUNC_ENTER_API(-1)
H5TRACE1("Is", "i", type_id);
/* Check args */
@@ -140,7 +140,7 @@ H5T_get_offset(const H5T_t *dt)
{
int ret_value;
- FUNC_ENTER_NOAPI(H5T_get_offset, -1)
+ FUNC_ENTER_NOAPI(-1)
/* Defer to parent*/
while(dt->shared->parent)
@@ -201,7 +201,7 @@ H5Tset_offset(hid_t type_id, size_t offset)
H5T_t *dt;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_offset, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", type_id, offset);
/* Check args */
@@ -269,7 +269,7 @@ H5T_set_offset(const H5T_t *dt, size_t offset)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_set_offset, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(dt);
diff --git a/src/H5Toh.c b/src/H5Toh.c
index 886acc1..5878075 100644
--- a/src/H5Toh.c
+++ b/src/H5Toh.c
@@ -98,12 +98,12 @@ const H5O_obj_class_t H5O_OBJ_DATATYPE[1] = {{
*
*-------------------------------------------------------------------------
*/
-htri_t
+static htri_t
H5O_dtype_isa(struct H5O_t *oh)
{
htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_isa, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(oh);
@@ -134,7 +134,7 @@ H5O_dtype_open(const H5G_loc_t *obj_loc, hid_t UNUSED lapl_id, hid_t dxpl_id, hb
H5T_t *type = NULL; /* Datatype opened */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_open)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(obj_loc);
@@ -174,7 +174,7 @@ H5O_dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
H5T_obj_create_t *crt_info = (H5T_obj_create_t *)_crt_info; /* Named datatype creation parameters */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
HDassert(f);
@@ -218,7 +218,7 @@ H5O_dtype_get_oloc(hid_t obj_id)
H5T_t *type; /* Datatype opened */
H5O_loc_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_get_oloc)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the datatype */
if(NULL == (type = (H5T_t *)H5I_object(obj_id)))
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index 0e137ac..d68e659 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -47,7 +47,7 @@ DESCRIPTION
static herr_t
H5T_init_opaque_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_opaque_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_opaque_interface() */
@@ -73,7 +73,7 @@ H5Tset_tag(hid_t type_id, const char *tag)
H5T_t *dt=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_tag, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*s", type_id, tag);
/* Check args */
@@ -120,7 +120,7 @@ H5Tget_tag(hid_t type_id)
H5T_t *dt=NULL;
char *ret_value;
- FUNC_ENTER_API(H5Tget_tag, NULL)
+ FUNC_ENTER_API(NULL)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
diff --git a/src/H5Torder.c b/src/H5Torder.c
index 590a6c7..35be454 100644
--- a/src/H5Torder.c
+++ b/src/H5Torder.c
@@ -94,7 +94,7 @@ DESCRIPTION
static herr_t
H5T_init_order_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_order_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_order_interface() */
@@ -121,7 +121,7 @@ H5Tget_order(hid_t type_id)
H5T_t *dt; /* Datatype to query */
H5T_order_t ret_value; /* Return value */
- FUNC_ENTER_API(H5Tget_order, H5T_ORDER_ERROR)
+ FUNC_ENTER_API(H5T_ORDER_ERROR)
H5TRACE1("To", "i", type_id);
/* Check args */
@@ -155,7 +155,7 @@ H5T_get_order(const H5T_t *dtype)
{
H5T_order_t ret_value = H5T_ORDER_NONE; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_order, H5T_ORDER_ERROR)
+ FUNC_ENTER_NOAPI(H5T_ORDER_ERROR)
/* Defer to parent */
while(dtype->shared->parent)
@@ -228,7 +228,7 @@ H5Tset_order(hid_t type_id, H5T_order_t order)
H5T_t *dt; /* Datatype to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_order, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTo", type_id, order);
/* Check args */
@@ -265,7 +265,7 @@ H5T_set_order(H5T_t *dtype, H5T_order_t order)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_set_order, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(H5T_ENUM == dtype->shared->type && dtype->shared->u.enumer.nmembs > 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined")
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index eee2ab3..88a5e13 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -46,7 +46,7 @@ DESCRIPTION
static herr_t
H5T_init_pad_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_pad_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_pad_interface() */
@@ -76,7 +76,7 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tget_pad, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", type_id, lsb, msb);
/* Check args */
@@ -120,7 +120,7 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_pad, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE3("e", "iTpTp", type_id, lsb, msb);
/* Check args */
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 0ec9632..f25fb1e 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -513,7 +513,7 @@ H5FL_EXTERN(H5T_shared_t);
/* Common functions */
H5_DLL H5T_t *H5T_create(H5T_class_t type, size_t size);
H5_DLL herr_t H5T_commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id);
-H5_DLL herr_t H5T_commit_named(const H5G_loc_t *loc, const char *name,
+H5_DLL herr_t H5T__commit_named(const H5G_loc_t *loc, const char *name,
H5T_t *dt, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id);
H5_DLL H5T_t *H5T_alloc(void);
H5_DLL herr_t H5T_free(H5T_t *dt);
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 62493e9..c5ac186 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -49,7 +49,7 @@ DESCRIPTION
static herr_t
H5T_init_precis_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_precis_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_precis_interface() */
@@ -83,7 +83,7 @@ H5Tget_precision(hid_t type_id)
H5T_t *dt;
size_t ret_value;
- FUNC_ENTER_API(H5Tget_precision, 0)
+ FUNC_ENTER_API(0)
H5TRACE1("z", "i", type_id);
/* Check args */
@@ -121,7 +121,7 @@ H5T_get_precision(const H5T_t *dt)
{
size_t ret_value;
- FUNC_ENTER_NOAPI(H5T_get_precision, 0)
+ FUNC_ENTER_NOAPI(0)
/* Defer to parent*/
while(dt->shared->parent)
@@ -172,7 +172,7 @@ H5Tset_precision(hid_t type_id, size_t prec)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_precision, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iz", type_id, prec);
/* Check args */
@@ -233,7 +233,7 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
size_t offset, size;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_set_precision, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(dt);
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index c70eea0..0c96896 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -135,6 +135,7 @@ H5_DLL htri_t H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc);
H5_DLL htri_t H5T_is_sensible(const H5T_t *dt);
H5_DLL uint32_t H5T_hash(H5F_t * file, const H5T_t *dt);
H5_DLL herr_t H5T_set_latest_version(H5T_t *dt);
+H5_DLL herr_t H5T_patch_file(H5T_t *dt, H5F_t *f);
H5_DLL htri_t H5T_is_variable_str(const H5T_t *dt);
/* Reference specific functions */
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index 6dc79a1..e8ac4f5 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -46,7 +46,7 @@ DESCRIPTION
static herr_t
H5T_init_strpad_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_strpad_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_strpad_interface() */
@@ -79,7 +79,7 @@ H5Tget_strpad(hid_t type_id)
H5T_t *dt = NULL;
H5T_str_t ret_value;
- FUNC_ENTER_API(H5Tget_strpad, H5T_STR_ERROR)
+ FUNC_ENTER_API(H5T_STR_ERROR)
H5TRACE1("Tz", "i", type_id);
/* Check args */
@@ -136,7 +136,7 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad)
H5T_t *dt = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Tset_strpad, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTz", type_id, strpad);
/* Check args */
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index 44e06fe..a1843ef 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -101,7 +101,7 @@ H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
hbool_t is_complex; /* Flag indicating current datatype is "complex" */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_visit, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dt);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index f1b1f00..267692c 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -81,7 +81,7 @@ DESCRIPTION
static herr_t
H5T_init_vlen_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_init_vlen_interface)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_LEAVE_NOAPI(H5T_init())
} /* H5T_init_vlen_interface() */
@@ -109,7 +109,7 @@ H5Tvlen_create(hid_t base_id)
H5T_t *dt = NULL; /*new datatype */
hid_t ret_value; /*return value */
- FUNC_ENTER_API(H5Tvlen_create, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", base_id);
/* Check args */
@@ -150,7 +150,7 @@ H5T_vlen_create(const H5T_t *base)
H5T_t *dt = NULL; /*new VL datatype */
H5T_t *ret_value; /*return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_create)
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(base);
@@ -211,7 +211,7 @@ H5T_vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
{
htri_t ret_value = FALSE; /* Indicate success, but no location change */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_set_loc)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(dt);
@@ -322,7 +322,7 @@ H5T_vlen_seq_mem_getlen(const void *_vl)
hvl_t vl; /* User's hvl_t information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_seq_mem_getlen)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters, return result */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -359,7 +359,7 @@ H5T_vlen_seq_mem_getptr(void *_vl)
hvl_t vl; /* User's hvl_t information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_seq_mem_getptr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters, return result */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -397,7 +397,7 @@ H5T_vlen_seq_mem_isnull(const H5F_t UNUSED *f, void *_vl)
hvl_t vl; /* User's hvl_t information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_seq_mem_isnull)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters, return result */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -435,7 +435,7 @@ H5T_vlen_seq_mem_read(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void *bu
hvl_t vl; /* User's hvl_t information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_seq_mem_read)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters, copy data */
HDassert(buf);
@@ -475,7 +475,7 @@ H5T_vlen_seq_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_all
size_t len;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_seq_mem_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(_vl);
@@ -530,7 +530,7 @@ H5T_vlen_seq_mem_setnull(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void
{
hvl_t vl; /* Temporary hvl_t to use during operation */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_seq_mem_setnull)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
HDassert(_vl);
@@ -567,7 +567,7 @@ H5T_vlen_str_mem_getlen(const void *_vl)
const char *s; /* Pointer to the user's string information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_getlen)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -602,7 +602,7 @@ H5T_vlen_str_mem_getptr(void *_vl)
char *s; /* Pointer to the user's string information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_getptr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS
@@ -638,7 +638,7 @@ H5T_vlen_str_mem_isnull(const H5F_t UNUSED *f, void *_vl)
char *s; /* Pointer to the user's string information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_isnull)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
#ifndef H5_NO_ALIGNMENT_RESTRICTIONS
HDmemcpy(&s, _vl, sizeof(char *));
@@ -670,7 +670,7 @@ H5T_vlen_str_mem_read(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void *bu
char *s; /* Pointer to the user's string information */
#endif
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_read)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(len>0) {
/* check parameters */
@@ -709,7 +709,7 @@ H5T_vlen_str_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_all
size_t len; /* Maximum length of the string to copy */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_str_mem_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(buf);
@@ -754,7 +754,7 @@ H5T_vlen_str_mem_setnull(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void
{
char *t=NULL; /* Pointer to temporary buffer allocated */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_setnull)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
HDmemcpy(_vl,&t,sizeof(char *));
@@ -781,7 +781,7 @@ H5T_vlen_disk_getlen(const void *_vl)
const uint8_t *vl=(const uint8_t *)_vl; /* Pointer to the disk VL information */
size_t seq_len; /* Sequence length */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_disk_getlen)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
HDassert(vl);
@@ -808,7 +808,7 @@ H5T_vlen_disk_getlen(const void *_vl)
static void *
H5T_vlen_disk_getptr(void UNUSED *vl)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_disk_getptr)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
HDassert(vl);
@@ -835,7 +835,7 @@ H5T_vlen_disk_isnull(const H5F_t *f, void *_vl)
uint8_t *vl=(uint8_t *)_vl; /* Pointer to the disk VL information */
haddr_t addr; /* Sequence's heap address */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_disk_isnull)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check parameters */
HDassert(vl);
@@ -870,7 +870,7 @@ H5T_vlen_disk_read(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, size_t UNUSED
H5HG_t hobjid;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_disk_read)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(vl);
@@ -919,7 +919,7 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t UNUSED
size_t len; /* Size of new sequence on disk (in bytes) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_disk_write)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(vl);
@@ -982,7 +982,7 @@ H5T_vlen_disk_setnull(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg)
uint32_t seq_len = 0; /* Sequence length */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_disk_setnull)
+ FUNC_ENTER_NOAPI_NOINIT
/* check parameters */
HDassert(f);
@@ -1046,7 +1046,7 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5T_vlen_reclaim_recurse)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(elem);
HDassert(dt);
@@ -1160,7 +1160,7 @@ H5T_vlen_reclaim(void *elem, hid_t type_id, unsigned UNUSED ndim, const hsize_t
H5T_t *dt;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_vlen_reclaim, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(elem);
HDassert(vl_alloc_info);
@@ -1208,7 +1208,7 @@ H5T_vlen_get_alloc_info(hid_t dxpl_id, H5T_vlen_alloc_info_t **vl_alloc_info)
H5P_genplist_t *plist; /* DX property list */
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI(H5T_vlen_get_alloc_info, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
HDassert(vl_alloc_info);
@@ -1263,7 +1263,7 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt, hid_t dxpl_id)
HDassert(dt);
HDassert(elem);
- FUNC_ENTER_NOAPI(H5T_vlen_reclaim_elmt, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get VL allocation info */
if(H5T_vlen_get_alloc_info(dxpl_id, &vl_alloc_info) < 0)
diff --git a/src/H5V.c b/src/H5V.c
index 515a2c5..fe38978 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -72,7 +72,7 @@ static void
H5V_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_stride_optimize1);
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* This has to be true because if we optimize the dimensionality down to
@@ -121,7 +121,7 @@ static void
H5V_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1, hsize_t *stride2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_stride_optimize2)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* This has to be true because if we optimize the dimensionality down to
@@ -265,7 +265,7 @@ H5V_hyper_stride(unsigned n, const hsize_t *size,
int i; /*counter */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_stride)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(n <= H5V_HYPER_NDIMS);
assert(size);
@@ -364,8 +364,8 @@ H5V_hyper_eq(unsigned n,
unsigned i;
htri_t ret_value=TRUE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_hyper_eq)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (n == 0) HGOTO_DONE(TRUE)
@@ -411,8 +411,8 @@ H5V_hyper_disjointp(unsigned n,
unsigned u;
htri_t ret_value = FALSE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_hyper_disjointp)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(!n || !size1 || !size2)
HGOTO_DONE(TRUE)
@@ -471,7 +471,7 @@ H5V_hyper_fill(unsigned n, const hsize_t *_size,
unsigned u;
#endif
- FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(n > 0 && n <= H5V_HYPER_NDIMS);
@@ -557,7 +557,7 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size,
unsigned u;
#endif
- FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
assert(n > 0 && n <= H5V_HYPER_NDIMS);
@@ -711,7 +711,8 @@ H5V_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
int j; /*counter */
hbool_t carry; /*subtraction carray value */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_stride_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(n, idx, size);
@@ -772,7 +773,8 @@ H5V_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
int j; /*counters */
hbool_t carry; /*carray for subtraction*/
- FUNC_ENTER_NOAPI_NOFUNC(H5V_stride_copy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
assert (elmt_size<SIZET_MAX);
if (n) {
@@ -840,7 +842,8 @@ H5V_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size,
int j; /*counters */
hbool_t carry; /*carray for subtraction*/
- FUNC_ENTER_NOAPI_NOFUNC(H5V_stride_copy_s)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
assert (elmt_size<SIZET_MAX);
if (n) {
@@ -913,7 +916,7 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
int j; /* Local index variable */
hbool_t carry;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_stride_copy2)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert (elmt_size < SIZET_MAX);
assert(dst_n>0);
@@ -978,7 +981,7 @@ H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
size_t items_left; /* number of items left to copy */
uint8_t *dst=(uint8_t*)_dst;/* alias for pointer arithmetic */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_array_fill)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert (dst);
assert (src);
@@ -1033,7 +1036,7 @@ H5V_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
hsize_t acc; /*accumulator */
int i; /*counter */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_array_down)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(n <= H5V_HYPER_NDIMS);
assert(total_size);
@@ -1079,7 +1082,7 @@ H5V_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
int i; /*counter */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_array_offset_pre)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
assert(n <= H5V_HYPER_NDIMS);
assert(acc);
@@ -1119,7 +1122,7 @@ H5V_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset)
hsize_t acc_arr[H5V_HYPER_NDIMS]; /* Accumulated size of down dimensions */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_offset, (HDabort(), 0)) /*lint !e527 Don't worry about unreachable statement */
+ FUNC_ENTER_NOAPI((HDabort(), 0)) /*lint !e527 Don't worry about unreachable statement */
assert(n <= H5V_HYPER_NDIMS);
assert(total_size);
@@ -1161,7 +1164,7 @@ H5V_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down,
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_array_calc_pre)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(n <= H5V_HYPER_NDIMS);
@@ -1203,7 +1206,7 @@ H5V_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *c
hsize_t idx[H5V_HYPER_NDIMS]; /* Size of each dimension in bytes */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_calc, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(n <= H5V_HYPER_NDIMS);
@@ -1272,7 +1275,7 @@ H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk,
hsize_t scaled_coord[H5V_HYPER_NDIMS]; /* Scaled, coordinates, in terms of chunks */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_chunk_index)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
assert(ndims <= H5V_HYPER_NDIMS);
@@ -1308,7 +1311,7 @@ H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk,
void
H5V_swizzle_coords(hsize_t *coords, unsigned unlim_dim)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_swizzle_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(coords);
@@ -1343,7 +1346,7 @@ H5V_swizzle_coords(hsize_t *coords, unsigned unlim_dim)
void
H5V_unswizzle_coords(hsize_t *coords, unsigned unlim_dim)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_unswizzle_coords)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(coords);
@@ -1397,7 +1400,7 @@ H5V_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[],
size_t acc_len; /* Accumulated length of sequences */
ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_NOAPI(H5V_opvv, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dst_curr_seq);
@@ -1605,7 +1608,7 @@ H5V_memcpyvv(void *_dst,
size_t acc_len; /* Accumulated length of sequences */
ssize_t ret_value = 0; /* Return value (Total size of sequence in bytes) */
- FUNC_ENTER_NOAPI_NOFUNC(H5V_memcpyvv)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(_dst);
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index 18630d6..89e1938 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -130,8 +130,8 @@ H5V_vector_reduce_product(unsigned n, const hsize_t *v)
{
hsize_t ret_value = 1;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_vector_reduce_product)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (n && !v) HGOTO_DONE(0)
while (n--) ret_value *= *v++;
@@ -162,8 +162,8 @@ H5V_vector_zerop_u(int n, const hsize_t *v)
{
htri_t ret_value=TRUE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_vector_zerop_u)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (!v)
HGOTO_DONE(TRUE)
@@ -197,8 +197,8 @@ H5V_vector_zerop_s(int n, const hssize_t *v)
{
htri_t ret_value=TRUE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_vector_zerop_s)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (!v)
HGOTO_DONE(TRUE)
@@ -234,8 +234,8 @@ H5V_vector_cmp_u (unsigned n, const hsize_t *v1, const hsize_t *v2)
{
int ret_value=0; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_vector_cmp_u)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (v1 == v2) HGOTO_DONE(0)
if (v1 == NULL) HGOTO_DONE(-1)
@@ -276,8 +276,8 @@ H5V_vector_cmp_s (unsigned n, const hssize_t *v1, const hssize_t *v2)
{
int ret_value=0; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_vector_cmp_s)
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (v1 == v2) HGOTO_DONE(0)
if (v1 == NULL) HGOTO_DONE(-1)
diff --git a/src/H5WB.c b/src/H5WB.c
index f624abc..978ded4 100644
--- a/src/H5WB.c
+++ b/src/H5WB.c
@@ -110,7 +110,7 @@ H5WB_wrap(void *buf, size_t buf_size)
H5WB_t *wb = NULL; /* Wrapped buffer info */
H5WB_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5WB_wrap, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -163,7 +163,7 @@ H5WB_actual(H5WB_t *wb, size_t need)
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5WB_actual, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -231,7 +231,7 @@ H5WB_actual_clear(H5WB_t *wb, size_t need)
{
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5WB_actual_clear, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/*
* Check arguments.
@@ -267,7 +267,7 @@ done:
herr_t
H5WB_unwrap(H5WB_t *wb)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5WB_unwrap)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
diff --git a/src/H5Z.c b/src/H5Z.c
index b22863e..3bb3a44 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -81,7 +81,7 @@ H5Z_init_interface (void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_init_interface)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5_HAVE_FILTER_DEFLATE
if (H5Z_register (H5Z_DEFLATE)<0)
@@ -97,8 +97,6 @@ H5Z_init_interface (void)
#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_SZIP
H5Z_SZIP->encoder_present = SZ_encoder_enabled();
- if (H5Z_SZIP->encoder_present < 0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "szip filter reports bad status")
if (H5Z_register (H5Z_SZIP)<0)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
#endif /* H5_HAVE_FILTER_SZIP */
@@ -226,7 +224,7 @@ H5Zregister(const void *cls)
H5Z_class2_t cls_new; /* Translated class struct */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Zregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*x", cls);
/* Check args */
@@ -304,7 +302,7 @@ H5Z_register (const H5Z_class2_t *cls)
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_register, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(cls);
HDassert(cls->id >= 0 && cls->id <= H5Z_FILTER_MAX);
@@ -370,7 +368,7 @@ H5Zunregister(H5Z_filter_t id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Zunregister, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "Zf", id);
/* Check args */
@@ -409,7 +407,7 @@ H5Z_unregister (H5Z_filter_t id)
size_t i; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_unregister,FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert (id>=0 && id<=H5Z_FILTER_MAX);
@@ -455,7 +453,7 @@ H5Zfilter_avail(H5Z_filter_t id)
size_t i; /* Local index variable */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_API(H5Zfilter_avail, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE1("t", "Zf", id);
/* Check args */
@@ -500,7 +498,7 @@ H5Z_prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id,
size_t u; /* Local index variable */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_prelude_callback)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(pline->nused > 0);
@@ -585,7 +583,7 @@ H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type
hid_t space_id = -1; /* ID for dataspace describing chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_prepare_prelude_callback_dcpl)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -668,7 +666,7 @@ H5Z_can_apply(hid_t dcpl_id, hid_t type_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Make "can apply" callbacks for filters in pipeline */
if(H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0)
@@ -703,7 +701,7 @@ H5Z_set_local(hid_t dcpl_id, hid_t type_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Make "set local" callbacks for filters in pipeline */
if(H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0)
@@ -733,7 +731,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply_direct, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pline->nused > 0);
@@ -770,7 +768,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local_direct, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pline->nused > 0);
@@ -804,7 +802,7 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
size_t idx; /* Index of filter in pipeline */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_modify, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pline);
HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
@@ -874,7 +872,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
size_t idx;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_append, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pline);
HDassert(filter >= 0 && filter <= H5Z_FILTER_MAX);
@@ -979,7 +977,7 @@ H5Z_find_idx(H5Z_filter_t id)
size_t i; /* Local index variable */
int ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5Z_find_idx)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
for (i=0; i<H5Z_table_used_g; i++)
if (H5Z_table_g[i].id == id)
@@ -1014,7 +1012,7 @@ H5Z_find(H5Z_filter_t id)
int idx; /* Filter index in global table */
H5Z_class2_t *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_find, NULL)
+ FUNC_ENTER_NOAPI(NULL)
/* Get the index in the global table */
if((idx=H5Z_find_idx(id))<0)
@@ -1073,7 +1071,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
unsigned tmp_flags;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_pipeline, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
assert(0==(flags & ~((unsigned)H5Z_FLAG_INVMASK)));
assert(filter_mask);
@@ -1091,7 +1089,14 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
continue;/*filter excluded*/
}
if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter is not registered")
+ /* Print out the filter name to give more info. But the name is optional for
+ * the filter */
+ if(pline->filter[idx].name)
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered",
+ pline->filter[idx].name)
+ else
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
+
}
fclass=&H5Z_table_g[fclass_idx];
#ifdef H5Z_DEBUG
@@ -1192,7 +1197,7 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
size_t idx; /* Index of filter in pipeline */
H5Z_filter_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_filter_info, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(pline);
assert(filter>=0 && filter<=H5Z_FILTER_MAX);
@@ -1235,7 +1240,7 @@ H5Z_all_filters_avail(const H5O_pline_t *pline)
size_t i,j; /* Local index variable */
htri_t ret_value=TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_all_filters_avail, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
assert(pline);
@@ -1279,7 +1284,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_delete, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(pline);
@@ -1363,7 +1368,7 @@ H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags)
H5Z_class2_t *fclass;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_API(H5Zget_filter_info, FAIL)
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "Zf*Iu", filter, filter_config_flags);
/* Look up the filter class info */
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 598aa97..f318c2f 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -79,7 +79,7 @@ H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
int status; /* Status from zlib operation */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_filter_deflate, 0)
+ FUNC_ENTER_NOAPI(0)
/* Sanity check */
HDassert(*buf_size > 0);
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index e3a77bd..d2ad965 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -85,7 +85,7 @@ H5Z_filter_fletcher32 (unsigned flags, size_t UNUSED cd_nelmts, const unsigned U
uint8_t tmp;
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_filter_fletcher32, 0)
+ FUNC_ENTER_NOAPI(0)
assert(sizeof(uint32_t)>=4);
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 263b2cd..134ef3a 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -135,7 +135,7 @@ H5Z_can_apply_nbit(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id)
const H5T_t *type; /* Datatype */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply_nbit, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -235,7 +235,7 @@ H5Z_calc_parms_array(const H5T_t *type)
H5T_class_t dtype_base_class; /* Array datatype's base datatype's class */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_calc_parms_array, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Store datatype class code */
++cd_values_actual_nparms;
@@ -308,7 +308,7 @@ H5Z_calc_parms_compound(const H5T_t *type)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_calc_parms_compound, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Store compound datatype class code */
++cd_values_actual_nparms;
@@ -397,7 +397,7 @@ H5Z_set_parms_nooptype(const H5T_t *type, unsigned cd_values[])
size_t dtype_size; /* No-op datatype's size (in bytes) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_parms_nooptype, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set datatype class code */
cd_values[cd_values_index++] = H5Z_NBIT_NOOPTYPE;
@@ -439,7 +439,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[])
int dtype_offset; /* Atomic datatype's offset (in bits) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_set_parms_atomic)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set datatype class code */
cd_values[cd_values_index++] = H5Z_NBIT_ATOMIC;
@@ -525,7 +525,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned cd_values[])
htri_t is_vlstring; /* flag indicating if datatype is varible-length string */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_parms_array, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set datatype class code */
cd_values[cd_values_index++] = H5Z_NBIT_ARRAY;
@@ -615,7 +615,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned cd_values[])
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_parms_compound, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Set "local" parameter for compound datatype class code */
cd_values[cd_values_index++] = H5Z_NBIT_COMPOUND;
@@ -739,7 +739,7 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5T_class_t dtype_class; /* Datatype's class */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local_nbit, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -873,7 +873,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned d_nelmts = 0; /* number of elements in the chunk */
size_t ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI(H5Z_filter_nbit, 0)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments
* cd_values[0] stores actual number of parameters in cd_values[]
diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h
index 959ec28..b0df856 100644
--- a/src/H5Zpkg.h
+++ b/src/H5Zpkg.h
@@ -66,8 +66,5 @@ H5_DLLVAR H5Z_class2_t H5Z_NBIT[1];
H5_DLLVAR H5Z_class2_t H5Z_SCALEOFFSET[1];
#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-/* Package-local function prototypes */
-H5_DLL void H5Z_update_class_vers(H5Z_class2_t * old_vers, H5Z_class2_t * curr_vers);
-
#endif /* _H5Zpkg_H */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index c524141..e6ae53e 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -698,7 +698,7 @@ H5Z_can_apply_scaleoffset(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED spac
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply_scaleoffset, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -750,7 +750,7 @@ H5Z_scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dty
enum H5Z_scaleoffset_t type = t_bad; /* integer type */
enum H5Z_scaleoffset_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_scaleoffset_get_type)
+ FUNC_ENTER_NOAPI_NOINIT
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER) {
if(dtype_sign==H5Z_SCALEOFFSET_SGN_NONE) { /* unsigned integer */
@@ -809,7 +809,7 @@ H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_scaleoffset_set_parms_fillval, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(scale_type == t_uchar)
H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, need_convert, dxpl_id)
@@ -875,7 +875,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5D_fill_value_t status; /* Status of fill value in property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local_scaleoffset, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -1057,7 +1057,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
unsigned i; /* index */
parms_atomic p; /* paramters needed for compress/decompress functions */
- FUNC_ENTER_NOAPI(H5Z_filter_scaleoffset, 0)
+ FUNC_ENTER_NOAPI_NOINIT
/* check arguments */
if(cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS)
@@ -1513,7 +1513,7 @@ H5Z_scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffs
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_scaleoffset_precompress_fd, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(type == t_float)
H5Z_scaleoffset_precompress_3(float, data, d_nelmts,
@@ -1536,7 +1536,7 @@ H5Z_scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleo
long long sminval = (long long)minval; /* for signed integer types */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_scaleoffset_postdecompress_fd, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
if(type == t_float)
H5Z_scaleoffset_postdecompress_3(float, data, d_nelmts, filavail,
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 2e4f1fa..7aa0202 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -74,7 +74,7 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id)
unsigned cd_values[H5Z_SHUFFLE_TOTAL_NPARMS]; /* Filter parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local_shuffle, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -139,7 +139,7 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t leftover; /* Extra bytes at end of buffer */
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_filter_shuffle, 0)
+ FUNC_ENTER_NOAPI(0)
/* Check arguments */
if (cd_nelmts!=H5Z_SHUFFLE_TOTAL_NPARMS || cd_values[H5Z_SHUFFLE_PARM_SIZE]==0)
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 52f5e11..fd3d90c 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -84,7 +84,7 @@ H5Z_can_apply_szip(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id)
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply_szip, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get datatype */
if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -151,7 +151,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hsize_t scanline; /* Size of dataspace's fastest changing dimension */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local_szip, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -284,7 +284,7 @@ H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned char *newbuf = NULL; /* Pointer to input buffer */
SZ_com_t sz_param; /* szip parameter block */
- FUNC_ENTER_NOAPI(H5Z_filter_szip, 0)
+ FUNC_ENTER_NOAPI(0)
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 8028123..2a2796d 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -94,6 +94,8 @@ static H5Z_node *H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_poi
static H5Z_node *H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
static H5Z_node *H5Z_new_node(H5Z_token_type type);
static void H5Z_do_op(H5Z_node* tree);
+static hbool_t H5Z_op_is_numbs(H5Z_node* _tree);
+static hbool_t H5Z_op_is_numbs2(H5Z_node* _tree);
static hid_t H5Z_xform_find_type(const H5T_t* type);
static herr_t H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result* res);
static void H5Z_xform_destroy_parse_tree(H5Z_node *tree);
@@ -105,41 +107,46 @@ static void H5Z_XFORM_DEBUG(H5Z_node *tree);
static void H5Z_print(H5Z_node *tree, FILE *stream);
#endif /* H5Z_XFORM_DEBUG */
-
#define H5Z_XFORM_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
{ \
- if( (((RESL).type == H5Z_XFORM_SYMBOL) && ((RESR).type != H5Z_XFORM_SYMBOL)) || (((RESR).type == H5Z_XFORM_SYMBOL) && ((RESL).type != H5Z_XFORM_SYMBOL))) \
+ size_t u; \
+ \
+ if(((RESL).type == H5Z_XFORM_SYMBOL) && ((RESR).type != H5Z_XFORM_SYMBOL)) \
+ { \
+ TYPE* p; \
+ double tree_val; \
+ \
+ tree_val = ((RESR).type==H5Z_XFORM_INTEGER ? (double)(RESR).value.int_val : (RESR).value.float_val); \
+ p = (TYPE*)(RESL).value.dat_val; \
+ \
+ for(u=0; u<(SIZE); u++) \
+ *p++ = *p OP tree_val; \
+ } \
+ else if(((RESR).type == H5Z_XFORM_SYMBOL) && ((RESL).type != H5Z_XFORM_SYMBOL)) \
{ \
- size_t u; \
TYPE* p; \
double tree_val; \
\
- if((RESL).type == H5Z_XFORM_SYMBOL) \
- { \
- tree_val = ((RESR).type==H5Z_XFORM_INTEGER ? (double)(RESR).value.int_val : (RESR).value.float_val); \
- p = (TYPE*)(RESL).value.dat_val; \
- } \
+ /* The case that the left operand is nothing, like -x or +x */ \
+ if((RESL).type == H5Z_XFORM_ERROR) \
+ tree_val = 0; \
else \
- { \
tree_val = ((RESL).type==H5Z_XFORM_INTEGER ? (double)(RESL).value.int_val : (RESL).value.float_val); \
- p = (TYPE*)(RESR).value.dat_val; \
- } \
- \
+ \
+ p = (TYPE*)(RESR).value.dat_val; \
for(u=0; u<(SIZE); u++) \
- *p++ OP tree_val; \
- } \
+ *p++ = tree_val OP *p; \
+ } \
else if( ((RESL).type == H5Z_XFORM_SYMBOL) && ((RESR).type==H5Z_XFORM_SYMBOL)) \
{ \
- size_t u; \
TYPE* pl = (TYPE*)(RESL).value.dat_val; \
TYPE* pr = (TYPE*)(RESR).value.dat_val; \
\
for(u=0; u<(SIZE); u++) \
- *pl++ OP *pr++; \
+ *pl++ = *pl OP *pr++; \
} \
else \
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unexpected type conversion operation") \
- \
}
/* Due to the undefined nature of embedding macros/conditionals within macros, we employ
@@ -235,6 +242,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
}
#endif /*H5_SIZEOF_LONG_DOUBLE */
+
#define H5Z_XFORM_DO_OP3(OP) \
{ \
if((tree->lchild->type == H5Z_XFORM_INTEGER) && (tree->rchild->type==H5Z_XFORM_INTEGER)) \
@@ -259,6 +267,48 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
} \
}
+/* The difference of this macro from H5Z_XFORM_DO_OP3 is that it handles the operations when the left operand is empty, like -x or +x.
+ * The reason that it's seperated from H5Z_XFORM_DO_OP3 is because compilers don't accept operations like *x or /x. So in H5Z_do_op,
+ * these two macros are called in different ways.
+ */
+#define H5Z_XFORM_DO_OP6(OP) \
+{ \
+ if(!tree->lchild && (tree->rchild->type==H5Z_XFORM_INTEGER)) \
+ { \
+ tree->type = H5Z_XFORM_INTEGER; \
+ tree->value.int_val = OP tree->rchild->value.int_val; \
+ H5MM_xfree(tree->rchild); \
+ tree->rchild = NULL; \
+ } \
+ else if(!tree->lchild && (tree->rchild->type==H5Z_XFORM_FLOAT)) \
+ { \
+ tree->type = H5Z_XFORM_FLOAT; \
+ tree->value.float_val = OP tree->rchild->value.float_val; \
+ H5MM_xfree(tree->rchild); \
+ tree->rchild = NULL; \
+ } \
+ else if((tree->lchild->type == H5Z_XFORM_INTEGER) && (tree->rchild->type==H5Z_XFORM_INTEGER)) \
+ { \
+ tree->type = H5Z_XFORM_INTEGER; \
+ tree->value.int_val = tree->lchild->value.int_val OP tree->rchild->value.int_val; \
+ H5MM_xfree(tree->lchild); \
+ H5MM_xfree(tree->rchild); \
+ tree->lchild = NULL; \
+ tree->rchild = NULL; \
+ } \
+ else if( ( (tree->lchild->type == H5Z_XFORM_FLOAT) || (tree->lchild->type == H5Z_XFORM_INTEGER)) && \
+ ( (tree->rchild->type == H5Z_XFORM_FLOAT) || (tree->rchild->type == H5Z_XFORM_INTEGER))) \
+ { \
+ tree->type = H5Z_XFORM_FLOAT; \
+ tree->value.float_val = ((tree->lchild->type == H5Z_XFORM_FLOAT) ? tree->lchild->value.float_val : (double)tree->lchild->value.int_val) OP \
+ ((tree->rchild->type == H5Z_XFORM_FLOAT) ? tree->rchild->value.float_val : (double)tree->rchild->value.int_val); \
+ H5MM_xfree(tree->lchild); \
+ H5MM_xfree(tree->rchild); \
+ tree->lchild = NULL; \
+ tree->rchild = NULL; \
+ } \
+}
+
#define H5Z_XFORM_DO_OP4(TYPE) \
{ \
if ((ret_value = (H5Z_node*) H5MM_malloc(sizeof(H5Z_node))) == NULL) \
@@ -317,19 +367,16 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
static void
H5Z_unget_token(H5Z_token *current)
{
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
/* check args */
assert(current);
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5Z_unget_token)
-
current->tok_type = current->tok_last_type;
current->tok_begin = current->tok_last_begin;
current->tok_end = current->tok_last_end;
FUNC_LEAVE_NOAPI_VOID
-
-
}
@@ -356,7 +403,7 @@ H5Z_get_token(H5Z_token *current)
{
H5Z_token *ret_value = current;
- FUNC_ENTER_NOAPI(H5Z_get_token, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
assert(current);
@@ -485,7 +532,7 @@ done:
void
H5Z_xform_destroy_parse_tree(H5Z_node *tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5Z_xform_destroy_parse_tree)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if (tree)
{
@@ -518,7 +565,7 @@ H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
H5Z_token tok;
void* ret_value;
- FUNC_ENTER_NOAPI(H5Z_xform_parse, NULL)
+ FUNC_ENTER_NOAPI(NULL)
if(!expression)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?")
@@ -557,7 +604,7 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
H5Z_node *expr;
H5Z_node *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_parse_expression)
+ FUNC_ENTER_NOAPI_NOINIT
expr = H5Z_parse_term(current, dat_val_pointers);
@@ -651,7 +698,8 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
H5Z_node *term = NULL;
H5Z_node *ret_value;
- FUNC_ENTER_NOAPI(H5Z_parse_term, NULL);
+ FUNC_ENTER_NOAPI_NOINIT
+
term = H5Z_parse_factor(current, dat_val_pointers);
for (;;) {
@@ -741,7 +789,7 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
H5Z_node *new_node;
H5Z_node *ret_value;
- FUNC_ENTER_NOAPI(H5Z_parse_factor, NULL);
+ FUNC_ENTER_NOAPI_NOINIT
current = H5Z_get_token(current);
@@ -880,7 +928,7 @@ H5Z_new_node(H5Z_token_type type)
{
H5Z_node *ret_value;
- FUNC_ENTER_NOAPI(H5Z_new_node, NULL)
+ FUNC_ENTER_NOAPI_NOINIT
if(NULL == (ret_value = (H5Z_node *)H5MM_calloc(sizeof(H5Z_node))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to allocate space for nodes in the parse tree")
@@ -913,7 +961,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_xform_eval, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(data_xform_prop);
@@ -1024,11 +1072,14 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
H5Z_result resl, resr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_xform_eval_full, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
/* check args */
HDassert(tree);
+ HDmemset(&resl, 0, sizeof(H5Z_result));
+ HDmemset(&resr, 0, sizeof(H5Z_result));
+
if (tree->type == H5Z_XFORM_INTEGER) {
res->type = H5Z_XFORM_INTEGER;
res->value.int_val = tree->value.int_val;
@@ -1046,7 +1097,7 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
res->value.dat_val = *((void**)(tree->value.dat_val));
} /* end if */
else {
- if(H5Z_xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
+ if(tree->lchild && H5Z_xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
if(H5Z_xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
@@ -1061,19 +1112,19 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
switch (tree->type) {
case H5Z_XFORM_PLUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, +=, array_size)
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, +, array_size)
break;
case H5Z_XFORM_MINUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, -=, array_size)
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, -, array_size)
break;
case H5Z_XFORM_MULT:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, *=, array_size)
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, *, array_size)
break;
case H5Z_XFORM_DIVIDE:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, /=, array_size)
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, /, array_size)
break;
default:
@@ -1111,7 +1162,7 @@ H5Z_xform_find_type(const H5T_t* type)
H5T_t *tmp; /* Temporary datatype */
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5Z_xform_find_type)
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(type);
@@ -1197,7 +1248,7 @@ H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datva
{
H5Z_node* ret_value=NULL;
- FUNC_ENTER_NOAPI(H5Z_xform_copy_tree, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(tree);
@@ -1273,25 +1324,40 @@ H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datva
void
H5Z_xform_reduce_tree(H5Z_node* tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5Z_xform_reduce_tree)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(tree) {
- if((tree->type == H5Z_XFORM_PLUS) || (tree->type == H5Z_XFORM_DIVIDE) ||(tree->type == H5Z_XFORM_MULT) ||(tree->type == H5Z_XFORM_MINUS))
+ if((tree->type == H5Z_XFORM_DIVIDE) || (tree->type == H5Z_XFORM_MULT))
{
- if(((tree->lchild->type == H5Z_XFORM_INTEGER) || (tree->lchild->type == H5Z_XFORM_FLOAT)) && ((tree->rchild->type == H5Z_XFORM_INTEGER) || (tree->rchild->type == H5Z_XFORM_FLOAT)))
+ if(H5Z_op_is_numbs(tree))
+ H5Z_do_op(tree);
+ else
+ {
+ H5Z_xform_reduce_tree(tree->lchild);
+ if(H5Z_op_is_numbs(tree))
+ H5Z_do_op(tree);
+ else {
+ H5Z_xform_reduce_tree(tree->rchild);
+ if(H5Z_op_is_numbs(tree))
+ H5Z_do_op(tree);
+ }
+ }
+ } else if((tree->type == H5Z_XFORM_PLUS) || (tree->type == H5Z_XFORM_MINUS)) {
+ if(H5Z_op_is_numbs2(tree))
H5Z_do_op(tree);
else
{
H5Z_xform_reduce_tree(tree->lchild);
- if(((tree->lchild->type == H5Z_XFORM_INTEGER) || (tree->lchild->type == H5Z_XFORM_FLOAT)) && ((tree->rchild->type == H5Z_XFORM_INTEGER) || (tree->rchild->type == H5Z_XFORM_FLOAT)))
+ if(H5Z_op_is_numbs2(tree))
H5Z_do_op(tree);
else {
H5Z_xform_reduce_tree(tree->rchild);
- if(((tree->lchild->type == H5Z_XFORM_INTEGER) || (tree->lchild->type == H5Z_XFORM_FLOAT)) && ((tree->rchild->type == H5Z_XFORM_INTEGER) || (tree->rchild->type == H5Z_XFORM_FLOAT)))
+ if(H5Z_op_is_numbs2(tree))
H5Z_do_op(tree);
}
}
}
+
}
FUNC_LEAVE_NOAPI_VOID;
@@ -1299,6 +1365,63 @@ H5Z_xform_reduce_tree(H5Z_node* tree)
/*-------------------------------------------------------------------------
+ * Function: H5Z_op_is_numbs
+ * Purpose: Internal function to facilitate the condition check in
+ * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
+ * Return: TRUE or FALSE
+ * Programmer: Raymond Lu
+ * 15 March 2012
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static hbool_t
+H5Z_op_is_numbs(H5Z_node* _tree)
+{
+ hbool_t ret_value = FALSE;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ assert(_tree);
+
+ if(((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT)) && ((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))
+ ret_value = TRUE;
+
+ FUNC_LEAVE_NOAPI(ret_value)
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_op_is_numbs2
+ * Purpose: Internal function to facilitate the condition check in
+ * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
+ * The difference from H5Z_op_is_numbs is that the left child
+ * can be empty, like -x or +x.
+ * Return: TRUE or FALSE
+ * Programmer: Raymond Lu
+ * 15 March 2012
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static hbool_t
+H5Z_op_is_numbs2(H5Z_node* _tree)
+{
+ hbool_t ret_value = FALSE;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ assert(_tree);
+
+ if((!_tree->lchild && ((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT))) ||
+ ((_tree->lchild && ((_tree->lchild->type == H5Z_XFORM_INTEGER) || (_tree->lchild->type == H5Z_XFORM_FLOAT))) && (_tree->rchild && ((_tree->rchild->type == H5Z_XFORM_INTEGER) || (_tree->rchild->type == H5Z_XFORM_FLOAT)))))
+ ret_value = TRUE;
+
+ FUNC_LEAVE_NOAPI(ret_value)
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5Z_do_op
* Purpose: If the root of the tree passed in points to a simple
* arithmetic operation and the left and right subtrees are both
@@ -1309,26 +1432,28 @@ H5Z_xform_reduce_tree(H5Z_node* tree)
* Programmer: Leon Arber
* April 1, 2004.
* Modifications:
-*
+ * Raymond Lu
+ * 15 March 2012
+ * I added a new macro H5Z_XFORM_DO_OP6 to handle the special
+ * operations like -x or +x when the left operand is empty.
+ *
*-------------------------------------------------------------------------
*/
static void
H5Z_do_op(H5Z_node* tree)
{
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5Z_do_op)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(tree->type == H5Z_XFORM_DIVIDE)
H5Z_XFORM_DO_OP3(/)
else if(tree->type == H5Z_XFORM_MULT)
H5Z_XFORM_DO_OP3(*)
else if(tree->type == H5Z_XFORM_PLUS)
- H5Z_XFORM_DO_OP3(+)
+ H5Z_XFORM_DO_OP6(+)
else if(tree->type == H5Z_XFORM_MINUS)
- H5Z_XFORM_DO_OP3(-)
+ H5Z_XFORM_DO_OP6(-)
FUNC_LEAVE_NOAPI_VOID;
-
}
@@ -1359,7 +1484,7 @@ H5Z_xform_create(const char *expr)
unsigned int i;
unsigned int count = 0;
- FUNC_ENTER_NOAPI(H5Z_xform_create, NULL)
+ FUNC_ENTER_NOAPI(NULL)
assert(expr);
@@ -1383,7 +1508,7 @@ H5Z_xform_create(const char *expr)
* we don't need to allocate any space since no array will have to be
* stored */
if(count > 0)
- if((data_xform_prop->dat_val_pointers->ptr_dat_val = (void**) H5MM_calloc(count * sizeof(void**))) == NULL)
+ if(NULL == (data_xform_prop->dat_val_pointers->ptr_dat_val = (void *)H5MM_calloc(count * sizeof(void *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate memory for pointers in transform array")
/* Initialize the num_ptrs field, which will be used to keep track of the number of copies
@@ -1445,7 +1570,7 @@ done:
herr_t
H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_destroy)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
if(data_xform_prop) {
/* Destroy the parse tree */
@@ -1498,7 +1623,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
H5Z_data_xform_t *new_data_xform_prop=NULL;
herr_t ret_value=SUCCEED;
- FUNC_ENTER_NOAPI(H5Z_xform_copy, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
if(*data_xform_prop) {
/* Allocate new node */
@@ -1518,7 +1643,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
count++;
if(count > 0)
- if((new_data_xform_prop->dat_val_pointers->ptr_dat_val = (void**) H5MM_calloc(count * sizeof(void**))) == NULL)
+ if(NULL == (new_data_xform_prop->dat_val_pointers->ptr_dat_val = (void *)H5MM_calloc(count * sizeof(void *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for pointers in transform array")
/* Zero out num_pointers prior to H5Z_xform_cop_tree call; that call will increment it to the right amount */
@@ -1575,7 +1700,7 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop)
{
hbool_t ret_value;
- FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_noop)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
ret_value=(data_xform_prop ? FALSE : TRUE);
@@ -1604,7 +1729,7 @@ H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop)
{
char* ret_value;
- FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_extract_xform_str)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* There should be no way that this can be NULL since the function
* that calls this one checks to make sure it isn't before
diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h
index fc0b467..845a9a0 100644
--- a/src/H5api_adpt.h
+++ b/src/H5api_adpt.h
@@ -303,10 +303,10 @@
* The Visual Studio project files will not be supported in the next major release of 1.10.
*/
-#if defined(_WIN32)
+#if defined(H5_HAVE_WIN32_API)
#if defined(_HDF5DLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_DLL __declspec(dllexport)
#define H5_DLLVAR extern __declspec(dllexport)
#elif defined(_HDF5USEDLL_)
@@ -318,7 +318,7 @@
#endif /* _HDF5DLL_ */
#if defined(_HDF5TESTDLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5TEST_DLL __declspec(dllexport)
#define H5TEST_DLLVAR extern __declspec(dllexport)
#elif defined(_HDF5TESTUSEDLL_)
@@ -330,7 +330,7 @@
#endif /* _HDF5TESTDLL_ */
#if defined(_HDF5TOOLSDLL_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5TOOLS_DLL __declspec(dllexport)
#define H5TOOLS_DLLVAR extern __declspec(dllexport)
#elif defined(_HDF5TOOLSUSEDLL_)
@@ -342,7 +342,7 @@
#endif /* _HDF5TOOLSDLL_ */
#if defined(_HDF5_HLDLL_EXPORTS_)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_HLDLL __declspec(dllexport)
#elif defined(_HDF5USEHLDLL_)
#define H5_HLDLL __declspec(dllimport)
@@ -351,7 +351,7 @@
#endif /* _HDF5_HLDLL_EXPORTS */
#if defined(HDF5_HL_CPPDLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_HLCPPDLL __declspec(dllexport)
#elif defined(HDF5USE_HLCPPDLL)
#define H5_HLCPPDLL __declspec(dllimport)
@@ -360,7 +360,7 @@
#endif /*HDF5_HL_CPPDLL_EXPORTS*/
#if defined(HDF5_HL_F90CSTUBDLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
#elif defined(HDF5USE_HLF90CSTUBDLL)
#define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
@@ -370,7 +370,7 @@
#if defined(HDF5FORT_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_FCDLL __declspec(dllexport)
#define H5_FCDLLVAR extern __declspec(dllexport)
#elif defined(HDF5FORT_CSTUB_USEDLL)
@@ -382,7 +382,7 @@
#endif /* _HDF5_FORTRANDLL_EXPORTS_ */
#if defined(HDF5FORTTEST_CSTUB_DLL_EXPORTS)
-#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_FCTESTDLL __declspec(dllexport)
#define H5_FCTESTDLLVAR extern __declspec(dllexport)
#elif defined(HDF5FORTTEST_CSTUB_USEDLL)
@@ -402,7 +402,7 @@
#define H5_DLLCPP
#endif /* HDF5_CPPDLL_EXPORTS */
-#else /*_WIN32*/
+#else /*H5_HAVE_WIN32_API*/
#define H5_DLL
#define H5_HLDLL
#define H5_HLCPPDLL
@@ -417,7 +417,7 @@
#define H5_FCDLLVAR extern
#define H5_FCTESTDLL
#define H5_FCTESTDLLVAR extern
-#endif
+#endif /*H5_HAVE_WIN32_API*/
#endif /* H5API_ADPT_H */
diff --git a/src/H5checksum.c b/src/H5checksum.c
index 6c01508..ec8b2b0 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -115,7 +115,7 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
size_t len = _len / 2; /* Length in 16-bit words */
uint32_t sum1 = 0, sum2 = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_fletcher32)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(_data);
@@ -171,7 +171,7 @@ H5_checksum_crc_make_table(void)
uint32_t c; /* Checksum for each byte value */
unsigned n, k; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_crc_make_table)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Compute the checksum for each possible byte value */
for(n = 0; n < 256; n++) {
@@ -209,7 +209,7 @@ H5_checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
{
size_t n; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_crc_update)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Initialize the CRC table if necessary */
if(!H5_crc_table_computed)
@@ -243,7 +243,7 @@ H5_checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
uint32_t
H5_checksum_crc(const void *_data, size_t len)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_crc)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(_data);
@@ -376,7 +376,7 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
const uint8_t *k = (const uint8_t *)key;
uint32_t a, b, c; /* internal state */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_lookup3)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(key);
@@ -448,7 +448,7 @@ done:
uint32_t
H5_checksum_metadata(const void *data, size_t len, uint32_t initval)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_checksum_metadata)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(data);
@@ -481,7 +481,7 @@ H5_hash_string(const char *str)
uint32_t hash = 5381;
int c;
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_hash_string)
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(str);
diff --git a/src/H5config.h.in b/src/H5config.h.in
index c53ccca..a2059f5 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -68,6 +68,9 @@
/* Define if the compiler understands the __func__ keyword */
#undef HAVE_C99_FUNC
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
/* Define if the function stack tracing code is to be compiled in */
#undef HAVE_CODESTACK
@@ -226,6 +229,9 @@
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
+/* Define to 1 if you have the <mach/mach_time.h> header file. */
+#undef HAVE_MACH_MACH_TIME_H
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -461,17 +467,10 @@
/* Define if the metadata trace file code is to be compiled in */
#undef METADATA_TRACE_FILE
-/* Define if your system can handle complicated MPI derived datatype
- correctly. */
-#undef MPI_COMPLEX_DERIVED_DATATYPE_WORKS
-
/* Define if your system's `MPI_File_set_size' function works for files over
2GB. */
#undef MPI_FILE_SET_SIZE_BIG
-/* Define if your system can handle special collective IO properly. */
-#undef MPI_SPECIAL_COLLECTIVE_IO_WORKS
-
/* Define if we can violate pointer alignment restrictions */
#undef NO_ALIGNMENT_RESTRICTIONS
diff --git a/src/H5dbg.c b/src/H5dbg.c
index 632ac08..5441895 100644
--- a/src/H5dbg.c
+++ b/src/H5dbg.c
@@ -83,7 +83,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf,
{
size_t u, v; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5_buffer_dump)
+ FUNC_ENTER_NOAPI_NOINIT
/*
* Check arguments.
diff --git a/src/H5detect.c b/src/H5detect.c
index 0461cfd..98fd6ae 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -621,7 +621,7 @@ H5TN_init_interface(void)\n\
H5T_t *dt = NULL;\n\
herr_t ret_value = SUCCEED;\n\
\n\
- FUNC_ENTER_NOAPI(H5TN_init_interface, FAIL)\n");
+ FUNC_ENTER_NOAPI(FAIL)\n");
for(i = 0; i < nd; i++) {
/* The native endianess of this machine */
diff --git a/src/H5private.h b/src/H5private.h
index 7950117..e01edd2 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -13,28 +13,34 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, October 30, 1998
+/* Programmer: Robb Matzke <matzke@llnl.gov>
+ * Friday, October 30, 1998
*
- * Purpose: This file is included by all HDF5 library source files to
- * define common things which are not defined in the HDF5 API.
- * The configuration constants like H5_HAVE_UNISTD_H etc. are
- * defined in H5config.h which is included by H5public.h.
+ * Purpose: This file is included by all HDF5 library source files to
+ * define common things which are not defined in the HDF5 API.
+ * The configuration constants like H5_HAVE_UNISTD_H etc. are
+ * defined in H5config.h which is included by H5public.h.
*
*/
#ifndef _H5private_H
#define _H5private_H
-#include "H5public.h" /* Include Public Definitions */
+#include "H5public.h" /* Include Public Definitions */
/* include the pthread header */
#ifdef H5_HAVE_THREADSAFE
-#ifdef H5_HAVE_PTHREAD_H
-#include <pthread.h>
-#else /* H5_HAVE_PTHREAD_H */
-#define H5_HAVE_WIN_THREADS
-#endif /* H5_HAVE_PTHREAD_H */
+ #ifdef H5_HAVE_WIN32_API
+ #ifndef H5_HAVE_WIN_THREADS
+ #ifdef H5_HAVE_PTHREAD_H
+ #include <pthread.h>
+ #endif /* H5_HAVE_PTHREAD_H */
+ #endif /* H5_HAVE_WIN_THREADS */
+ #else /* H5_HAVE_WIN32_API */
+ #ifdef H5_HAVE_PTHREAD_H
+ #include <pthread.h>
+ #endif /* H5_HAVE_PTHREAD_H */
+ #endif /* H5_HAVE_WIN32_API */
#endif /* H5_HAVE_THREADSAFE */
/*
@@ -79,7 +85,7 @@
/*
* The `struct stat' data type for stat() and fstat(). This is a Posix file
- * but often apears on non-Posix systems also. The `struct stat' is required
+ * but often apears on non-Posix systems also. The `struct stat' is required
* for hdf5 to compile, although only a few fields are actually used.
*/
#ifdef H5_HAVE_SYS_STAT_H
@@ -121,7 +127,7 @@
#endif
/*
- * Unix ioctls. These are used by h5ls (and perhaps others) to determine a
+ * Unix ioctls. These are used by h5ls (and perhaps others) to determine a
* resonable output width.
*/
#ifdef H5_HAVE_SYS_IOCTL_H
@@ -144,17 +150,21 @@
#endif
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN /*Exclude rarely-used stuff from Windows headers */
+#ifdef H5_HAVE_WIN32_API
+#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
#ifdef H5_HAVE_WINSOCK_H
#include <winsock2.h>
#endif
+#ifdef H5_HAVE_THREADSAFE
+#include <process.h> /* For _beginthread() */
+#endif
+
#include <windows.h>
#include <direct.h> /* For _getcwd() */
-#endif /*_WIN32*/
+#endif /*H5_HAVE_WIN32_API*/
/* H5_inline */
#ifndef H5_inline
@@ -163,7 +173,7 @@
#ifndef F_OK
-# define F_OK 00
+# define F_OK 00
# define W_OK 02
# define R_OK 04
#endif
@@ -187,11 +197,10 @@
*/
#define eventa(func_name) h5_mpe_eventa
#define eventb(func_name) h5_mpe_eventb
-#define MPE_LOG_VARS(func_name) \
- static int eventa(func_name) = -1; \
- static int eventb(func_name) = -1; \
- const char* p_end_funcname = #func_name; \
- const char* p_event_start = "start" #func_name;
+#define MPE_LOG_VARS \
+ static int eventa(FUNC) = -1; \
+ static int eventb(FUNC) = -1; \
+ const char* p_event_start = "start" FUNC;
/* Hardwire the color to "red", since that's what all the routines are using
* now. In the future, if we want to change that color for a given routine,
@@ -200,15 +209,15 @@
* color information down to the BEGIN_MPE_LOG macro (which should have a new
* BEGIN_MPE_LOG_COLOR variant). -QAK
*/
-#define BEGIN_MPE_LOG(func_name) \
- if (H5_MPEinit_g){ \
- if (eventa(func_name) == -1 && eventb(func_name) == -1) { \
- const char* p_color = "red"; \
- eventa(func_name)=MPE_Log_get_event_number(); \
- eventb(func_name)=MPE_Log_get_event_number(); \
- MPE_Describe_state(eventa(func_name), eventb(func_name), (char *)p_end_funcname, (char *)p_color); \
+#define BEGIN_MPE_LOG \
+ if (H5_MPEinit_g){ \
+ if (eventa(FUNC) == -1 && eventb(FUNC) == -1) { \
+ const char* p_color = "red"; \
+ eventa(FUNC)=MPE_Log_get_event_number(); \
+ eventb(FUNC)=MPE_Log_get_event_number(); \
+ MPE_Describe_state(eventa(FUNC), eventb(FUNC), (char *)FUNC, (char *)p_color); \
} \
- MPE_Log_event(eventa(func_name), 0, (char *)p_event_start); \
+ MPE_Log_event(eventa(FUNC), 0, (char *)p_event_start); \
}
@@ -220,12 +229,12 @@
*/
#define FINISH_MPE_LOG \
if (H5_MPEinit_g) { \
- MPE_Log_event(eventb(func_name), 0, (char *)p_end_funcname); \
+ MPE_Log_event(eventb(FUNC), 0, (char *)FUNC); \
}
#else /* H5_HAVE_MPE */
-#define MPE_LOG_VARS(func_name) /* void */
-#define BEGIN_MPE_LOG(func_name) /* void */
+#define MPE_LOG_VARS /* void */
+#define BEGIN_MPE_LOG /* void */
#define FINISH_MPE_LOG /* void */
#endif /* H5_HAVE_MPE */
@@ -244,36 +253,27 @@
* never be raised by the hdf5 library).
*/
#ifndef SIGBUS
-# define SIGBUS SIGILL
+# define SIGBUS SIGILL
#endif
/*
* Does the compiler support the __attribute__(()) syntax? This is how gcc
- * suppresses warnings about unused function arguments. It's no big deal if
+ * suppresses warnings about unused function arguments. It's no big deal if
* we don't.
*/
#ifdef __cplusplus
-# define __attribute__(X) /*void*/
-# define UNUSED /*void*/
+# define __attribute__(X) /*void*/
+# define UNUSED /*void*/
#else /* __cplusplus */
#ifdef H5_HAVE_ATTRIBUTE
-# define UNUSED __attribute__((unused))
+# define UNUSED __attribute__((unused))
#else
-# define __attribute__(X) /*void*/
-# define UNUSED /*void*/
+# define __attribute__(X) /*void*/
+# define UNUSED /*void*/
#endif
#endif /* __cplusplus */
/*
- * Does the compiler expand __FUNCTION__ to be the name of the function
- * currently being defined? If not then define it to be some constant
- * string.
- */
-#ifndef H5_HAVE_FUNCTION
-# define __FUNCTION__ "NoFunctionName"
-#endif
-
-/*
* Status return values for the `herr_t' type.
* Since some unix/c routines use 0 and -1 (or more precisely, non-negative
* vs. negative) as their return code, and some assumption had been made in
@@ -282,48 +282,48 @@
* function, remember to compare against zero and not one of these two
* values.
*/
-#define SUCCEED 0
-#define FAIL (-1)
-#define UFAIL (unsigned)(-1)
+#define SUCCEED 0
+#define FAIL (-1)
+#define UFAIL (unsigned)(-1)
/* number of members in an array */
#ifndef NELMTS
-# define NELMTS(X) (sizeof(X)/sizeof(X[0]))
+# define NELMTS(X) (sizeof(X)/sizeof(X[0]))
#endif
/* minimum of two, three, or four values */
#undef MIN
-#define MIN(a,b) (((a)<(b)) ? (a) : (b))
-#define MIN2(a,b) MIN(a,b)
-#define MIN3(a,b,c) MIN(a,MIN(b,c))
-#define MIN4(a,b,c,d) MIN(MIN(a,b),MIN(c,d))
+#define MIN(a,b) (((a)<(b)) ? (a) : (b))
+#define MIN2(a,b) MIN(a,b)
+#define MIN3(a,b,c) MIN(a,MIN(b,c))
+#define MIN4(a,b,c,d) MIN(MIN(a,b),MIN(c,d))
/* maximum of two, three, or four values */
#undef MAX
-#define MAX(a,b) (((a)>(b)) ? (a) : (b))
-#define MAX2(a,b) MAX(a,b)
-#define MAX3(a,b,c) MAX(a,MAX(b,c))
-#define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d))
+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
+#define MAX2(a,b) MAX(a,b)
+#define MAX3(a,b,c) MAX(a,MAX(b,c))
+#define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d))
/* limit the middle value to be within a range (inclusive) */
-#define RANGE(LO,X,HI) MAX(LO,MIN(X,HI))
+#define RANGE(LO,X,HI) MAX(LO,MIN(X,HI))
/* absolute value */
#ifndef ABS
-# define ABS(a) (((a)>=0) ? (a) : -(a))
+# define ABS(a) (((a)>=0) ? (a) : -(a))
#endif
/* sign of argument */
#ifndef SIGN
-# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
+# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
#endif
/* test for number that is a power of 2 */
/* (from: http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2) */
-# define POWER_OF_TWO(n) (!(n & (n - 1)) && n)
+# define POWER_OF_TWO(n) (!(n & (n - 1)) && n)
/* Raise an integer to a power of 2 */
-# define H5_EXP2(n) (1 << (n))
+# define H5_EXP2(n) (1 << (n))
/*
* HDF Boolean type.
@@ -336,7 +336,7 @@
#endif
/*
- * Numeric data types. Some of these might be defined in Posix.1g, otherwise
+ * Numeric data types. Some of these might be defined in Posix.1g, otherwise
* we define them with the closest available type which is at least as large
* as the number of bits indicated in the type name. The `int8' types *must*
* be exactly one byte wide because we use it for pointer calculations to
@@ -404,28 +404,28 @@
#endif
/*
- * Maximum and minimum values. These should be defined in <limits.h> for the
+ * Maximum and minimum values. These should be defined in <limits.h> for the
* most part.
*/
#ifndef LLONG_MAX
-# define LLONG_MAX ((long long)(((unsigned long long)1 \
- <<(8*sizeof(long long)-1))-1))
+# define LLONG_MAX ((long long)(((unsigned long long)1 \
+ <<(8*sizeof(long long)-1))-1))
# define LLONG_MIN ((long long)(-LLONG_MAX)-1)
#endif
#ifndef ULLONG_MAX
-# define ULLONG_MAX ((unsigned long long)((long long)(-1)))
+# define ULLONG_MAX ((unsigned long long)((long long)(-1)))
#endif
#ifndef SIZET_MAX
-# define SIZET_MAX ((size_t)(ssize_t)(-1))
-# define SSIZET_MAX ((ssize_t)(((size_t)1<<(8*sizeof(ssize_t)-1))-1))
+# define SIZET_MAX ((size_t)(ssize_t)(-1))
+# define SSIZET_MAX ((ssize_t)(((size_t)1<<(8*sizeof(ssize_t)-1))-1))
#endif
/*
* Maximum & minimum values for our typedefs.
*/
-#define HSIZET_MAX ((hsize_t)ULLONG_MAX)
-#define HSSIZET_MAX ((hssize_t)LLONG_MAX)
-#define HSSIZET_MIN (~(HSSIZET_MAX))
+#define HSIZET_MAX ((hsize_t)ULLONG_MAX)
+#define HSSIZET_MAX ((hssize_t)LLONG_MAX)
+#define HSSIZET_MIN (~(HSSIZET_MAX))
/*
* A macro to portably increment enumerated types.
@@ -445,15 +445,15 @@
* Data types and functions for timing certain parts of the library.
*/
typedef struct {
- double utime; /*user time */
- double stime; /*system time */
- double etime; /*elapsed wall-clock time */
+ double utime; /*user time */
+ double stime; /*system time */
+ double etime; /*elapsed wall-clock time */
} H5_timer_t;
H5_DLL void H5_timer_reset (H5_timer_t *timer);
H5_DLL void H5_timer_begin (H5_timer_t *timer);
H5_DLL void H5_timer_end (H5_timer_t *sum/*in,out*/,
- H5_timer_t *timer/*in,out*/);
+ H5_timer_t *timer/*in,out*/);
H5_DLL void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds);
H5_DLL time_t H5_now(void);
@@ -481,19 +481,19 @@ typedef struct {
/* Put all platform-specific definitions in the following file */
/* so that the following definitions are platform free. */
-#include "H5win32defs.h" /* For Windows-specific definitions */
+#include "H5win32defs.h" /* For Windows-specific definitions */
#ifndef HDabort
- #define HDabort() abort()
+ #define HDabort() abort()
#endif /* HDabort */
#ifndef HDabs
- #define HDabs(X) abs(X)
+ #define HDabs(X) abs(X)
#endif /* HDabs */
#ifndef HDaccess
- #define HDaccess(F,M) access(F, M)
+ #define HDaccess(F,M) access(F, M)
#endif /* HDaccess */
#ifndef HDacos
- #define HDacos(X) acos(X)
+ #define HDacos(X) acos(X)
#endif /* HDacos */
#ifndef HDalarm
#ifdef H5_HAVE_ALARM
@@ -503,232 +503,232 @@ typedef struct {
#endif /* H5_HAVE_ALARM */
#endif /* HDalarm */
#ifndef HDasctime
- #define HDasctime(T) asctime(T)
+ #define HDasctime(T) asctime(T)
#endif /* HDasctime */
#ifndef HDasin
- #define HDasin(X) asin(X)
+ #define HDasin(X) asin(X)
#endif /* HDasin */
#ifndef HDassert
- #define HDassert(X) assert(X)
+ #define HDassert(X) assert(X)
#endif /* HDassert */
#ifndef HDatan
- #define HDatan(X) atan(X)
+ #define HDatan(X) atan(X)
#endif /* HDatan */
#ifndef HDatan2
- #define HDatan2(X,Y) atan2(X,Y)
+ #define HDatan2(X,Y) atan2(X,Y)
#endif /* HDatan2 */
#ifndef HDatexit
- #define HDatexit(F) atexit(F)
+ #define HDatexit(F) atexit(F)
#endif /* HDatexit */
#ifndef HDatof
- #define HDatof(S) atof(S)
+ #define HDatof(S) atof(S)
#endif /* HDatof */
#ifndef HDatoi
- #define HDatoi(S) atoi(S)
+ #define HDatoi(S) atoi(S)
#endif /* HDatoi */
#ifndef HDatol
- #define HDatol(S) atol(S)
+ #define HDatol(S) atol(S)
#endif /* HDatol */
#ifndef HDBSDgettimeofday
- #define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P)
+ #define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P)
#endif /* HDBSDgettimeofday */
#ifndef HDbsearch
- #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F)
+ #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F)
#endif /* HDbsearch */
#ifndef HDcalloc
- #define HDcalloc(N,Z) calloc(N,Z)
+ #define HDcalloc(N,Z) calloc(N,Z)
#endif /* HDcalloc */
#ifndef HDceil
- #define HDceil(X) ceil(X)
+ #define HDceil(X) ceil(X)
#endif /* HDceil */
#ifndef HDcfgetispeed
- #define HDcfgetispeed(T) cfgetispeed(T)
+ #define HDcfgetispeed(T) cfgetispeed(T)
#endif /* HDcfgetispeed */
#ifndef HDcfgetospeed
- #define HDcfgetospeed(T) cfgetospeed(T)
+ #define HDcfgetospeed(T) cfgetospeed(T)
#endif /* HDcfgetospeed */
#ifndef HDcfsetispeed
- #define HDcfsetispeed(T,S) cfsetispeed(T,S)
+ #define HDcfsetispeed(T,S) cfsetispeed(T,S)
#endif /* HDcfsetispeed */
#ifndef HDcfsetospeed
- #define HDcfsetospeed(T,S) cfsetospeed(T,S)
+ #define HDcfsetospeed(T,S) cfsetospeed(T,S)
#endif /* HDcfsetospeed */
#ifndef HDchdir
- #define HDchdir(S) chdir(S)
+ #define HDchdir(S) chdir(S)
#endif /* HDchdir */
#ifndef HDchmod
- #define HDchmod(S,M) chmod(S,M)
+ #define HDchmod(S,M) chmod(S,M)
#endif /* HDchmod */
#ifndef HDchown
- #define HDchown(S,O,G) chown(S,O,G)
+ #define HDchown(S,O,G) chown(S,O,G)
#endif /* HDchown */
#ifndef HDclearerr
- #define HDclearerr(F) clearerr(F)
+ #define HDclearerr(F) clearerr(F)
#endif /* HDclearerr */
#ifndef HDclock
- #define HDclock() clock()
+ #define HDclock() clock()
#endif /* HDclock */
#ifndef HDclose
- #define HDclose(F) close(F)
+ #define HDclose(F) close(F)
#endif /* HDclose */
#ifndef HDclosedir
- #define HDclosedir(D) closedir(D)
+ #define HDclosedir(D) closedir(D)
#endif /* HDclosedir */
#ifndef HDcos
- #define HDcos(X) cos(X)
+ #define HDcos(X) cos(X)
#endif /* HDcos */
#ifndef HDcosh
- #define HDcosh(X) cosh(X)
+ #define HDcosh(X) cosh(X)
#endif /* HDcosh */
#ifndef HDcreat
- #define HDcreat(S,M) creat(S,M)
+ #define HDcreat(S,M) creat(S,M)
#endif /* HDcreat */
#ifndef HDctermid
- #define HDctermid(S) ctermid(S)
+ #define HDctermid(S) ctermid(S)
#endif /* HDctermid */
#ifndef HDctime
- #define HDctime(T) ctime(T)
+ #define HDctime(T) ctime(T)
#endif /* HDctime */
#ifndef HDcuserid
- #define HDcuserid(S) cuserid(S)
+ #define HDcuserid(S) cuserid(S)
#endif /* HDcuserid */
#ifndef HDdifftime
#ifdef H5_HAVE_DIFFTIME
- #define HDdifftime(X,Y) difftime(X,Y)
+ #define HDdifftime(X,Y) difftime(X,Y)
#else /* H5_HAVE_DIFFTIME */
- #define HDdifftime(X,Y) ((double)(X)-(double)(Y))
+ #define HDdifftime(X,Y) ((double)(X)-(double)(Y))
#endif /* H5_HAVE_DIFFTIME */
#endif /* HDdifftime */
#ifndef HDdiv
- #define HDdiv(X,Y) div(X,Y)
+ #define HDdiv(X,Y) div(X,Y)
#endif /* HDdiv */
#ifndef HDdup
- #define HDdup(F) dup(F)
+ #define HDdup(F) dup(F)
#endif /* HDdup */
#ifndef HDdup2
- #define HDdup2(F,I) dup2(F,I)
+ #define HDdup2(F,I) dup2(F,I)
#endif /* HDdup2 */
/* execl() variable arguments */
/* execle() variable arguments */
/* execlp() variable arguments */
#ifndef HDexecv
- #define HDexecv(S,AV) execv(S,AV)
+ #define HDexecv(S,AV) execv(S,AV)
#endif /* HDexecv */
#ifndef HDexecve
- #define HDexecve(S,AV,E) execve(S,AV,E)
+ #define HDexecve(S,AV,E) execve(S,AV,E)
#endif /* HDexecve */
#ifndef HDexecvp
- #define HDexecvp(S,AV) execvp(S,AV)
+ #define HDexecvp(S,AV) execvp(S,AV)
#endif /* HDexecvp */
#ifndef HDexit
- #define HDexit(N) exit(N)
+ #define HDexit(N) exit(N)
#endif /* HDexit */
#ifndef HD_exit
- #define HD_exit(N) _exit(N)
+ #define HD_exit(N) _exit(N)
#endif /* HD_exit */
#ifndef HDexp
- #define HDexp(X) exp(X)
+ #define HDexp(X) exp(X)
#endif /* HDexp */
#ifndef HDexp2
- #define HDexp2(X) exp2(X)
+ #define HDexp2(X) exp2(X)
#endif /* HDexp2 */
#ifndef HDfabs
- #define HDfabs(X) fabs(X)
+ #define HDfabs(X) fabs(X)
#endif /* HDfabs */
/* use ABS() because fabsf() fabsl() are not common yet. */
#ifndef HDfabsf
- #define HDfabsf(X) ABS(X)
+ #define HDfabsf(X) ABS(X)
#endif /* HDfabsf */
#ifndef HDfabsl
- #define HDfabsl(X) ABS(X)
+ #define HDfabsl(X) ABS(X)
#endif /* HDfabsl */
#ifndef HDfclose
- #define HDfclose(F) fclose(F)
+ #define HDfclose(F) fclose(F)
#endif /* HDfclose */
/* fcntl() variable arguments */
#ifndef HDfdopen
- #define HDfdopen(N,S) fdopen(N,S)
+ #define HDfdopen(N,S) fdopen(N,S)
#endif /* HDfdopen */
#ifndef HDfeof
- #define HDfeof(F) feof(F)
+ #define HDfeof(F) feof(F)
#endif /* HDfeof */
#ifndef HDferror
- #define HDferror(F) ferror(F)
+ #define HDferror(F) ferror(F)
#endif /* HDferror */
#ifndef HDfflush
- #define HDfflush(F) fflush(F)
+ #define HDfflush(F) fflush(F)
#endif /* HDfflush */
#ifndef HDfgetc
- #define HDfgetc(F) fgetc(F)
+ #define HDfgetc(F) fgetc(F)
#endif /* HDfgetc */
#ifndef HDfgetpos
- #define HDfgetpos(F,P) fgetpos(F,P)
+ #define HDfgetpos(F,P) fgetpos(F,P)
#endif /* HDfgetpos */
#ifndef HDfgets
- #define HDfgets(S,N,F) fgets(S,N,F)
+ #define HDfgets(S,N,F) fgets(S,N,F)
#endif /* HDfgets */
#ifndef HDfileno
- #define HDfileno(F) fileno(F)
+ #define HDfileno(F) fileno(F)
#endif /* HDfileno */
#ifndef HDfloor
- #define HDfloor(X) floor(X)
+ #define HDfloor(X) floor(X)
#endif /* HDfloor */
#ifndef HDfmod
- #define HDfmod(X,Y) fmod(X,Y)
+ #define HDfmod(X,Y) fmod(X,Y)
#endif /* HDfmod */
#ifndef HDfopen
- #define HDfopen(S,M) fopen(S,M)
+ #define HDfopen(S,M) fopen(S,M)
#endif /* HDfopen */
#ifndef HDfork
- #define HDfork() fork()
+ #define HDfork() fork()
#endif /* HDfork */
#ifndef HDfpathconf
- #define HDfpathconf(F,N) fpathconf(F,N)
+ #define HDfpathconf(F,N) fpathconf(F,N)
#endif /* HDfpathconf */
H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDfputc
- #define HDfputc(C,F) fputc(C,F)
+ #define HDfputc(C,F) fputc(C,F)
#endif /* HDfputc */
#ifndef HDfputs
- #define HDfputs(S,F) fputs(S,F)
+ #define HDfputs(S,F) fputs(S,F)
#endif /* HDfputs */
#ifndef HDfread
- #define HDfread(M,Z,N,F) fread(M,Z,N,F)
+ #define HDfread(M,Z,N,F) fread(M,Z,N,F)
#endif /* HDfread */
#ifndef HDfree
- #define HDfree(M) free(M)
+ #define HDfree(M) free(M)
#endif /* HDfree */
#ifndef HDfreopen
- #define HDfreopen(S,M,F) freopen(S,M,F)
+ #define HDfreopen(S,M,F) freopen(S,M,F)
#endif /* HDfreopen */
#ifndef HDfrexp
- #define HDfrexp(X,N) frexp(X,N)
+ #define HDfrexp(X,N) frexp(X,N)
#endif /* HDfrexp */
/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
#ifndef HDfrexpf
#ifdef H5_HAVE_FREXPF
- #define HDfrexpf(X,N) frexpf(X,N)
+ #define HDfrexpf(X,N) frexpf(X,N)
#else /* H5_HAVE_FREXPF */
- #define HDfrexpf(X,N) frexp(X,N)
+ #define HDfrexpf(X,N) frexp(X,N)
#endif /* H5_HAVE_FREXPF */
#endif /* HDfrexpf */
#ifndef HDfrexpl
#ifdef H5_HAVE_FREXPL
- #define HDfrexpl(X,N) frexpl(X,N)
+ #define HDfrexpl(X,N) frexpl(X,N)
#else /* H5_HAVE_FREXPL */
- #define HDfrexpl(X,N) frexp(X,N)
+ #define HDfrexpl(X,N) frexp(X,N)
#endif /* H5_HAVE_FREXPL */
#endif /* HDfrexpl */
/* fscanf() variable arguments */
#ifndef HDfseek
#ifdef H5_HAVE_FSEEKO
- #define HDfseek(F,O,W) fseeko(F,O,W)
+ #define HDfseek(F,O,W) fseeko(F,O,W)
#else /* H5_HAVE_FSEEKO */
- #define HDfseek(F,O,W) fseek(F,O,W)
+ #define HDfseek(F,O,W) fseek(F,O,W)
#endif /* H5_HAVE_FSEEKO */
#endif /* HDfseek */
#ifndef HDfsetpos
- #define HDfsetpos(F,P) fsetpos(F,P)
+ #define HDfsetpos(F,P) fsetpos(F,P)
#endif /* HDfsetpos */
/* definitions related to the file stat utilities.
* For Unix, if off_t is not 64bit big, try use the pseudo-standard
@@ -740,10 +740,10 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDfstat(F,B) fstat64(F,B)
#endif /* HDfstat */
#ifndef HDlstat
- #define HDlstat(S,B) lstat64(S,B)
+ #define HDlstat(S,B) lstat64(S,B)
#endif /* HDlstat */
#ifndef HDstat
- #define HDstat(S,B) stat64(S,B)
+ #define HDstat(S,B) stat64(S,B)
#endif /* HDstat */
typedef struct stat64 h5_stat_t;
typedef off64_t h5_stat_size_t;
@@ -753,10 +753,10 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDfstat(F,B) fstat(F,B)
#endif /* HDfstat */
#ifndef HDlstat
- #define HDlstat(S,B) lstat(S,B)
+ #define HDlstat(S,B) lstat(S,B)
#endif /* HDlstat */
#ifndef HDstat
- #define HDstat(S,B) stat(S,B)
+ #define HDstat(S,B) stat(S,B)
#endif /* HDstat */
typedef struct stat h5_stat_t;
typedef off_t h5_stat_size_t;
@@ -765,7 +765,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#endif /* !defined(HDfstat) || !defined(HDstat) */
#ifndef HDftell
- #define HDftell(F) ftell(F)
+ #define HDftell(F) ftell(F)
#endif /* HDftell */
#ifndef HDftruncate
#ifdef H5_HAVE_FTRUNCATE64
@@ -775,273 +775,273 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#endif
#endif /* HDftruncate */
#ifndef HDfwrite
- #define HDfwrite(M,Z,N,F) fwrite(M,Z,N,F)
+ #define HDfwrite(M,Z,N,F) fwrite(M,Z,N,F)
#endif /* HDfwrite */
#ifndef HDgetc
- #define HDgetc(F) getc(F)
+ #define HDgetc(F) getc(F)
#endif /* HDgetc */
#ifndef HDgetchar
- #define HDgetchar() getchar()
+ #define HDgetchar() getchar()
#endif /* HDgetchar */
#ifndef HDgetcwd
- #define HDgetcwd(S,Z) getcwd(S,Z)
+ #define HDgetcwd(S,Z) getcwd(S,Z)
#endif /* HDgetcwd */
#ifndef HDgetdcwd
- #define HDgetdcwd(D,S,Z) getcwd(S,Z)
+ #define HDgetdcwd(D,S,Z) getcwd(S,Z)
#endif /* HDgetdcwd */
#ifndef HDgetdrive
- #define HDgetdrive() 0
+ #define HDgetdrive() 0
#endif /* HDgetdrive */
#ifndef HDgetegid
- #define HDgetegid() getegid()
+ #define HDgetegid() getegid()
#endif /* HDgetegid() */
#ifndef HDgetenv
- #define HDgetenv(S) getenv(S)
+ #define HDgetenv(S) getenv(S)
#endif /* HDgetenv */
#ifndef HDgeteuid
- #define HDgeteuid() geteuid()
+ #define HDgeteuid() geteuid()
#endif /* HDgeteuid */
#ifndef HDgetgid
- #define HDgetgid() getgid()
+ #define HDgetgid() getgid()
#endif /* HDgetgid */
#ifndef HDgetgrgid
- #define HDgetgrgid(G) getgrgid(G)
+ #define HDgetgrgid(G) getgrgid(G)
#endif /* HDgetgrgid */
#ifndef HDgetgrnam
- #define HDgetgrnam(S) getgrnam(S)
+ #define HDgetgrnam(S) getgrnam(S)
#endif /* HDgetgrnam */
#ifndef HDgetgroups
- #define HDgetgroups(Z,G) getgroups(Z,G)
+ #define HDgetgroups(Z,G) getgroups(Z,G)
#endif /* HDgetgroups */
#ifndef HDgetlogin
- #define HDgetlogin() getlogin()
+ #define HDgetlogin() getlogin()
#endif /* HDgetlogin */
#ifndef HDgetpgrp
- #define HDgetpgrp() getpgrp()
+ #define HDgetpgrp() getpgrp()
#endif /* HDgetpgrp */
#ifndef HDgetpid
- #define HDgetpid() getpid()
+ #define HDgetpid() getpid()
#endif /* HDgetpid */
#ifndef HDgetppid
- #define HDgetppid() getppid()
+ #define HDgetppid() getppid()
#endif /* HDgetppid */
#ifndef HDgetpwnam
- #define HDgetpwnam(S) getpwnam(S)
+ #define HDgetpwnam(S) getpwnam(S)
#endif /* HDgetpwnam */
#ifndef HDgetpwuid
- #define HDgetpwuid(U) getpwuid(U)
+ #define HDgetpwuid(U) getpwuid(U)
#endif /* HDgetpwuid */
#ifndef HDgetrusage
- #define HDgetrusage(X,S) getrusage(X,S)
+ #define HDgetrusage(X,S) getrusage(X,S)
#endif /* HDgetrusage */
#ifndef HDgets
- #define HDgets(S) gets(S)
+ #define HDgets(S) gets(S)
#endif /* HDgets */
#ifndef HDgettimeofday
- #define HDgettimeofday(S,P) gettimeofday(S,P)
+ #define HDgettimeofday(S,P) gettimeofday(S,P)
#endif /* HDgettimeofday */
#ifndef HDgetuid
- #define HDgetuid() getuid()
+ #define HDgetuid() getuid()
#endif /* HDgetuid */
#ifndef HDgmtime
- #define HDgmtime(T) gmtime(T)
+ #define HDgmtime(T) gmtime(T)
#endif /* HDgmtime */
#ifndef HDisalnum
- #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/
+ #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/
#endif /* HDisalnum */
#ifndef HDisalpha
- #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/
+ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/
#endif /* HDisalpha */
#ifndef HDisatty
- #define HDisatty(F) isatty(F)
+ #define HDisatty(F) isatty(F)
#endif /* HDisatty */
#ifndef HDiscntrl
- #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/
+ #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/
#endif /* HDiscntrl */
#ifndef HDisdigit
- #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/
+ #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/
#endif /* HDisdigit */
#ifndef HDisgraph
- #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/
+ #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/
#endif /* HDisgraph */
#ifndef HDislower
- #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/
+ #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/
#endif /* HDislower */
#ifndef HDisprint
- #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/
+ #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/
#endif /* HDisprint */
#ifndef HDispunct
- #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/
+ #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/
#endif /* HDispunct */
#ifndef HDisspace
- #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/
+ #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/
#endif /* HDisspace */
#ifndef HDisupper
- #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/
+ #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/
#endif /* HDisupper */
#ifndef HDisxdigit
- #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/
+ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/
#endif /* HDisxdigit */
#ifndef HDkill
- #define HDkill(P,S) kill(P,S)
+ #define HDkill(P,S) kill(P,S)
#endif /* HDkill */
#ifndef HDlabs
- #define HDlabs(X) labs(X)
+ #define HDlabs(X) labs(X)
#endif /* HDlabs */
#ifndef HDldexp
- #define HDldexp(X,N) ldexp(X,N)
+ #define HDldexp(X,N) ldexp(X,N)
#endif /* HDldexp */
#ifndef HDldiv
- #define HDldiv(X,Y) ldiv(X,Y)
+ #define HDldiv(X,Y) ldiv(X,Y)
#endif /* HDldiv */
#ifndef HDlink
- #define HDlink(OLD,NEW) link(OLD,NEW)
+ #define HDlink(OLD,NEW) link(OLD,NEW)
#endif /* HDlink */
#ifndef HDlocaleconv
- #define HDlocaleconv() localeconv()
+ #define HDlocaleconv() localeconv()
#endif /* HDlocaleconv */
#ifndef HDlocaltime
- #define HDlocaltime(T) localtime(T)
+ #define HDlocaltime(T) localtime(T)
#endif /* HDlocaltime */
#ifndef HDlog
- #define HDlog(X) log(X)
+ #define HDlog(X) log(X)
#endif /* HDlog */
#ifndef HDlog10
- #define HDlog10(X) log10(X)
+ #define HDlog10(X) log10(X)
#endif /* HDlog10 */
#ifndef HDlongjmp
- #define HDlongjmp(J,N) longjmp(J,N)
+ #define HDlongjmp(J,N) longjmp(J,N)
#endif /* HDlongjmp */
/* HDlseek and HDoff_t must be defined together for consistency. */
#ifndef HDlseek
#ifdef H5_HAVE_LSEEK64
- #define HDlseek(F,O,W) lseek64(F,O,W)
- #define HDoff_t off64_t
+ #define HDlseek(F,O,W) lseek64(F,O,W)
+ #define HDoff_t off64_t
#else
- #define HDlseek(F,O,W) lseek(F,O,W)
- #define HDoff_t off_t
+ #define HDlseek(F,O,W) lseek(F,O,W)
+ #define HDoff_t off_t
#endif
#endif /* HDlseek */
#ifndef HDmalloc
- #define HDmalloc(Z) malloc(Z)
+ #define HDmalloc(Z) malloc(Z)
#endif /* HDmalloc */
#ifndef HDposix_memalign
#define HDposix_memalign(P,A,Z) posix_memalign(P,A,Z)
#endif /* HDposix_memalign */
#ifndef HDmblen
- #define HDmblen(S,N) mblen(S,N)
+ #define HDmblen(S,N) mblen(S,N)
#endif /* HDmblen */
#ifndef HDmbstowcs
- #define HDmbstowcs(P,S,Z) mbstowcs(P,S,Z)
+ #define HDmbstowcs(P,S,Z) mbstowcs(P,S,Z)
#endif /* HDmbstowcs */
#ifndef HDmbtowc
- #define HDmbtowc(P,S,Z) mbtowc(P,S,Z)
+ #define HDmbtowc(P,S,Z) mbtowc(P,S,Z)
#endif /* HDmbtowc */
#ifndef HDmemchr
- #define HDmemchr(S,C,Z) memchr(S,C,Z)
+ #define HDmemchr(S,C,Z) memchr(S,C,Z)
#endif /* HDmemchr */
#ifndef HDmemcmp
- #define HDmemcmp(X,Y,Z) memcmp(X,Y,Z)
+ #define HDmemcmp(X,Y,Z) memcmp(X,Y,Z)
#endif /* HDmemcmp */
/*
* The (char*) casts are required for the DEC when optimizations are turned
* on and the source and/or destination are not aligned.
*/
#ifndef HDmemcpy
- #define HDmemcpy(X,Y,Z) memcpy((char*)(X),(const char*)(Y),Z)
+ #define HDmemcpy(X,Y,Z) memcpy((char*)(X),(const char*)(Y),Z)
#endif /* HDmemcpy */
#ifndef HDmemmove
- #define HDmemmove(X,Y,Z) memmove((char*)(X),(const char*)(Y),Z)
+ #define HDmemmove(X,Y,Z) memmove((char*)(X),(const char*)(Y),Z)
#endif /* HDmemmove */
#ifndef HDmemset
- #define HDmemset(X,C,Z) memset(X,C,Z)
+ #define HDmemset(X,C,Z) memset(X,C,Z)
#endif /* HDmemset */
#ifndef HDmkdir
- #define HDmkdir(S,M) mkdir(S,M)
+ #define HDmkdir(S,M) mkdir(S,M)
#endif /* HDmkdir */
#ifndef HDmkfifo
- #define HDmkfifo(S,M) mkfifo(S,M)
+ #define HDmkfifo(S,M) mkfifo(S,M)
#endif /* HDmkfifo */
#ifndef HDmktime
- #define HDmktime(T) mktime(T)
+ #define HDmktime(T) mktime(T)
#endif /* HDmktime */
#ifndef HDmodf
- #define HDmodf(X,Y) modf(X,Y)
+ #define HDmodf(X,Y) modf(X,Y)
#endif /* HDmodf */
#ifndef HDopen
#ifdef _O_BINARY
- #define HDopen(S,F,M) open(S,F|_O_BINARY,M)
+ #define HDopen(S,F,M) open(S,F|_O_BINARY,M)
#else
- #define HDopen(S,F,M) open(S,F,M)
+ #define HDopen(S,F,M) open(S,F,M)
#endif
#endif /* HDopen */
#ifndef HDopendir
- #define HDopendir(S) opendir(S)
+ #define HDopendir(S) opendir(S)
#endif /* HDopendir */
#ifndef HDpathconf
- #define HDpathconf(S,N) pathconf(S,N)
+ #define HDpathconf(S,N) pathconf(S,N)
#endif /* HDpathconf */
#ifndef HDpause
- #define HDpause() pause()
+ #define HDpause() pause()
#endif /* HDpause */
#ifndef HDperror
- #define HDperror(S) perror(S)
+ #define HDperror(S) perror(S)
#endif /* HDperror */
#ifndef HDpipe
- #define HDpipe(F) pipe(F)
+ #define HDpipe(F) pipe(F)
#endif /* HDpipe */
#ifndef HDpow
- #define HDpow(X,Y) pow(X,Y)
+ #define HDpow(X,Y) pow(X,Y)
#endif /* HDpow */
/* printf() variable arguments */
#ifndef HDputc
- #define HDputc(C,F) putc(C,F)
+ #define HDputc(C,F) putc(C,F)
#endif /* HDputc*/
#ifndef HDputchar
- #define HDputchar(C) putchar(C)
+ #define HDputchar(C) putchar(C)
#endif /* HDputchar */
#ifndef HDputs
- #define HDputs(S) puts(S)
+ #define HDputs(S) puts(S)
#endif /* HDputs */
#ifndef HDqsort
- #define HDqsort(M,N,Z,F) qsort(M,N,Z,F)
+ #define HDqsort(M,N,Z,F) qsort(M,N,Z,F)
#endif /* HDqsort*/
#ifndef HDraise
- #define HDraise(N) raise(N)
+ #define HDraise(N) raise(N)
#endif /* HDraise */
#ifdef H5_HAVE_RAND_R
#ifndef HDrandom
- #define HDrandom() HDrand()
+ #define HDrandom() HDrand()
#endif /* HDrandom */
H5_DLL int HDrand(void);
#elif H5_HAVE_RANDOM
#ifndef HDrand
- #define HDrand() random()
+ #define HDrand() random()
#endif /* HDrand */
#ifndef HDrandom
- #define HDrandom() random()
+ #define HDrandom() random()
#endif /* HDrandom */
#else /* H5_HAVE_RANDOM */
#ifndef HDrand
- #define HDrand() rand()
+ #define HDrand() rand()
#endif /* HDrand */
#ifndef HDrandom
- #define HDrandom() rand()
+ #define HDrandom() rand()
#endif /* HDrandom */
#endif /* H5_HAVE_RANDOM */
#ifndef HDread
- #define HDread(F,M,Z) read(F,M,Z)
+ #define HDread(F,M,Z) read(F,M,Z)
#endif /* HDread */
#ifndef HDreaddir
- #define HDreaddir(D) readdir(D)
+ #define HDreaddir(D) readdir(D)
#endif /* HDreaddir */
#ifndef HDrealloc
- #define HDrealloc(M,Z) realloc(M,Z)
+ #define HDrealloc(M,Z) realloc(M,Z)
#endif /* HDrealloc */
#ifndef HDrealpath
- #define HDrealpath(F1,F2) realpath(F1,F2)
+ #define HDrealpath(F1,F2) realpath(F1,F2)
#endif /* HDrealloc */
#ifdef H5_VMS
#ifdef __cplusplus
@@ -1052,126 +1052,126 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
}
#endif /* __cplusplus */
#ifndef HDremove
- #define HDremove(S) HDremove_all(S)
+ #define HDremove(S) HDremove_all(S)
#endif /* HDremove */
#else /* H5_VMS */
#ifndef HDremove
- #define HDremove(S) remove(S)
+ #define HDremove(S) remove(S)
#endif /* HDremove */
#endif /*H5_VMS*/
#ifndef HDrename
- #define HDrename(OLD,NEW) rename(OLD,NEW)
+ #define HDrename(OLD,NEW) rename(OLD,NEW)
#endif /* HDrename */
#ifndef HDrewind
- #define HDrewind(F) rewind(F)
+ #define HDrewind(F) rewind(F)
#endif /* HDrewind */
#ifndef HDrewinddir
- #define HDrewinddir(D) rewinddir(D)
+ #define HDrewinddir(D) rewinddir(D)
#endif /* HDrewinddir */
#ifndef HDrmdir
- #define HDrmdir(S) rmdir(S)
+ #define HDrmdir(S) rmdir(S)
#endif /* HDrmdir */
/* scanf() variable arguments */
#ifndef HDsetbuf
- #define HDsetbuf(F,S) setbuf(F,S)
+ #define HDsetbuf(F,S) setbuf(F,S)
#endif /* HDsetbuf */
#ifndef HDsetgid
- #define HDsetgid(G) setgid(G)
+ #define HDsetgid(G) setgid(G)
#endif /* HDsetgid */
#ifndef HDsetjmp
- #define HDsetjmp(J) setjmp(J)
+ #define HDsetjmp(J) setjmp(J)
#endif /* HDsetjmp */
#ifndef HDsetlocale
- #define HDsetlocale(N,S) setlocale(N,S)
+ #define HDsetlocale(N,S) setlocale(N,S)
#endif /* HDsetlocale */
#ifndef HDsetpgid
- #define HDsetpgid(P,PG) setpgid(P,PG)
+ #define HDsetpgid(P,PG) setpgid(P,PG)
#endif /* HDsetpgid */
#ifndef HDsetsid
- #define HDsetsid() setsid()
+ #define HDsetsid() setsid()
#endif /* HDsetsid */
#ifndef HDsetuid
- #define HDsetuid(U) setuid(U)
+ #define HDsetuid(U) setuid(U)
#endif /* HDsetuid */
#ifndef HDsetvbuf
- #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
+ #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif /* HDsetvbuf */
#ifndef HDsigaddset
- #define HDsigaddset(S,N) sigaddset(S,N)
+ #define HDsigaddset(S,N) sigaddset(S,N)
#endif /* HDsigaddset */
#ifndef HDsigdelset
- #define HDsigdelset(S,N) sigdelset(S,N)
+ #define HDsigdelset(S,N) sigdelset(S,N)
#endif /* HDsigdelset */
#ifndef HDsigemptyset
- #define HDsigemptyset(S) sigemptyset(S)
+ #define HDsigemptyset(S) sigemptyset(S)
#endif /* HDsigemptyset */
#ifndef HDsigfillset
- #define HDsigfillset(S) sigfillset(S)
+ #define HDsigfillset(S) sigfillset(S)
#endif /* HDsigfillset */
#ifndef HDsigismember
- #define HDsigismember(S,N) sigismember(S,N)
+ #define HDsigismember(S,N) sigismember(S,N)
#endif /* HDsigismember */
#ifndef HDsiglongjmp
- #define HDsiglongjmp(J,N) siglongjmp(J,N)
+ #define HDsiglongjmp(J,N) siglongjmp(J,N)
#endif /* HDsiglongjmp */
#ifndef HDsignal
- #define HDsignal(N,F) signal(N,F)
+ #define HDsignal(N,F) signal(N,F)
#endif /* HDsignal */
#ifndef HDsigpending
- #define HDsigpending(S) sigpending(S)
+ #define HDsigpending(S) sigpending(S)
#endif /* HDsigpending */
#ifndef HDsigprocmask
- #define HDsigprocmask(H,S,O) sigprocmask(H,S,O)
+ #define HDsigprocmask(H,S,O) sigprocmask(H,S,O)
#endif /* HDsigprocmask */
#ifndef HDsigsetjmp
- #define HDsigsetjmp(J,N) sigsetjmp(J,N)
+ #define HDsigsetjmp(J,N) sigsetjmp(J,N)
#endif /* HDsigsetjmp */
#ifndef HDsigsuspend
- #define HDsigsuspend(S) sigsuspend(S)
+ #define HDsigsuspend(S) sigsuspend(S)
#endif /* HDsigsuspend */
#ifndef HDsin
- #define HDsin(X) sin(X)
+ #define HDsin(X) sin(X)
#endif /* HDsin */
#ifndef HDsinh
- #define HDsinh(X) sinh(X)
+ #define HDsinh(X) sinh(X)
#endif /* HDsinh */
#ifndef HDsleep
- #define HDsleep(N) sleep(N)
+ #define HDsleep(N) sleep(N)
#endif /* HDsleep */
#ifndef HDsnprintf
- #define HDsnprintf snprintf /*varargs*/
+ #define HDsnprintf snprintf /*varargs*/
#endif /* HDsnprintf */
/* sprintf() variable arguments */
#ifndef HDsqrt
- #define HDsqrt(X) sqrt(X)
+ #define HDsqrt(X) sqrt(X)
#endif /* HDsqrt */
#ifdef H5_HAVE_RAND_R
H5_DLL void HDsrand(unsigned int seed);
#ifndef HDsrandom
- #define HDsrandom(S) HDsrand(S)
+ #define HDsrandom(S) HDsrand(S)
#endif /* HDsrandom */
#elif H5_HAVE_RANDOM
#ifndef HDsrand
- #define HDsrand(S) srandom(S)
+ #define HDsrand(S) srandom(S)
#endif /* HDsrand */
#ifndef HDsrandom
- #define HDsrandom(S) srandom(S)
+ #define HDsrandom(S) srandom(S)
#endif /* HDsrandom */
#else /* H5_HAVE_RAND_R */
#ifndef HDsrand
- #define HDsrand(S) srand(S)
+ #define HDsrand(S) srand(S)
#endif /* HDsrand */
#ifndef HDsrandom
- #define HDsrandom(S) srand(S)
+ #define HDsrandom(S) srand(S)
#endif /* HDsrandom */
#endif /* H5_HAVE_RAND_R */
/* sscanf() variable arguments */
#ifndef HDstrcat
- #define HDstrcat(X,Y) strcat(X,Y)
+ #define HDstrcat(X,Y) strcat(X,Y)
#endif /* HDstrcat */
#ifndef HDstrchr
- #define HDstrchr(S,C) strchr(S,C)
+ #define HDstrchr(S,C) strchr(S,C)
#endif /* HDstrchr */
#ifndef HDstrcmp
#define HDstrcmp(X,Y) strcmp(X,Y)
@@ -1180,181 +1180,181 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDstrcasecmp(X,Y) strcasecmp(X,Y)
#endif /* HDstrcasecmp */
#ifndef HDstrcoll
- #define HDstrcoll(X,Y) strcoll(X,Y)
+ #define HDstrcoll(X,Y) strcoll(X,Y)
#endif /* HDstrcoll */
#ifndef HDstrcpy
- #define HDstrcpy(X,Y) strcpy(X,Y)
+ #define HDstrcpy(X,Y) strcpy(X,Y)
#endif /* HDstrcpy */
#ifndef HDstrcspn
- #define HDstrcspn(X,Y) strcspn(X,Y)
+ #define HDstrcspn(X,Y) strcspn(X,Y)
#endif /* HDstrcspn */
#ifndef HDstrerror
- #define HDstrerror(N) strerror(N)
+ #define HDstrerror(N) strerror(N)
#endif /* HDstrerror */
#ifndef HDstrftime
- #define HDstrftime(S,Z,F,T) strftime(S,Z,F,T)
+ #define HDstrftime(S,Z,F,T) strftime(S,Z,F,T)
#endif /* HDstrftime */
#ifndef HDstrlen
- #define HDstrlen(S) strlen(S)
+ #define HDstrlen(S) strlen(S)
#endif /* HDstrlen */
#ifndef HDstrncat
- #define HDstrncat(X,Y,Z) strncat(X,Y,Z)
+ #define HDstrncat(X,Y,Z) strncat(X,Y,Z)
#endif /* HDstrncat */
#ifndef HDstrncmp
- #define HDstrncmp(X,Y,Z) strncmp(X,Y,Z)
+ #define HDstrncmp(X,Y,Z) strncmp(X,Y,Z)
#endif /* HDstrncmp */
#ifndef HDstrncpy
- #define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
+ #define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
#endif /* HDstrncpy */
#ifndef HDstrpbrk
- #define HDstrpbrk(X,Y) strpbrk(X,Y)
+ #define HDstrpbrk(X,Y) strpbrk(X,Y)
#endif /* HDstrpbrk */
#ifndef HDstrrchr
- #define HDstrrchr(S,C) strrchr(S,C)
+ #define HDstrrchr(S,C) strrchr(S,C)
#endif /* HDstrrchr */
#ifndef HDstrspn
- #define HDstrspn(X,Y) strspn(X,Y)
+ #define HDstrspn(X,Y) strspn(X,Y)
#endif /* HDstrspn */
#ifndef HDstrstr
- #define HDstrstr(X,Y) strstr(X,Y)
+ #define HDstrstr(X,Y) strstr(X,Y)
#endif /* HDstrstr */
#ifndef HDstrtod
- #define HDstrtod(S,R) strtod(S,R)
+ #define HDstrtod(S,R) strtod(S,R)
#endif /* HDstrtod */
#ifndef HDstrtok
- #define HDstrtok(X,Y) strtok(X,Y)
+ #define HDstrtok(X,Y) strtok(X,Y)
#endif /* HDstrtok */
#ifndef HDstrtol
- #define HDstrtol(S,R,N) strtol(S,R,N)
+ #define HDstrtol(S,R,N) strtol(S,R,N)
#endif /* HDstrtol */
H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base);
#ifndef HDstrtoul
- #define HDstrtoul(S,R,N) strtoul(S,R,N)
+ #define HDstrtoul(S,R,N) strtoul(S,R,N)
#endif /* HDstrtoul */
#ifndef HDstrtoull
- #define HDstrtoull(S,R,N) strtoull(S,R,N)
+ #define HDstrtoull(S,R,N) strtoull(S,R,N)
#endif /* HDstrtoul */
#ifndef HDstrxfrm
- #define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
+ #define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
#endif /* HDstrxfrm */
#ifdef H5_HAVE_SYMLINK
#ifndef HDsymlink
- #define HDsymlink(F1,F2) symlink(F1,F2)
+ #define HDsymlink(F1,F2) symlink(F1,F2)
#endif /* HDsymlink */
#endif /* H5_HAVE_SYMLINK */
#ifndef HDsysconf
- #define HDsysconf(N) sysconf(N)
+ #define HDsysconf(N) sysconf(N)
#endif /* HDsysconf */
#ifndef HDsystem
- #define HDsystem(S) system(S)
+ #define HDsystem(S) system(S)
#endif /* HDsystem */
#ifndef HDtan
- #define HDtan(X) tan(X)
+ #define HDtan(X) tan(X)
#endif /* HDtan */
#ifndef HDtanh
- #define HDtanh(X) tanh(X)
+ #define HDtanh(X) tanh(X)
#endif /* HDtanh */
#ifndef HDtcdrain
- #define HDtcdrain(F) tcdrain(F)
+ #define HDtcdrain(F) tcdrain(F)
#endif /* HDtcdrain */
#ifndef HDtcflow
- #define HDtcflow(F,A) tcflow(F,A)
+ #define HDtcflow(F,A) tcflow(F,A)
#endif /* HDtcflow */
#ifndef HDtcflush
- #define HDtcflush(F,N) tcflush(F,N)
+ #define HDtcflush(F,N) tcflush(F,N)
#endif /* HDtcflush */
#ifndef HDtcgetattr
- #define HDtcgetattr(F,T) tcgetattr(F,T)
+ #define HDtcgetattr(F,T) tcgetattr(F,T)
#endif /* HDtcgetattr */
#ifndef HDtcgetpgrp
- #define HDtcgetpgrp(F) tcgetpgrp(F)
+ #define HDtcgetpgrp(F) tcgetpgrp(F)
#endif /* HDtcgetpgrp */
#ifndef HDtcsendbreak
- #define HDtcsendbreak(F,N) tcsendbreak(F,N)
+ #define HDtcsendbreak(F,N) tcsendbreak(F,N)
#endif /* HDtcsendbreak */
#ifndef HDtcsetattr
- #define HDtcsetattr(F,O,T) tcsetattr(F,O,T)
+ #define HDtcsetattr(F,O,T) tcsetattr(F,O,T)
#endif /* HDtcsetattr */
#ifndef HDtcsetpgrp
- #define HDtcsetpgrp(F,N) tcsetpgrp(F,N)
+ #define HDtcsetpgrp(F,N) tcsetpgrp(F,N)
#endif /* HDtcsetpgrp */
#ifndef HDtime
- #define HDtime(T) time(T)
+ #define HDtime(T) time(T)
#endif /* HDtime */
#ifndef HDtimes
- #define HDtimes(T) times(T)
+ #define HDtimes(T) times(T)
#endif /* HDtimes*/
#ifndef HDtmpfile
- #define HDtmpfile() tmpfile()
+ #define HDtmpfile() tmpfile()
#endif /* HDtmpfile */
#ifndef HDtmpnam
- #define HDtmpnam(S) tmpnam(S)
+ #define HDtmpnam(S) tmpnam(S)
#endif /* HDtmpnam */
#ifndef HDtolower
- #define HDtolower(C) tolower(C)
+ #define HDtolower(C) tolower(C)
#endif /* HDtolower */
#ifndef HDtoupper
- #define HDtoupper(C) toupper(C)
+ #define HDtoupper(C) toupper(C)
#endif /* HDtoupper */
#ifndef HDttyname
- #define HDttyname(F) ttyname(F)
+ #define HDttyname(F) ttyname(F)
#endif /* HDttyname */
#ifndef HDtzset
- #define HDtzset() tzset()
+ #define HDtzset() tzset()
#endif /* HDtzset */
#ifndef HDumask
- #define HDumask(N) umask(N)
+ #define HDumask(N) umask(N)
#endif /* HDumask */
#ifndef HDuname
- #define HDuname(S) uname(S)
+ #define HDuname(S) uname(S)
#endif /* HDuname */
#ifndef HDungetc
- #define HDungetc(C,F) ungetc(C,F)
+ #define HDungetc(C,F) ungetc(C,F)
#endif /* HDungetc */
#ifndef HDunlink
- #define HDunlink(S) unlink(S)
+ #define HDunlink(S) unlink(S)
#endif /* HDunlink */
#ifndef HDutime
- #define HDutime(S,T) utime(S,T)
+ #define HDutime(S,T) utime(S,T)
#endif /* HDutime */
#ifndef HDva_arg
- #define HDva_arg(A,T) va_arg(A,T)
+ #define HDva_arg(A,T) va_arg(A,T)
#endif /* HDva_arg */
#ifndef HDva_end
- #define HDva_end(A) va_end(A)
+ #define HDva_end(A) va_end(A)
#endif /* HDva_end */
#ifndef HDva_start
- #define HDva_start(A,P) va_start(A,P)
+ #define HDva_start(A,P) va_start(A,P)
#endif /* HDva_start */
#ifndef HDvasprintf
#define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A)
#endif /* HDvasprintf */
#ifndef HDvfprintf
- #define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A)
+ #define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A)
#endif /* HDvfprintf */
#ifndef HDvprintf
- #define HDvprintf(FMT,A) vprintf(FMT,A)
+ #define HDvprintf(FMT,A) vprintf(FMT,A)
#endif /* HDvprintf */
#ifndef HDvsprintf
- #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A)
+ #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A)
#endif /* HDvsprintf */
#ifndef HDvsnprintf
#define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A)
#endif /* HDvsnprintf */
#ifndef HDwait
- #define HDwait(W) wait(W)
+ #define HDwait(W) wait(W)
#endif /* HDwait */
#ifndef HDwaitpid
- #define HDwaitpid(P,W,O) waitpid(P,W,O)
+ #define HDwaitpid(P,W,O) waitpid(P,W,O)
#endif /* HDwaitpid */
#ifndef HDwcstombs
- #define HDwcstombs(S,P,Z) wcstombs(S,P,Z)
+ #define HDwcstombs(S,P,Z) wcstombs(S,P,Z)
#endif /* HDwcstombs */
#ifndef HDwctomb
- #define HDwctomb(S,C) wctomb(S,C)
+ #define HDwctomb(S,C) wctomb(S,C)
#endif /* HDwctomb */
#ifndef HDwrite
- #define HDwrite(F,M,Z) write(F,M,Z)
+ #define HDwrite(F,M,Z) write(F,M,Z)
#endif /* HDwrite */
/*
@@ -1453,9 +1453,9 @@ extern char *strdup(const char *s);
#if defined(H5_HAVE_WINDOW_PATH)
/* directory delimiter for Windows: slash and backslash are acceptable on Windows */
-#define DIR_SLASH_SEPC '/'
-#define DIR_SEPC '\\'
-#define DIR_SEPS "\\"
+#define DIR_SLASH_SEPC '/'
+#define DIR_SEPC '\\'
+#define DIR_SEPS "\\"
#define CHECK_DELIMITER(SS) ((SS == DIR_SEPC)||(SS == DIR_SLASH_SEPC))
#define CHECK_ABSOLUTE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':') && (CHECK_DELIMITER(NAME[2])))
#define CHECK_ABS_DRIVE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':'))
@@ -1475,59 +1475,68 @@ extern char *strdup(const char *s);
/* OpenVMS pathname: <disk name>$<partition>:[path]<file name>
* i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */
-#define DIR_SEPC '.'
-#define DIR_SEPS "."
+#define DIR_SEPC ']'
+#define DIR_SEPS "]"
#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
#define CHECK_ABSOLUTE(NAME) (strrchr(NAME, ':') && strrchr(NAME, '['))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
-#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, ']');
+#define CHECK_ABS_DRIVE(NAME) (0)
+#define CHECK_ABS_PATH(NAME) (0)
+#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
#else
-#define DIR_SEPC '/'
-#define DIR_SEPS "/"
+#define DIR_SEPC '/'
+#define DIR_SEPS "/"
#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
#define CHECK_ABSOLUTE(NAME) (CHECK_DELIMITER(*NAME))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
+#define CHECK_ABS_DRIVE(NAME) (0)
+#define CHECK_ABS_PATH(NAME) (0)
#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
#endif
-#define COLON_SEPC ':'
+#define COLON_SEPC ':'
+/* Use FUNC to safely handle variations of C99 __func__ keyword handling */
+#ifdef H5_HAVE_C99_FUNC
+#define FUNC __func__
+#elif defined(H5_HAVE_FUNCTION)
+#define FUNC __FUNCTION__
+#else
+#error "We need __func__ or __FUNCTION__ to test function names!"
+#endif
+
/*
* These macros check whether debugging has been requested for a certain
- * package at run-time. Code for debugging is conditionally compiled by
- * defining constants like `H5X_DEBUG'. In order to see the output though
+ * package at run-time. Code for debugging is conditionally compiled by
+ * defining constants like `H5X_DEBUG'. In order to see the output though
* the code must be enabled at run-time with an environment variable
* HDF5_DEBUG which is a list of packages to debug.
*
* Note: If you add/remove items from this enum then be sure to update the
- * information about the package in H5_init_library().
+ * information about the package in H5_init_library().
*/
typedef enum {
- H5_PKG_A, /*Attributes */
- H5_PKG_AC, /*Meta data cache */
- H5_PKG_B, /*B-trees */
- H5_PKG_D, /*Datasets */
- H5_PKG_E, /*Error handling */
- H5_PKG_F, /*Files */
- H5_PKG_G, /*Groups */
- H5_PKG_HG, /*Global heap */
- H5_PKG_HL, /*Local heap */
- H5_PKG_I, /*Interface */
- H5_PKG_MF, /*File memory management */
- H5_PKG_MM, /*Core memory management */
- H5_PKG_O, /*Object headers */
- H5_PKG_P, /*Property lists */
- H5_PKG_S, /*Data spaces */
- H5_PKG_T, /*Data types */
- H5_PKG_V, /*Vector functions */
- H5_PKG_Z, /*Raw data filters */
- H5_NPKGS /*Must be last */
+ H5_PKG_A, /*Attributes */
+ H5_PKG_AC, /*Meta data cache */
+ H5_PKG_B, /*B-trees */
+ H5_PKG_D, /*Datasets */
+ H5_PKG_E, /*Error handling */
+ H5_PKG_F, /*Files */
+ H5_PKG_G, /*Groups */
+ H5_PKG_HG, /*Global heap */
+ H5_PKG_HL, /*Local heap */
+ H5_PKG_I, /*Interface */
+ H5_PKG_MF, /*File memory management */
+ H5_PKG_MM, /*Core memory management */
+ H5_PKG_O, /*Object headers */
+ H5_PKG_P, /*Property lists */
+ H5_PKG_S, /*Data spaces */
+ H5_PKG_T, /*Data types */
+ H5_PKG_V, /*Vector functions */
+ H5_PKG_Z, /*Raw data filters */
+ H5_NPKGS /*Must be last */
} H5_pkg_t;
typedef struct H5_debug_open_stream_t {
@@ -1536,58 +1545,58 @@ typedef struct H5_debug_open_stream_t {
} H5_debug_open_stream_t;
typedef struct H5_debug_t {
- FILE *trace; /*API trace output stream */
+ FILE *trace; /*API trace output stream */
hbool_t ttop; /*Show only top-level calls? */
hbool_t ttimes; /*Show trace event times? */
struct {
- const char *name; /*package name */
- FILE *stream; /*output stream or NULL */
+ const char *name; /*package name */
+ FILE *stream; /*output stream or NULL */
} pkg[H5_NPKGS];
H5_debug_open_stream_t *open_stream; /* Stack of open output streams */
} H5_debug_t;
-extern H5_debug_t H5_debug_g;
-#define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream)
+extern H5_debug_t H5_debug_g;
+#define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream)
/* Do not use const else AIX strings does not show it. */
extern char H5libhdf5_settings[]; /* embedded library information */
/*-------------------------------------------------------------------------
- * Purpose: These macros are inserted automatically just after the
- * FUNC_ENTER() macro of API functions and are used to trace
- * application program execution. Unless H5_DEBUG_API has been
- * defined they are no-ops.
+ * Purpose: These macros are inserted automatically just after the
+ * FUNC_ENTER() macro of API functions and are used to trace
+ * application program execution. Unless H5_DEBUG_API has been
+ * defined they are no-ops.
*
- * Arguments: R - Return type encoded as a string
- * T - Argument types encoded as a string
- * A0-An - Arguments. The number at the end of the macro name
- * indicates the number of arguments.
+ * Arguments: R - Return type encoded as a string
+ * T - Argument types encoded as a string
+ * A0-An - Arguments. The number at the end of the macro name
+ * indicates the number of arguments.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
*
* Modifications:
*-------------------------------------------------------------------------
*/
#ifdef H5_DEBUG_API
-#define H5TRACE_DECL const char *RTYPE=NULL; \
+#define H5TRACE_DECL const char *RTYPE=NULL; \
double CALLTIME;
-#define H5TRACE0(R,T) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T)
-#define H5TRACE1(R,T,A0) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0)
-#define H5TRACE2(R,T,A0,A1) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1)
-#define H5TRACE3(R,T,A0,A1,A2) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2)
-#define H5TRACE4(R,T,A0,A1,A2,A3) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3)
-#define H5TRACE5(R,T,A0,A1,A2,A3,A4) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
+#define H5TRACE0(R,T) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T)
+#define H5TRACE1(R,T,A0) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0)
+#define H5TRACE2(R,T,A0,A1) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1)
+#define H5TRACE3(R,T,A0,A1,A2) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2)
+#define H5TRACE4(R,T,A0,A1,A2,A3) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3)
+#define H5TRACE5(R,T,A0,A1,A2,A3,A4) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
#A4,A4)
-#define H5TRACE6(R,T,A0,A1,A2,A3,A4,A5) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
+#define H5TRACE6(R,T,A0,A1,A2,A3,A4,A5) RTYPE=R; \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
#A4,A4,#A5,A5)
#define H5TRACE7(R,T,A0,A1,A2,A3,A4,A5,A6) RTYPE=R; \
- CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
+ CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
#A4,A4,#A5,A5,#A6,A6)
#define H5TRACE8(R,T,A0,A1,A2,A3,A4,A5,A6,A7) RTYPE=R; \
CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
@@ -1602,48 +1611,46 @@ extern char H5libhdf5_settings[]; /* embedded library information */
CALLTIME=H5_trace(NULL,FUNC,T,#A0,A0,#A1,A1,#A2,A2,#A3,A3, \
#A4,A4,#A5,A5,#A6,A6,#A7,A7,#A8,A8,#A9,A9, \
#A10,A10)
-#define H5TRACE_RETURN(V) if (RTYPE) { \
- H5_trace(&CALLTIME,FUNC,RTYPE,NULL,V); \
- RTYPE=NULL; \
- }
+#define H5TRACE_RETURN(V) if (RTYPE) { \
+ H5_trace(&CALLTIME,FUNC,RTYPE,NULL,V); \
+ RTYPE=NULL; \
+ }
#else
-#define H5TRACE_DECL /*void*/
-#define H5TRACE0(R,T) /*void*/
-#define H5TRACE1(R,T,A0) /*void*/
-#define H5TRACE2(R,T,A0,A1) /*void*/
-#define H5TRACE3(R,T,A0,A1,A2) /*void*/
-#define H5TRACE4(R,T,A0,A1,A2,A3) /*void*/
-#define H5TRACE5(R,T,A0,A1,A2,A3,A4) /*void*/
-#define H5TRACE6(R,T,A0,A1,A2,A3,A4,A5) /*void*/
+#define H5TRACE_DECL /*void*/
+#define H5TRACE0(R,T) /*void*/
+#define H5TRACE1(R,T,A0) /*void*/
+#define H5TRACE2(R,T,A0,A1) /*void*/
+#define H5TRACE3(R,T,A0,A1,A2) /*void*/
+#define H5TRACE4(R,T,A0,A1,A2,A3) /*void*/
+#define H5TRACE5(R,T,A0,A1,A2,A3,A4) /*void*/
+#define H5TRACE6(R,T,A0,A1,A2,A3,A4,A5) /*void*/
#define H5TRACE7(R,T,A0,A1,A2,A3,A4,A5,A6) /*void*/
#define H5TRACE8(R,T,A0,A1,A2,A3,A4,A5,A6,A7) /*void*/
#define H5TRACE9(R,T,A0,A1,A2,A3,A4,A5,A6,A7,A8) /*void*/
#define H5TRACE10(R,T,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9) /*void*/
#define H5TRACE11(R,T,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10) /*void*/
-#define H5TRACE_RETURN(V) /*void*/
+#define H5TRACE_RETURN(V) /*void*/
#endif
H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...);
/*-------------------------------------------------------------------------
- * Purpose: Register function entry for library initialization and code
- * profiling.
- *
- * Notes: Every file must have a file-scope variable called
- * `initialize_interface_g' of type hbool_t which is initialized
- * to FALSE.
+ * Purpose: Register function entry for library initialization and code
+ * profiling.
*
- * Don't use local variable initializers which contain
- * calls to other library functions since the initializer
- * would happen before the FUNC_ENTER() gets called. Don't
- * use initializers that require special cleanup code to
- * execute if FUNC_ENTER() fails since a failing FUNC_ENTER()
- * returns immediately without branching to the `done' label.
+ * Notes: Every file must have a file-scope variable called
+ * `initialize_interface_g' of type hbool_t which is initialized
+ * to FALSE.
*
- * Programmer: Quincey Koziol
+ * Don't use local variable initializers which contain
+ * calls to other library functions since the initializer
+ * would happen before the FUNC_ENTER() gets called. Don't
+ * use initializers that require special cleanup code to
+ * execute if FUNC_ENTER() fails since a failing FUNC_ENTER()
+ * returns immediately without branching to the `done' label.
*
- * Modifications:
+ * Programmer: Quincey Koziol
*
*-------------------------------------------------------------------------
*/
@@ -1652,8 +1659,26 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
/* an API function */
#define H5_IS_API(S) ('_'!=((const char *)S)[2] && '_'!=((const char *)S)[3] && (!((const char *)S)[4] || '_'!=((const char *)S)[4]))
+/* `S' is the name of a function which is being tested to check if it's */
+/* a public API function */
+#define H5_IS_PUB(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && HDislower(S[2])) || \
+ ((HDisdigit(S[2]) || HDisupper(S[2])) && HDislower(S[3])) || \
+ (!S[4] || ((HDisdigit(S[3]) || HDisupper(S[3])) && HDislower(S[4]))))
+
+/* `S' is the name of a function which is being tested to check if it's */
+/* a private library function */
+#define H5_IS_PRIV(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && HDislower(S[3])) || \
+ ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && HDislower(S[4])) || \
+ ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && HDislower(S[5])))
+
+/* `S' is the name of a function which is being tested to check if it's */
+/* a package private function */
+#define H5_IS_PKG(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && '_' == S[3] && HDislower(S[4])) || \
+ ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && '_' == S[4] && HDislower(S[5])) || \
+ ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && '_' == S[5] && HDislower(S[6])))
+
/* global library version information string */
-extern char H5_lib_vers_info_g[];
+extern char H5_lib_vers_info_g[];
/* Lock headers */
#ifdef H5_HAVE_THREADSAFE
@@ -1718,10 +1743,10 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
/* Include required function stack header */
#include "H5CSprivate.h"
-#define H5_PUSH_FUNC(func_name) H5CS_push(func_name);
+#define H5_PUSH_FUNC H5CS_push(FUNC);
#define H5_POP_FUNC H5CS_pop();
#else /* H5_HAVE_CODESTACK */
-#define H5_PUSH_FUNC(func_name) /* void */
+#define H5_PUSH_FUNC /* void */
#define H5_POP_FUNC /* void */
#endif /* H5_HAVE_CODESTACK */
@@ -1729,28 +1754,19 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
#endif
-/* Check if the function name is correct (if the compiler supports __FUNCTION__) */
-#ifdef H5_HAVE_FUNCTION
-#define H5_CHECK_FUNCNAME(func_name) \
- assert(!HDstrcmp(#func_name, __FUNCTION__))
-#else /* H5_HAVE_FUNCTION */
-#define H5_CHECK_FUNCNAME(func_name) \
- assert(func_name)
-#endif /* H5_HAVE_FUNCTION */
-
/* Macros for defining interface initialization routines */
#ifdef H5_INTERFACE_INIT_FUNC
-static int H5_interface_initialize_g = 0;
-static herr_t H5_INTERFACE_INIT_FUNC(void);
-#define H5_INTERFACE_INIT(err) \
- /* Initialize this interface or bust */ \
- if (!H5_interface_initialize_g) { \
- H5_interface_initialize_g = 1; \
- if (H5_INTERFACE_INIT_FUNC()<0) { \
- H5_interface_initialize_g = 0; \
- HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
- "interface initialization failed") \
- } \
+static int H5_interface_initialize_g = 0;
+static herr_t H5_INTERFACE_INIT_FUNC(void);
+#define H5_INTERFACE_INIT(err) \
+ /* Initialize this interface or bust */ \
+ if (!H5_interface_initialize_g) { \
+ H5_interface_initialize_g = 1; \
+ if (H5_INTERFACE_INIT_FUNC()<0) { \
+ H5_interface_initialize_g = 0; \
+ HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
+ "interface initialization failed") \
+ } \
}
#else /* H5_INTERFACE_INIT_FUNC */
#define H5_INTERFACE_INIT(err)
@@ -1758,83 +1774,81 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#ifndef NDEBUG
-#define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) \
- static hbool_t func_check = FALSE; \
- \
- if(!func_check) { \
- /* Check API status */ \
- HDassert(asrt); \
- \
- /* Check function name */ \
- H5_CHECK_FUNCNAME(func_name); \
- \
- /* Don't check again */ \
- func_check = TRUE; \
- } /* end if */
+#define FUNC_ENTER_CHECK_NAME(asrt) \
+ { \
+ static hbool_t func_check = FALSE; \
+ \
+ if(!func_check) { \
+ /* Check function naming status */ \
+ HDassert(asrt); \
+ \
+ /* Don't check again */ \
+ func_check = TRUE; \
+ } /* end if */ \
+ } /* end scope */
#else /* NDEBUG */
-#define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt)
+#define FUNC_ENTER_CHECK_NAME(asrt)
#endif /* NDEBUG */
-#define FUNC_ENTER_COMMON(func_name, asrt) \
- static const char FUNC[] = #func_name; \
- hbool_t err_occurred = FALSE; \
- FUNC_ENTER_COMMON_NOFUNC(func_name, asrt);
-#define FUNC_ENTER_COMMON_NOERR(func_name, asrt) \
- static const char FUNC[] = #func_name; \
- FUNC_ENTER_COMMON_NOFUNC(func_name, asrt);
+#define FUNC_ENTER_COMMON(asrt) \
+ hbool_t err_occurred = FALSE; \
+ FUNC_ENTER_CHECK_NAME(asrt);
+
+#define FUNC_ENTER_COMMON_NOERR(asrt) \
+ FUNC_ENTER_CHECK_NAME(asrt);
/* Threadsafety initialization code for API routines */
#define FUNC_ENTER_API_THREADSAFE \
- /* Initialize the thread-safe code */ \
+ /* Initialize the thread-safe code */ \
H5_FIRST_THREAD_INIT \
- \
- /* Grab the mutex for the library */ \
+ \
+ /* Grab the mutex for the library */ \
H5_API_UNSET_CANCEL \
H5_API_LOCK
/* Local variables for API routines */
-#define FUNC_ENTER_API_VARS(func_name) \
- MPE_LOG_VARS(func_name) \
+#define FUNC_ENTER_API_VARS \
+ MPE_LOG_VARS \
H5TRACE_DECL
-#define FUNC_ENTER_API_COMMON(func_name) \
- FUNC_ENTER_API_VARS(func_name) \
- FUNC_ENTER_COMMON(func_name, H5_IS_API(#func_name)); \
+#define FUNC_ENTER_API_COMMON \
+ FUNC_ENTER_API_VARS \
+ FUNC_ENTER_COMMON(H5_IS_API(FUNC)); \
FUNC_ENTER_API_THREADSAFE;
-#define FUNC_ENTER_API_INIT(func_name,err) \
- /* Initialize the library */ \
+#define FUNC_ENTER_API_INIT(err) \
+ /* Initialize the library */ \
if(!(H5_INIT_GLOBAL)) { \
H5_INIT_GLOBAL = TRUE; \
- if(H5_init_library() < 0) \
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, err, \
- "library initialization failed") \
- } \
+ if(H5_init_library() < 0) \
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, err, \
+ "library initialization failed") \
+ } \
\
- /* Initialize the interface, if appropriate */ \
- H5_INTERFACE_INIT(err) \
+ /* Initialize the interface, if appropriate */ \
+ H5_INTERFACE_INIT(err) \
\
/* Push the name of this function on the function stack */ \
- H5_PUSH_FUNC(#func_name) \
+ H5_PUSH_FUNC \
\
- BEGIN_MPE_LOG(func_name)
+ BEGIN_MPE_LOG
/* Use this macro for all "normal" API functions */
-#define FUNC_ENTER_API(func_name,err) {{ \
- FUNC_ENTER_API_COMMON(func_name) \
- FUNC_ENTER_API_INIT(func_name,err); \
- /* Clear thread error stack entering public functions */ \
- H5E_clear_stack(NULL); \
+#define FUNC_ENTER_API(err) {{ \
+ FUNC_ENTER_API_COMMON \
+ FUNC_ENTER_API_INIT(err); \
+ /* Clear thread error stack entering public functions */ \
+ H5E_clear_stack(NULL); \
{
/*
* Use this macro for API functions that shouldn't clear the error stack
* like H5Eprint and H5Ewalk.
*/
-#define FUNC_ENTER_API_NOCLEAR(func_name,err) {{ \
- FUNC_ENTER_API_COMMON(func_name) \
- FUNC_ENTER_API_INIT(func_name,err); \
+#define FUNC_ENTER_API_NOCLEAR(err) {{ \
+ FUNC_ENTER_API_COMMON \
+ FUNC_ENTER_API_INIT(err); \
{
/*
@@ -1843,10 +1857,10 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* are: H5check_version, etc.
*
*/
-#define FUNC_ENTER_API_NOINIT(func_name) {{ \
- FUNC_ENTER_API_COMMON(func_name) \
- H5_PUSH_FUNC(#func_name) \
- BEGIN_MPE_LOG(func_name); \
+#define FUNC_ENTER_API_NOINIT {{ \
+ FUNC_ENTER_API_COMMON \
+ H5_PUSH_FUNC \
+ BEGIN_MPE_LOG \
{
/*
@@ -1856,50 +1870,55 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* are: H5close, H5check_version, etc.
*
*/
-#define FUNC_ENTER_API_NOINIT_NOERR_NOFS(func_name) {{ \
- FUNC_ENTER_API_VARS(func_name) \
- FUNC_ENTER_COMMON_NOERR(func_name, H5_IS_API(#func_name)); \
- FUNC_ENTER_API_THREADSAFE; \
- BEGIN_MPE_LOG(func_name); \
+#define FUNC_ENTER_API_NOINIT_NOERR_NOFS {{ \
+ FUNC_ENTER_API_VARS \
+ FUNC_ENTER_COMMON_NOERR(H5_IS_API(FUNC)); \
+ FUNC_ENTER_API_THREADSAFE; \
+ BEGIN_MPE_LOG \
{
/* Note: this macro only works when there's _no_ interface initialization routine for the module */
-#define FUNC_ENTER_NOAPI_INIT(func_name,err) \
- /* Initialize the interface, if appropriate */ \
- H5_INTERFACE_INIT(err) \
+#define FUNC_ENTER_NOAPI_INIT(err) \
+ /* Initialize the interface, if appropriate */ \
+ H5_INTERFACE_INIT(err) \
\
/* Push the name of this function on the function stack */ \
- H5_PUSH_FUNC(#func_name)
+ H5_PUSH_FUNC
/* Use this macro for all "normal" non-API functions */
-#define FUNC_ENTER_NOAPI(func_name,err) { \
- FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \
- FUNC_ENTER_NOAPI_INIT(func_name,err) \
+#define FUNC_ENTER_NOAPI(err) { \
+ FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \
+ FUNC_ENTER_NOAPI_INIT(err) \
{
-/* Use this macro for all non-API functions, which propagate errors, but don't issue them */
-#define FUNC_ENTER_NOAPI_NOERR(func_name,err) { \
- FUNC_ENTER_COMMON_NOERR(func_name, !H5_IS_API(#func_name)); \
- FUNC_ENTER_NOAPI_INIT(func_name,err) \
+/* Use this macro for all "normal" package-level functions */
+#define FUNC_ENTER_PACKAGE { \
+ FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
{
-/* Use this macro for all non-API functions which don't issue errors */
-#define FUNC_ENTER_NOAPI_NOFUNC(func_name) { \
- FUNC_ENTER_COMMON_NOFUNC(func_name,!H5_IS_API(#func_name)); \
- FUNC_ENTER_NOAPI_INIT(func_name,err) \
+/* Use this macro for package-level functions which propgate errors, but don't issue them */
+#define FUNC_ENTER_PACKAGE_NOERR { \
+ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
{
-/*
- * Use this macro for non-API functions which fall into these categories:
- * - static functions, since they must be called from a function in the
- * interface, the library and interface must already be
- * initialized.
- * - functions which are called during library shutdown, since we don't
- * want to re-initialize the library.
- */
-#define FUNC_ENTER_NOAPI_NOINIT(func_name) { \
- FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \
- H5_PUSH_FUNC(#func_name) \
+/* Use the following macro as replacement for the FUNC_ENTER_PACKAGE
+ * macro when the function needs to set up a metadata tag. */
+#define FUNC_ENTER_PACKAGE_TAG(dxpl_id, tag, err) { \
+ haddr_t prev_tag = HADDR_UNDEF; \
+ hid_t tag_dxpl_id = dxpl_id; \
+ \
+ FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
+ if(H5AC_tag(tag_dxpl_id, tag, &prev_tag) < 0) \
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \
+ H5_PUSH_FUNC \
+ {
+
+/* Use this macro for all non-API functions, which propagate errors, but don't issue them */
+#define FUNC_ENTER_NOAPI_NOERR { \
+ FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \
+ FUNC_ENTER_NOAPI_INIT(-) \
{
/*
@@ -1909,11 +1928,10 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* initialized.
* - functions which are called during library shutdown, since we don't
* want to re-initialize the library.
- * - functions that propagate, but don't issue errors
*/
-#define FUNC_ENTER_NOAPI_NOINIT_NOERR(func_name) { \
- FUNC_ENTER_COMMON_NOERR(func_name, !H5_IS_API(#func_name)); \
- H5_PUSH_FUNC(#func_name) \
+#define FUNC_ENTER_NOAPI_NOINIT { \
+ FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \
+ H5_PUSH_FUNC \
{
/*
@@ -1923,14 +1941,11 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* initialized.
* - functions which are called during library shutdown, since we don't
* want to re-initialize the library.
- *
- * This macro is used for functions which fit the above categories _and_
- * also don't use the 'FUNC' variable (i.e. don't push errors on the error stack)
- *
+ * - functions that propagate, but don't issue errors
*/
-#define FUNC_ENTER_NOAPI_NOINIT_NOFUNC(func_name) { \
- FUNC_ENTER_COMMON_NOFUNC(func_name,!H5_IS_API(#func_name)); \
- H5_PUSH_FUNC(#func_name) \
+#define FUNC_ENTER_NOAPI_NOINIT_NOERR { \
+ FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \
+ H5_PUSH_FUNC \
{
/*
@@ -1942,37 +1957,37 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* also don't use the 'FUNC' variable (i.e. don't push errors on the error stack)
*
*/
-#define FUNC_ENTER_NOAPI_NOFUNC_NOFS(func_name) { \
- FUNC_ENTER_COMMON_NOFUNC(func_name,!H5_IS_API(#func_name)); \
+#define FUNC_ENTER_NOAPI_NOERR_NOFS { \
+ FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \
{
/* Use the following two macros as replacements for the FUNC_ENTER_NOAPI
* and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set
* up a metadata tag. */
-#define FUNC_ENTER_NOAPI_TAG(func_name, dxpl_id, tag, err) { \
+#define FUNC_ENTER_NOAPI_TAG(dxpl_id, tag, err) { \
haddr_t prev_tag = HADDR_UNDEF; \
hid_t tag_dxpl_id = dxpl_id; \
- FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \
+ FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \
if(H5AC_tag(tag_dxpl_id, tag, &prev_tag)<0) \
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \
- FUNC_ENTER_NOAPI_INIT(func_name,err) \
+ FUNC_ENTER_NOAPI_INIT(err) \
{
-#define FUNC_ENTER_NOAPI_NOINIT_TAG(func_name, dxpl_id, tag, err) { \
+#define FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, tag, err) { \
haddr_t prev_tag = HADDR_UNDEF; \
hid_t tag_dxpl_id = dxpl_id; \
- FUNC_ENTER_COMMON(func_name, !H5_IS_API(#func_name)); \
+ FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \
if(H5AC_tag(tag_dxpl_id, tag, &prev_tag)<0) \
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \
- H5_PUSH_FUNC(#func_name) \
+ H5_PUSH_FUNC \
{
/*-------------------------------------------------------------------------
- * Purpose: Register function exit for code profiling. This should be
- * the last statement executed by a function.
+ * Purpose: Register function exit for code profiling. This should be
+ * the last statement executed by a function.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
*
*-------------------------------------------------------------------------
*/
@@ -1982,34 +1997,34 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
H5_API_SET_CANCEL
#define FUNC_LEAVE_API(ret_value) \
- FINISH_MPE_LOG; \
- H5TRACE_RETURN(ret_value); \
+ FINISH_MPE_LOG \
+ H5TRACE_RETURN(ret_value); \
H5_POP_FUNC \
- if(err_occurred) \
- (void)H5E_dump_api_stack(TRUE); \
+ if(err_occurred) \
+ (void)H5E_dump_api_stack(TRUE); \
FUNC_LEAVE_API_THREADSAFE \
- return(ret_value); \
+ return(ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
}} /*end scope from beginning of FUNC_ENTER*/
/* Use this macro to match the FUNC_ENTER_API_NOFS macro */
#define FUNC_LEAVE_API_NOFS(ret_value) \
- FINISH_MPE_LOG; \
- H5TRACE_RETURN(ret_value); \
+ FINISH_MPE_LOG \
+ H5TRACE_RETURN(ret_value); \
FUNC_LEAVE_API_THREADSAFE \
- return(ret_value); \
+ return(ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
}} /*end scope from beginning of FUNC_ENTER*/
#define FUNC_LEAVE_NOAPI(ret_value) \
H5_POP_FUNC \
- return(ret_value); \
+ return(ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
} /*end scope from beginning of FUNC_ENTER*/
#define FUNC_LEAVE_NOAPI_VOID \
H5_POP_FUNC \
- return; \
+ return; \
} /*end scope from end of FUNC_ENTER*/ \
} /*end scope from beginning of FUNC_ENTER*/
@@ -2019,7 +2034,7 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
* (so far, just the H5CS routines themselves)
*/
#define FUNC_LEAVE_NOAPI_NOFS(ret_value) \
- return(ret_value); \
+ return(ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
} /*end scope from beginning of FUNC_ENTER*/
@@ -2028,7 +2043,7 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
if(H5AC_tag(tag_dxpl_id, prev_tag, NULL)<0) \
HDONE_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \
H5_POP_FUNC \
- return(ret_value); \
+ return(ret_value); \
} /*end scope from end of FUNC_ENTER*/ \
} /*end scope from beginning of FUNC_ENTER*/
@@ -2036,41 +2051,6 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
/* Revisions to FUNC_ENTER/LEAVE Macros */
/****************************************/
-/* `S' is the name of a function which is being tested to check if it's */
-/* a public API function */
-#define H5_IS_PUB(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && HDislower(S[2])) || \
- ((HDisdigit(S[2]) || HDisupper(S[2])) && HDislower(S[3])) || \
- (!S[4] || ((HDisdigit(S[3]) || HDisupper(S[3])) && HDislower(S[4]))))
-
-/* `S' is the name of a function which is being tested to check if it's */
-/* a private library function */
-#define H5_IS_PRIV(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && HDislower(S[3])) || \
- ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && HDislower(S[4])) || \
- ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && HDislower(S[5])))
-
-/* `S' is the name of a function which is being tested to check if it's */
-/* a package private function */
-#define H5_IS_PKG(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && '_' == S[2] && '_' == S[3] && HDislower(S[4])) || \
- ((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && '_' == S[4] && HDislower(S[5])) || \
- ((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && '_' == S[5] && HDislower(S[6])))
-
-#ifndef NDEBUG
-#define FUNC_ENTER_NAME_CHECK(asrt) \
- { \
- static hbool_t func_check = FALSE; \
- \
- if(!func_check) { \
- /* Check function naming status */ \
- HDassert(asrt); \
- \
- /* Don't check again */ \
- func_check = TRUE; \
- } /* end if */ \
- } /* end scope */
-#else /* NDEBUG */
-#define FUNC_ENTER_NAME_CHECK(asrt)
-#endif /* NDEBUG */
-
/* Macros for referencing package initialization symbols */
#define H5_PACKAGE_INIT_VAR(x) H5_GLUE3(H5_, x, _init_g)
#define H5_PACKAGE_INIT_FUNC(x) H5_GLUE(x, __pkg_init)
@@ -2082,14 +2062,14 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
#define H5_CHECK_PACKAGE_INIT_INIT_NO(asrt)
/* Macros to initialize package, if a package initialization routine is defined */
-#define H5_PKG_YES_INIT(pkg) \
- if(!H5_PACKAGE_INIT_VAR(pkg)) { \
- if(H5_GLUE(pkg, _pkg_init)() < 0) { \
- /* (Can't use H5E_THROW here) */ \
+#define H5_PKG_YES_INIT(pkg) \
+ if(!H5_PACKAGE_INIT_VAR(pkg)) { \
+ if(H5_GLUE(pkg, _pkg_init)() < 0) { \
+ /* (Can't use H5E_THROW here) */ \
H5E_PRINTF(H5E_CANTINIT, "interface initialization failed"); \
- ret_value = fail_value; \
- goto func_init_failed; \
- } /* end if */ \
+ ret_value = fail_value; \
+ goto func_init_failed; \
+ } /* end if */ \
} /* end if */
#define H5_PKG_NO_INIT(pkg)
@@ -2110,113 +2090,104 @@ H5_DECLARE_PKG_FUNC(H5_MY_PKG_INIT, H5_MY_PKG)
/* API re-entrance variable */
extern hbool_t H5_api_entered_g; /* Has library already been entered through API? */
-/* Use FUNCNAME to safely handle variations of C99 __func__ keyword handling */
-#ifdef H5_HAVE_C99_FUNC
-#define FUNCNAME __func__
-#elif defined(H5_HAVE_FUNCTION)
-#define FUNCNAME __FUNCTION__
-#else
-#error "We need __func__ or __FUNCTION__ to test function names!"
-#endif
-
/* Macros for entering different scopes of routines */
-#define H5_PACKAGE_ENTER(pkg, pkg_init, init) \
- FUNC_ENTER_NAME_CHECK(H5_IS_PKG(FUNCNAME)) \
+#define H5_PACKAGE_ENTER(pkg, pkg_init, init) \
+ FUNC_ENTER_CHECK_NAME(H5_IS_PKG(FUNC)) \
\
- /* The library should be initialized already */ \
- HDassert(H5_INIT_GLOBAL); \
+ /* The library should be initialized already */ \
+ HDassert(H5_INIT_GLOBAL); \
\
- /* This interface should be initialized already */ \
- /* (except for package initialization routines :-) */ \
- H5_GLUE4(H5_CHECK_PACKAGE_INIT_, init, _, pkg_init)(pkg) \
+ /* This interface should be initialized already */ \
+ /* (except for package initialization routines :-) */ \
+ H5_GLUE4(H5_CHECK_PACKAGE_INIT_, init, _, pkg_init)(pkg) \
\
- /* Push the name of this function on the function stack */ \
- H5_PUSH_FUNC(FUNCNAME) \
+ /* Push the name of this function on the function stack */ \
+ H5_PUSH_FUNC \
\
- /* Enter scope for this type of function */ \
+ /* Enter scope for this type of function */ \
{
-#define H5_PRIVATE_ENTER(pkg, pkg_init) \
- FUNC_ENTER_NAME_CHECK(H5_IS_PRIV(FUNCNAME)) \
+#define H5_PRIVATE_ENTER(pkg, pkg_init) \
+ FUNC_ENTER_CHECK_NAME(H5_IS_PRIV(FUNC)) \
\
- /* The library should be initialized already */ \
- HDassert(H5_INIT_GLOBAL); \
+ /* The library should be initialized already */ \
+ HDassert(H5_INIT_GLOBAL); \
\
- /* Initialize this interface if desired */ \
- H5_GLUE3(H5_PKG_, pkg_init, _INIT)(pkg) \
+ /* Initialize this interface if desired */ \
+ H5_GLUE3(H5_PKG_, pkg_init, _INIT)(pkg) \
\
- /* Push the name of this function on the function stack */ \
- H5_PUSH_FUNC(FUNCNAME) \
+ /* Push the name of this function on the function stack */ \
+ H5_PUSH_FUNC \
\
- /* Enter scope for this type of function */ \
+ /* Enter scope for this type of function */ \
{{
-#define H5_PUBLIC_ENTER(pkg, pkg_init) \
- FUNC_ENTER_API_VARS(FUNCNAME) \
+#define H5_PUBLIC_ENTER(pkg, pkg_init) \
+ FUNC_ENTER_API_VARS \
FUNC_ENTER_API_THREADSAFE; \
- FUNC_ENTER_NAME_CHECK(H5_IS_PUB(FUNCNAME)) \
+ FUNC_ENTER_CHECK_NAME(H5_IS_PUB(FUNC)) \
\
- /* Clear thread error stack when entering public functions */ \
- H5E_clear_stack(NULL); \
+ /* Clear thread error stack when entering public functions */ \
+ H5E_clear_stack(NULL); \
\
- /* Initialize the library or bust */ \
- if(!(H5_INIT_GLOBAL)) { \
+ /* Initialize the library or bust */ \
+ if(!(H5_INIT_GLOBAL)) { \
H5_INIT_GLOBAL = TRUE; \
- if(H5_init_library() < 0) { \
- /* (Can't use H5E_THROW here) */ \
+ if(H5_init_library() < 0) { \
+ /* (Can't use H5E_THROW here) */ \
H5E_PRINTF(H5E_CANTINIT, "interface initialization failed"); \
- ret_value = fail_value; \
- goto func_init_failed; \
- } /* end if */ \
- } /* end if */ \
+ ret_value = fail_value; \
+ goto func_init_failed; \
+ } /* end if */ \
+ } /* end if */ \
\
- /* Initialize this interface if desired */ \
- H5_GLUE3(H5_PKG_, pkg_init, _INIT)(pkg) \
+ /* Initialize this interface if desired */ \
+ H5_GLUE3(H5_PKG_, pkg_init, _INIT)(pkg) \
\
- /* Check for re-entering API routine */ \
- HDassert(!H5_api_entered_g); \
- H5_api_entered_g = TRUE; \
+ /* Check for re-entering API routine */ \
+ HDassert(!H5_api_entered_g); \
+ H5_api_entered_g = TRUE; \
\
- /* Start logging MPI's MPE information */ \
- BEGIN_MPE_LOG(FUNCNAME) \
+ /* Start logging MPI's MPE information */ \
+ BEGIN_MPE_LOG \
\
- /* Push the name of this function on the function stack */ \
- H5_PUSH_FUNC(FUNCNAME) \
+ /* Push the name of this function on the function stack */ \
+ H5_PUSH_FUNC \
\
- /* Enter scope for this type of function */ \
+ /* Enter scope for this type of function */ \
{{{
/* Macros for substituting the package name */
-#define FUNC_ENTER_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
-#define FUNC_ENTER_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
-#define FUNC_ENTER_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENTER_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENTER_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
+#define FUNC_ENTER_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENTER_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENTER_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
/* Macros for substituting a function prefix */
-#define FUNC_PREFIX_STATIC static
+#define FUNC_PREFIX_STATIC static
#define FUNC_PREFIX_PKGINIT
#define FUNC_PREFIX_PKG
#define FUNC_PREFIX_PRIV
#define FUNC_PREFIX_PUB
/* Macros for declaring error variables */
-#define FUNC_ERR_VAR_ERR(ret_typ, err) \
- hbool_t past_catch = FALSE; \
+#define FUNC_ERR_VAR_ERR(ret_typ, err) \
+ hbool_t past_catch = FALSE; \
ret_typ fail_value = err;
-#define FUNC_ERR_VAR_ERRCATCH(ret_typ, err) \
+#define FUNC_ERR_VAR_ERRCATCH(ret_typ, err) \
hbool_t past_catch = FALSE;
#define FUNC_ERR_VAR_NOERR(ret_typ, err)
/* Use this macro when entering all functions */
-#define BEGIN_FUNC(scope, use_err, ret_typ, ret_init, err, func) \
-H5_GLUE(FUNC_PREFIX_, scope) \
-ret_typ \
-func \
-/* Open function */ \
-{ \
- ret_typ ret_value = ret_init; \
- H5_GLUE(FUNC_ERR_VAR_, use_err)(ret_typ, err) \
+#define BEGIN_FUNC(scope, use_err, ret_typ, ret_init, err, func) \
+H5_GLUE(FUNC_PREFIX_, scope) \
+ret_typ \
+func \
+/* Open function */ \
+{ \
+ ret_typ ret_value = ret_init; \
+ H5_GLUE(FUNC_ERR_VAR_, use_err)(ret_typ, err) \
H5_GLUE(FUNC_ENTER_, scope)
/* Macros for label when a function initialization can fail */
@@ -2225,73 +2196,73 @@ func \
#define H5_PRIV_FUNC_INIT_FAILED(pkg_init) H5_GLUE3(H5_PRIV_, pkg_init, _FUNC_INIT_FAILED)
/* Macros for leaving different scopes of routines */
-#define FUNC_LEAVE_PKGINIT \
- /* Leave scope for this type of function */ \
- } \
+#define FUNC_LEAVE_PKGINIT \
+ /* Leave scope for this type of function */ \
+ } \
\
- /* Pop the name of this function off the function stack */ \
+ /* Pop the name of this function off the function stack */ \
H5_POP_FUNC
-#define FUNC_LEAVE_STATIC \
- /* Leave scope for this type of function */ \
- } \
+#define FUNC_LEAVE_STATIC \
+ /* Leave scope for this type of function */ \
+ } \
\
- /* Pop the name of this function off the function stack */ \
+ /* Pop the name of this function off the function stack */ \
H5_POP_FUNC
-#define FUNC_LEAVE_PKG \
- /* Leave scope for this type of function */ \
- } \
+#define FUNC_LEAVE_PKG \
+ /* Leave scope for this type of function */ \
+ } \
\
- /* Pop the name of this function off the function stack */ \
+ /* Pop the name of this function off the function stack */ \
H5_POP_FUNC
-#define FUNC_LEAVE_PRIV \
- /* Leave scope for this type of function */ \
- }} \
+#define FUNC_LEAVE_PRIV \
+ /* Leave scope for this type of function */ \
+ }} \
\
- /* Label for errors during FUNC_ENTER */ \
- H5_PRIV_FUNC_INIT_FAILED(H5_MY_PKG_INIT) \
+ /* Label for errors during FUNC_ENTER */ \
+ H5_PRIV_FUNC_INIT_FAILED(H5_MY_PKG_INIT) \
\
- /* Pop the name of this function off the function stack */ \
+ /* Pop the name of this function off the function stack */ \
H5_POP_FUNC
-#define FUNC_LEAVE_PUB \
- /* Leave scope for this type of function */ \
- }}} \
+#define FUNC_LEAVE_PUB \
+ /* Leave scope for this type of function */ \
+ }}} \
\
- /* Label for errors during FUNC_ENTER */ \
-func_init_failed: \
+ /* Label for errors during FUNC_ENTER */ \
+func_init_failed: \
\
- /* Dump error stack if an error occurred during API routine */ \
- if(ret_value == fail_value) \
- (void)H5E_dump_api_stack(TRUE); \
+ /* Dump error stack if an error occurred during API routine */ \
+ if(ret_value == fail_value) \
+ (void)H5E_dump_api_stack(TRUE); \
\
- /* Finish the API tracing info */ \
- H5TRACE_RETURN(ret_value); \
+ /* Finish the API tracing info */ \
+ H5TRACE_RETURN(ret_value); \
\
- /* Pop the name of this function off the function stack */ \
- H5_POP_FUNC \
+ /* Pop the name of this function off the function stack */ \
+ H5_POP_FUNC \
\
- /* Finish the MPE tracing info */ \
- FINISH_MPE_LOG; \
+ /* Finish the MPE tracing info */ \
+ FINISH_MPE_LOG \
\
- /* Check for leaving API routine */ \
- HDassert(H5_api_entered_g); \
- H5_api_entered_g = FALSE; \
+ /* Check for leaving API routine */ \
+ HDassert(H5_api_entered_g); \
+ H5_api_entered_g = FALSE; \
\
- /* Release thread-safety semaphore */ \
+ /* Release thread-safety semaphore */ \
FUNC_LEAVE_API_THREADSAFE
/* Use this macro when leaving all functions */
-#define END_FUNC(scope) \
- /* Scope-specific function conclusion */ \
- H5_GLUE(FUNC_LEAVE_, scope) \
+#define END_FUNC(scope) \
+ /* Scope-specific function conclusion */ \
+ H5_GLUE(FUNC_LEAVE_, scope) \
\
- /* Leave routine */ \
- return(ret_value); \
+ /* Leave routine */ \
+ return(ret_value); \
\
- /* Close Function */ \
+ /* Close Function */ \
}
/* Macro to begin/end tagging (when FUNC_ENTER_*TAG macros are insufficient) */
diff --git a/src/H5public.h b/src/H5public.h
index 29633d4..6253d63 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 81 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 111 /* 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.81-FA_a5" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.111-FA_a5" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/H5system.c b/src/H5system.c
index afe07b0..bb1d2f1 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -15,11 +15,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5system.c
- * Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5system.c
+ * Aug 21 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: System call wrapper implementations.
+ * Purpose: System call wrapper implementations.
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +32,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Eprivate.h"
@@ -75,71 +75,71 @@
/*-------------------------------------------------------------------------
- * Function: HDfprintf
+ * Function: HDfprintf
*
- * Purpose: Prints the optional arguments under the control of the format
- * string FMT to the stream STREAM. This function takes the
- * same format as fprintf(3c) with a few added features:
+ * Purpose: Prints the optional arguments under the control of the format
+ * string FMT to the stream STREAM. This function takes the
+ * same format as fprintf(3c) with a few added features:
*
- * The conversion modifier `H' refers to the size of an
- * `hsize_t' or `hssize_t' type. For instance, "0x%018Hx"
- * prints an `hsize_t' value as a hex number right justified and
- * zero filled in an 18-character field.
+ * The conversion modifier `H' refers to the size of an
+ * `hsize_t' or `hssize_t' type. For instance, "0x%018Hx"
+ * prints an `hsize_t' value as a hex number right justified and
+ * zero filled in an 18-character field.
*
- * The conversion `a' refers to an `haddr_t' type.
+ * The conversion `a' refers to an `haddr_t' type.
*
- * Return: Success: Number of characters printed
+ * Return: Success: Number of characters printed
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, April 9, 1998
*
* Modifications:
- * Robb Matzke, 1999-07-27
- * The `%a' format refers to an argument of `haddr_t' type
- * instead of `haddr_t*' and the return value is correct.
+ * Robb Matzke, 1999-07-27
+ * The `%a' format refers to an argument of `haddr_t' type
+ * instead of `haddr_t*' and the return value is correct.
*-------------------------------------------------------------------------
*/
int
HDfprintf(FILE *stream, const char *fmt, ...)
{
- int n=0, nout = 0;
- int fwidth, prec;
- int zerofill;
- int leftjust;
- int plussign;
- int ldspace;
- int prefix;
- char modifier[8];
- int conv;
- char *rest, format_templ[128];
- const char *s;
- va_list ap;
+ int n=0, nout = 0;
+ int fwidth, prec;
+ int zerofill;
+ int leftjust;
+ int plussign;
+ int ldspace;
+ int prefix;
+ char modifier[8];
+ int conv;
+ char *rest, format_templ[128];
+ const char *s;
+ va_list ap;
assert (stream);
assert (fmt);
va_start (ap, fmt);
while (*fmt) {
- fwidth = prec = 0;
- zerofill = 0;
- leftjust = 0;
- plussign = 0;
- prefix = 0;
- ldspace = 0;
- modifier[0] = '\0';
-
- if ('%'==fmt[0] && '%'==fmt[1]) {
- HDputc ('%', stream);
- fmt += 2;
- nout++;
- } else if ('%'==fmt[0]) {
- s = fmt + 1;
-
- /* Flags */
- while(HDstrchr ("-+ #", *s)) {
- switch(*s) {
+ fwidth = prec = 0;
+ zerofill = 0;
+ leftjust = 0;
+ plussign = 0;
+ prefix = 0;
+ ldspace = 0;
+ modifier[0] = '\0';
+
+ if ('%'==fmt[0] && '%'==fmt[1]) {
+ HDputc ('%', stream);
+ fmt += 2;
+ nout++;
+ } else if ('%'==fmt[0]) {
+ s = fmt + 1;
+
+ /* Flags */
+ while(HDstrchr ("-+ #", *s)) {
+ switch(*s) {
case '-':
leftjust = 1;
break;
@@ -155,61 +155,61 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case '#':
prefix = 1;
break;
- } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */
- s++;
- } /* end while */
-
- /* Field width */
- if (HDisdigit (*s)) {
- zerofill = ('0'==*s);
- fwidth = (int)HDstrtol (s, &rest, 10);
- s = rest;
- } else if ('*'==*s) {
- fwidth = va_arg (ap, int);
- if (fwidth<0) {
- leftjust = 1;
- fwidth = -fwidth;
- }
- s++;
- }
-
- /* Precision */
- if ('.'==*s) {
- s++;
- if (HDisdigit (*s)) {
- prec = (int)HDstrtol (s, &rest, 10);
- s = rest;
- } else if ('*'==*s) {
- prec = va_arg (ap, int);
- s++;
- }
- if (prec<1) prec = 1;
- }
-
- /* Extra type modifiers */
- if (HDstrchr ("ZHhlqLI", *s)) {
- switch (*s) {
+ } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */
+ s++;
+ } /* end while */
+
+ /* Field width */
+ if (HDisdigit (*s)) {
+ zerofill = ('0'==*s);
+ fwidth = (int)HDstrtol (s, &rest, 10);
+ s = rest;
+ } else if ('*'==*s) {
+ fwidth = va_arg (ap, int);
+ if (fwidth<0) {
+ leftjust = 1;
+ fwidth = -fwidth;
+ }
+ s++;
+ }
+
+ /* Precision */
+ if ('.'==*s) {
+ s++;
+ if (HDisdigit (*s)) {
+ prec = (int)HDstrtol (s, &rest, 10);
+ s = rest;
+ } else if ('*'==*s) {
+ prec = va_arg (ap, int);
+ s++;
+ }
+ if (prec<1) prec = 1;
+ }
+
+ /* Extra type modifiers */
+ if (HDstrchr ("ZHhlqLI", *s)) {
+ switch (*s) {
/*lint --e{506} Don't issue warnings about constant value booleans */
/*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
- case 'H':
- if (sizeof(hsize_t)<sizeof(long)) {
- modifier[0] = '\0';
- } else if (sizeof(hsize_t)==sizeof(long)) {
- HDstrcpy (modifier, "l");
- } else {
- HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
- }
- break;
- case 'Z':
- if (sizeof(size_t)<sizeof(long)) {
- modifier[0] = '\0';
- } else if (sizeof(size_t)==sizeof(long)) {
- HDstrcpy (modifier, "l");
- } else {
- HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
- }
- break;
- default:
+ case 'H':
+ if (sizeof(hsize_t)<sizeof(long)) {
+ modifier[0] = '\0';
+ } else if (sizeof(hsize_t)==sizeof(long)) {
+ HDstrcpy (modifier, "l");
+ } else {
+ HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
+ }
+ break;
+ case 'Z':
+ if (sizeof(size_t)<sizeof(long)) {
+ modifier[0] = '\0';
+ } else if (sizeof(size_t)==sizeof(long)) {
+ HDstrcpy (modifier, "l");
+ } else {
+ HDstrcpy (modifier, H5_PRINTF_LL_WIDTH);
+ }
+ break;
+ default:
/* Handle 'I64' modifier for Microsoft's "__int64" type */
if(*s=='I' && *(s+1)=='6' && *(s+2)=='4') {
modifier[0] = *s;
@@ -231,144 +231,144 @@ HDfprintf(FILE *stream, const char *fmt, ...)
modifier[1] = '\0';
} /* end else */
} /* end else */
- break;
- }
- s++;
- }
-
- /* Conversion */
- conv = *s++;
-
- /* Create the format template */
- sprintf (format_templ, "%%%s%s%s%s%s",
- leftjust?"-":"", plussign?"+":"",
- ldspace?" ":"", prefix?"#":"", zerofill?"0":"");
- if (fwidth>0)
- sprintf (format_templ+HDstrlen(format_templ), "%d", fwidth);
- if (prec>0)
- sprintf (format_templ+HDstrlen(format_templ), ".%d", prec);
- if (*modifier)
- sprintf (format_templ+HDstrlen(format_templ), "%s", modifier);
- sprintf (format_templ+HDstrlen(format_templ), "%c", conv);
-
-
- /* Conversion */
- switch (conv) {
- case 'd':
- case 'i':
- if (!HDstrcmp(modifier, "h")) {
- short x = (short)va_arg (ap, int);
- n = fprintf (stream, format_templ, x);
- } else if (!*modifier) {
- int x = va_arg (ap, int);
- n = fprintf (stream, format_templ, x);
- } else if (!HDstrcmp (modifier, "l")) {
- long x = va_arg (ap, long);
- n = fprintf (stream, format_templ, x);
- } else {
- int64_t x = va_arg(ap, int64_t);
- n = fprintf (stream, format_templ, x);
- }
- break;
-
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- if (!HDstrcmp (modifier, "h")) {
- unsigned short x = (unsigned short)va_arg (ap, unsigned int);
- n = fprintf (stream, format_templ, x);
- } else if (!*modifier) {
- unsigned int x = va_arg (ap, unsigned int); /*lint !e732 Loss of sign not really occuring */
- n = fprintf (stream, format_templ, x);
- } else if (!HDstrcmp (modifier, "l")) {
- unsigned long x = va_arg (ap, unsigned long); /*lint !e732 Loss of sign not really occuring */
- n = fprintf (stream, format_templ, x);
- } else {
- uint64_t x = va_arg(ap, uint64_t); /*lint !e732 Loss of sign not really occuring */
- n = fprintf (stream, format_templ, x);
- }
- break;
-
- case 'f':
- case 'e':
- case 'E':
- case 'g':
- case 'G':
- if (!HDstrcmp (modifier, "h")) {
- float x = (float) va_arg (ap, double);
- n = fprintf (stream, format_templ, x);
- } else if (!*modifier || !HDstrcmp (modifier, "l")) {
- double x = va_arg (ap, double);
- n = fprintf (stream, format_templ, x);
- } else {
- /*
- * Some compilers complain when `long double' and
- * `double' are the same thing.
- */
+ break;
+ }
+ s++;
+ }
+
+ /* Conversion */
+ conv = *s++;
+
+ /* Create the format template */
+ sprintf (format_templ, "%%%s%s%s%s%s",
+ leftjust?"-":"", plussign?"+":"",
+ ldspace?" ":"", prefix?"#":"", zerofill?"0":"");
+ if (fwidth>0)
+ sprintf (format_templ+HDstrlen(format_templ), "%d", fwidth);
+ if (prec>0)
+ sprintf (format_templ+HDstrlen(format_templ), ".%d", prec);
+ if (*modifier)
+ sprintf (format_templ+HDstrlen(format_templ), "%s", modifier);
+ sprintf (format_templ+HDstrlen(format_templ), "%c", conv);
+
+
+ /* Conversion */
+ switch (conv) {
+ case 'd':
+ case 'i':
+ if (!HDstrcmp(modifier, "h")) {
+ short x = (short)va_arg (ap, int);
+ n = fprintf (stream, format_templ, x);
+ } else if (!*modifier) {
+ int x = va_arg (ap, int);
+ n = fprintf (stream, format_templ, x);
+ } else if (!HDstrcmp (modifier, "l")) {
+ long x = va_arg (ap, long);
+ n = fprintf (stream, format_templ, x);
+ } else {
+ int64_t x = va_arg(ap, int64_t);
+ n = fprintf (stream, format_templ, x);
+ }
+ break;
+
+ case 'o':
+ case 'u':
+ case 'x':
+ case 'X':
+ if (!HDstrcmp (modifier, "h")) {
+ unsigned short x = (unsigned short)va_arg (ap, unsigned int);
+ n = fprintf (stream, format_templ, x);
+ } else if (!*modifier) {
+ unsigned int x = va_arg (ap, unsigned int); /*lint !e732 Loss of sign not really occuring */
+ n = fprintf (stream, format_templ, x);
+ } else if (!HDstrcmp (modifier, "l")) {
+ unsigned long x = va_arg (ap, unsigned long); /*lint !e732 Loss of sign not really occuring */
+ n = fprintf (stream, format_templ, x);
+ } else {
+ uint64_t x = va_arg(ap, uint64_t); /*lint !e732 Loss of sign not really occuring */
+ n = fprintf (stream, format_templ, x);
+ }
+ break;
+
+ case 'f':
+ case 'e':
+ case 'E':
+ case 'g':
+ case 'G':
+ if (!HDstrcmp (modifier, "h")) {
+ float x = (float) va_arg (ap, double);
+ n = fprintf (stream, format_templ, x);
+ } else if (!*modifier || !HDstrcmp (modifier, "l")) {
+ double x = va_arg (ap, double);
+ n = fprintf (stream, format_templ, x);
+ } else {
+ /*
+ * Some compilers complain when `long double' and
+ * `double' are the same thing.
+ */
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
- long double x = va_arg (ap, long double);
- n = fprintf (stream, format_templ, x);
+ long double x = va_arg (ap, long double);
+ n = fprintf (stream, format_templ, x);
#else
- double x = va_arg (ap, double);
- n = fprintf (stream, format_templ, x);
+ double x = va_arg (ap, double);
+ n = fprintf (stream, format_templ, x);
#endif
- }
- break;
+ }
+ break;
- case 'a':
+ case 'a':
{
- haddr_t x = va_arg (ap, haddr_t); /*lint !e732 Loss of sign not really occuring */
- if (H5F_addr_defined(x)) {
- sprintf(format_templ, "%%%s%s%s%s%s",
- leftjust?"-":"", plussign?"+":"",
- ldspace?" ":"", prefix?"#":"",
- zerofill?"0":"");
- if (fwidth>0)
- sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth);
+ haddr_t x = va_arg (ap, haddr_t); /*lint !e732 Loss of sign not really occuring */
+ if (H5F_addr_defined(x)) {
+ sprintf(format_templ, "%%%s%s%s%s%s",
+ leftjust?"-":"", plussign?"+":"",
+ ldspace?" ":"", prefix?"#":"",
+ zerofill?"0":"");
+ if (fwidth>0)
+ sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth);
/*lint --e{506} Don't issue warnings about constant value booleans */
/*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */
- if (sizeof(x)==H5_SIZEOF_INT) {
- HDstrcat(format_templ, "u");
- } else if (sizeof(x)==H5_SIZEOF_LONG) {
- HDstrcat(format_templ, "lu");
- } else if (sizeof(x)==H5_SIZEOF_LONG_LONG) {
- HDstrcat(format_templ, H5_PRINTF_LL_WIDTH);
- HDstrcat(format_templ, "u");
- }
- n = fprintf(stream, format_templ, x);
- } else {
- HDstrcpy(format_templ, "%");
- if (leftjust)
+ if (sizeof(x)==H5_SIZEOF_INT) {
+ HDstrcat(format_templ, "u");
+ } else if (sizeof(x)==H5_SIZEOF_LONG) {
+ HDstrcat(format_templ, "lu");
+ } else if (sizeof(x)==H5_SIZEOF_LONG_LONG) {
+ HDstrcat(format_templ, H5_PRINTF_LL_WIDTH);
+ HDstrcat(format_templ, "u");
+ }
+ n = fprintf(stream, format_templ, x);
+ } else {
+ HDstrcpy(format_templ, "%");
+ if (leftjust)
HDstrcat(format_templ, "-");
- if (fwidth)
- sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth);
- HDstrcat(format_templ, "s");
- fprintf(stream, format_templ, "UNDEF");
- }
- }
- break;
-
- case 'c':
+ if (fwidth)
+ sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth);
+ HDstrcat(format_templ, "s");
+ fprintf(stream, format_templ, "UNDEF");
+ }
+ }
+ break;
+
+ case 'c':
{
- char x = (char)va_arg (ap, int);
- n = fprintf (stream, format_templ, x);
- }
- break;
+ char x = (char)va_arg (ap, int);
+ n = fprintf (stream, format_templ, x);
+ }
+ break;
- case 's':
- case 'p':
+ case 's':
+ case 'p':
{
- char *x = va_arg (ap, char*); /*lint !e64 Type mismatch not really occuring */
- n = fprintf (stream, format_templ, x);
- }
- break;
+ char *x = va_arg (ap, char*); /*lint !e64 Type mismatch not really occuring */
+ n = fprintf (stream, format_templ, x);
+ }
+ break;
- case 'n':
+ case 'n':
format_templ[HDstrlen(format_templ)-1] = 'u';
n = fprintf (stream, format_templ, nout);
- break;
+ break;
case 't':
{
@@ -379,18 +379,18 @@ HDfprintf(FILE *stream, const char *fmt, ...)
}
break;
- default:
- HDfputs (format_templ, stream);
- n = (int)HDstrlen (format_templ);
- break;
- }
- nout += n;
- fmt = s;
- } else {
- HDputc (*fmt, stream);
- fmt++;
- nout++;
- }
+ default:
+ HDfputs (format_templ, stream);
+ n = (int)HDstrlen (format_templ);
+ break;
+ }
+ nout += n;
+ fmt = s;
+ } else {
+ HDputc (*fmt, stream);
+ fmt++;
+ nout++;
+ }
}
va_end (ap);
return nout;
@@ -398,43 +398,43 @@ HDfprintf(FILE *stream, const char *fmt, ...)
/*-------------------------------------------------------------------------
- * Function: HDstrtoll
+ * Function: HDstrtoll
*
- * Purpose: Converts the string S to an int64_t value according to the
- * given BASE, which must be between 2 and 36 inclusive, or be
- * the special value zero.
+ * Purpose: Converts the string S to an int64_t value according to the
+ * given BASE, which must be between 2 and 36 inclusive, or be
+ * the special value zero.
*
- * The string must begin with an arbitrary amount of white space
- * (as determined by isspace(3c)) followed by a single optional
+ * The string must begin with an arbitrary amount of white space
+ * (as determined by isspace(3c)) followed by a single optional
* `+' or `-' sign. If BASE is zero or 16 the string may then
- * include a `0x' or `0X' prefix, and the number will be read in
- * base 16; otherwise a zero BASE is taken as 10 (decimal)
- * unless the next character is a `0', in which case it is taken
- * as 8 (octal).
- *
- * The remainder of the string is converted to an int64_t in the
- * obvious manner, stopping at the first character which is not
- * a valid digit in the given base. (In bases above 10, the
- * letter `A' in either upper or lower case represetns 10, `B'
- * represents 11, and so forth, with `Z' representing 35.)
- *
- * If REST is not null, the address of the first invalid
- * character in S is stored in *REST. If there were no digits
- * at all, the original value of S is stored in *REST. Thus, if
- * *S is not `\0' but **REST is `\0' on return the entire string
- * was valid.
- *
- * Return: Success: The result.
- *
- * Failure: If the input string does not contain any
- * digits then zero is returned and REST points
- * to the original value of S. If an overflow
- * or underflow occurs then the maximum or
- * minimum possible value is returned and the
- * global `errno' is set to ERANGE. If BASE is
- * incorrect then zero is returned.
- *
- * Programmer: Robb Matzke
+ * include a `0x' or `0X' prefix, and the number will be read in
+ * base 16; otherwise a zero BASE is taken as 10 (decimal)
+ * unless the next character is a `0', in which case it is taken
+ * as 8 (octal).
+ *
+ * The remainder of the string is converted to an int64_t in the
+ * obvious manner, stopping at the first character which is not
+ * a valid digit in the given base. (In bases above 10, the
+ * letter `A' in either upper or lower case represetns 10, `B'
+ * represents 11, and so forth, with `Z' representing 35.)
+ *
+ * If REST is not null, the address of the first invalid
+ * character in S is stored in *REST. If there were no digits
+ * at all, the original value of S is stored in *REST. Thus, if
+ * *S is not `\0' but **REST is `\0' on return the entire string
+ * was valid.
+ *
+ * Return: Success: The result.
+ *
+ * Failure: If the input string does not contain any
+ * digits then zero is returned and REST points
+ * to the original value of S. If an overflow
+ * or underflow occurs then the maximum or
+ * minimum possible value is returned and the
+ * global `errno' is set to ERANGE. If BASE is
+ * incorrect then zero is returned.
+ *
+ * Programmer: Robb Matzke
* Thursday, April 9, 1998
*
* Modifications:
@@ -444,13 +444,13 @@ HDfprintf(FILE *stream, const char *fmt, ...)
int64_t
HDstrtoll(const char *s, const char **rest, int base)
{
- int64_t sign=1, acc=0;
- hbool_t overflow = FALSE;
+ int64_t sign=1, acc=0;
+ hbool_t overflow = FALSE;
errno = 0;
if (!s || (base && (base<2 || base>36))) {
- if (rest) *rest = s;
- return 0;
+ if (rest) *rest = s;
+ return 0;
}
/* Skip white space */
@@ -458,51 +458,51 @@ HDstrtoll(const char *s, const char **rest, int base)
/* Optional minus or plus sign */
if ('+'==*s) {
- s++;
+ s++;
} else if ('-'==*s) {
- sign = -1;
- s++;
+ sign = -1;
+ s++;
}
/* Zero base prefix */
if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) {
- base = 16;
- s += 2;
+ base = 16;
+ s += 2;
} else if (0==base && '0'==*s) {
- base = 8;
- s++;
+ base = 8;
+ s++;
} else if (0==base) {
- base = 10;
+ base = 10;
}
/* Digits */
while ((base<=10 && *s>='0' && *s<'0'+base) ||
- (base>10 && ((*s>='0' && *s<='9') ||
- (*s>='a' && *s<'a'+base-10) ||
- (*s>='A' && *s<'A'+base-10)))) {
- if (!overflow) {
- int64_t digit = 0;
- if (*s>='0' && *s<='9') digit = *s - '0';
- else if (*s>='a' && *s<='z') digit = (*s-'a')+10;
- else digit = (*s-'A')+10;
-
- if (acc*base+digit < acc) {
- overflow = TRUE;
- } else {
- acc = acc*base + digit;
- }
- }
- s++;
+ (base>10 && ((*s>='0' && *s<='9') ||
+ (*s>='a' && *s<'a'+base-10) ||
+ (*s>='A' && *s<'A'+base-10)))) {
+ if (!overflow) {
+ int64_t digit = 0;
+ if (*s>='0' && *s<='9') digit = *s - '0';
+ else if (*s>='a' && *s<='z') digit = (*s-'a')+10;
+ else digit = (*s-'A')+10;
+
+ if (acc*base+digit < acc) {
+ overflow = TRUE;
+ } else {
+ acc = acc*base + digit;
+ }
+ }
+ s++;
}
/* Overflow */
if (overflow) {
- if (sign>0) {
- acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
- } else {
- acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1));
- }
- errno = ERANGE;
+ if (sign>0) {
+ acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
+ } else {
+ acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1));
+ }
+ errno = ERANGE;
}
/* Return values */
@@ -513,20 +513,20 @@ HDstrtoll(const char *s, const char **rest, int base)
/*-------------------------------------------------------------------------
- * Function: HDrand/HDsrand
+ * Function: HDrand/HDsrand
*
- * Purpose: Wrapper function for rand. If rand_r exists on this system,
- * use it.
+ * Purpose: Wrapper function for rand. If rand_r exists on this system,
+ * use it.
*
- * Wrapper function for srand. If rand_r is available, it will keep
- * track of the seed locally instead of using srand() which modifies
- * global state and can break other programs.
+ * Wrapper function for srand. If rand_r is available, it will keep
+ * track of the seed locally instead of using srand() which modifies
+ * global state and can break other programs.
*
- * Return: Success: Random number from 0 to RAND_MAX
+ * Return: Success: Random number from 0 to RAND_MAX
*
- * Failure: Cannot fail.
+ * Failure: Cannot fail.
*
- * Programmer: Leon Arber
+ * Programmer: Leon Arber
* March 6, 2006.
*
*-------------------------------------------------------------------------
@@ -548,17 +548,17 @@ void HDsrand(unsigned int seed)
/*-------------------------------------------------------------------------
- * Function: HDremove_all
+ * Function: HDremove_all
*
- * Purpose: Wrapper function for remove on VMS systems
+ * Purpose: Wrapper function for remove on VMS systems
*
- * This function deletes all versions of a file
+ * This function deletes all versions of a file
*
- * Return: Success: 0;
+ * Return: Success: 0;
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Elena Pourmal
+ * Programmer: Elena Pourmal
* March 22, 2006
*
*-------------------------------------------------------------------------
@@ -584,13 +584,13 @@ HDremove_all(const char *fname)
#endif
/*-------------------------------------------------------------------------
- * Function: Wgettimeofday
+ * Function: Wgettimeofday
*
- * Purpose: Wrapper function for gettimeofday on Windows systems
+ * Purpose: Wrapper function for gettimeofday on Windows systems
*
- * This function can get the time as well as a timezone
+ * This function can get the time as well as a timezone
*
- * Return: 0
+ * Return: 0
*
* This implementation is taken from the Cygwin source distribution at
* src/winsup/mingw/mingwex/gettimeofday.c
@@ -599,12 +599,12 @@ HDremove_all(const char *fname)
* Danny Smith <dannysmith@users.sourceforge.net>
* and released in the public domain.
*
- * Programmer: Scott Wegner
+ * Programmer: Scott Wegner
* May 19, 2009
*
*-------------------------------------------------------------------------
*/
-#ifdef _WIN32
+#ifdef H5_HAVE_VISUAL_STUDIO
/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosecond units */
#define _W32_FT_OFFSET (116444736000000000ULL)
@@ -638,6 +638,27 @@ Wgettimeofday(struct timeval *tv, struct timezone *tz)
Do not set errno on error. */
return 0;
}
+
+#ifdef H5_HAVE_WINSOCK_H
+#pragma comment(lib, "advapi32.lib")
+#endif
+
+#define WloginBuffer_count 256
+static char Wlogin_buffer[WloginBuffer_count];
+
+char*
+Wgetlogin()
+{
+
+#ifdef H5_HAVE_WINSOCK_H
+ long bufferCount = WloginBuffer_count;
+ if (GetUserName(Wlogin_buffer, &bufferCount) == 0)
+ return (Wlogin_buffer);
+ else
+#endif /* H5_HAVE_WINSOCK_H */
+ return NULL;
+}
+
#endif
@@ -645,16 +666,16 @@ Wgettimeofday(struct timeval *tv, struct timezone *tz)
* Function: H5_build_extpath
*
* Purpose: To build the path for later searching of target file for external
- * link. This path can be either:
+ * link. This path can be either:
* 1. The absolute path of NAME
* or
* 2. The current working directory + relative path of NAME
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Vailin Choi
- * April 2, 2008
+ * Programmer: Vailin Choi
+ * April 2, 2008
*
*-------------------------------------------------------------------------
*/
@@ -668,7 +689,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
char *new_name = NULL; /* Pointer to the name of the file */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5_build_extpath)
+ FUNC_ENTER_NOAPI_NOINIT
/* Clear external path pointer to begin with */
*extpath = NULL;
@@ -692,23 +713,23 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
if(NULL == (new_name = (char *)H5MM_strdup(name)))
HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed")
- /*
- * Windows: name[0-1] is "<drive-letter>:"
- * Get current working directory on the drive specified in NAME
- * Unix: does not apply
+ /*
+ * Windows: name[0-1] is "<drive-letter>:"
+ * Get current working directory on the drive specified in NAME
+ * Unix: does not apply
* OpenVMS: does not apply
- */
+ */
if(CHECK_ABS_DRIVE(name)) {
drive = name[0] - 'A' + 1;
retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN);
HDstrcpy(new_name, &name[2]);
} /* end if */
- /*
- * Windows: name[0] is a '/' or '\'
- * Get current drive
- * Unix: does not apply
+ /*
+ * Windows: name[0] is a '/' or '\'
+ * Get current drive
+ * Unix: does not apply
* OpenVMS: does not apply
- */
+ */
else if(CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) {
sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]);
retcwd = cwdpath;
@@ -764,9 +785,9 @@ H5_build_extpath(const char *name, char **extpath/*out*/)
done:
/* Release resources */
if(cwdpath)
- H5MM_xfree(cwdpath);
+ H5MM_xfree(cwdpath);
if(new_name)
- H5MM_xfree(new_name);
+ H5MM_xfree(new_name);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5_build_extpath() */
diff --git a/src/H5trace.c b/src/H5trace.c
index 67a85c5..b711f40 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -458,6 +458,44 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end else */
break;
+ case 'i':
+ if(ptr) {
+ if(vp)
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
+
+ switch(actual_io_mode) {
+ case H5D_MPIO_NO_COLLECTIVE:
+ fprintf(out, "H5D_MPIO_NO_COLLECTIVE");
+ break;
+
+ case H5D_MPIO_CHUNK_INDEPENDENT:
+ fprintf(out, "H5D_MPIO_CHUNK_INDEPENDENT");
+ break;
+
+ case H5D_MPIO_CHUNK_COLLECTIVE:
+ fprintf(out, "H5D_MPIO_CHUNK_COLLECTIVE");
+ break;
+
+ case H5D_MPIO_CHUNK_MIXED:
+ fprintf(out, "H5D_MPIO_CHUNK_MIXED");
+ break;
+
+ case H5D_MPIO_CONTIGUOUS_COLLECTIVE:
+ fprintf(out, "H5D_MPIO_CONTIGUOUS_COLLECTIVE");
+ break;
+
+ default:
+ fprintf(out, "%ld", (long)actual_io_mode);
+ break;
+ } /* end switch */
+ } /* end else */
+ break;
+
case 'l':
if(ptr) {
if(vp)
@@ -496,6 +534,40 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end else */
break;
+ case 'o':
+ if(ptr) {
+ if(vp)
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
+
+ switch(chunk_opt_mode) {
+ case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
+ fprintf(out, "H5D_MPIO_NO_CHUNK_OPTIMIZATION");
+ break;
+
+ case H5D_MPIO_LINK_CHUNK:
+ fprintf(out, "H5D_MPIO_LINK_CHUNK");
+ break;
+
+ case H5D_MPIO_MULTI_CHUNK:
+ fprintf(out, "H5D_MPIO_MULTI_CHUNK");
+ break;
+
+ case H5D_MPIO_MULTI_CHUNK_NO_OPT:
+ fprintf(out, "H5D_MPIO_MULTI_CHUNK_NO_OPT");
+ break;
+
+ default:
+ fprintf(out, "%ld", (long)chunk_opt_mode);
+ break;
+ } /* end switch */
+ } /* end else */
+ break;
+
case 's':
if(ptr) {
if(vp)
@@ -2206,6 +2278,62 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end else */
break;
+ case 'U':
+ switch(type[1]) {
+ case 'l':
+ if(ptr) {
+ if(vp) {
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ if(asize_idx >= 0 && asize[asize_idx] >= 0) {
+ unsigned long *p = (unsigned long *)vp;
+
+ fprintf(out, " {");
+ for(i = 0; i < asize[asize_idx]; i++)
+ HDfprintf(out, "%s%lu", i?", ":"", p[i]);
+ fprintf(out, "}");
+ } /* end if */
+ } /* end if */
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ unsigned long iul = va_arg(ap, unsigned long); /*lint !e732 Loss of sign not really occuring */
+
+ fprintf(out, "%lu", iul);
+ asize[argno] = iul;
+ } /* end else */
+ break;
+
+ case 'L':
+ if(ptr) {
+ if(vp) {
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ if(asize_idx >= 0 && asize[asize_idx] >= 0) {
+ unsigned long long *p = (unsigned long long *)vp;
+
+ fprintf(out, " {");
+ for(i = 0; i < asize[asize_idx]; i++)
+ HDfprintf(out, "%s%llu", i?", ":"", p[i]);
+ fprintf(out, "}");
+ } /* end if */
+ } /* end if */
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ unsigned long long iull = va_arg(ap, unsigned long long); /*lint !e732 Loss of sign not really occuring */
+
+ fprintf(out, "%llu", iull);
+ asize[argno] = iull;
+ } /* end else */
+ break;
+
+ default:
+ fprintf (out, "BADTYPE(U%c)", type[1]);
+ goto error;
+ } /* end switch */
+ break;
+
case 'x':
if(ptr) {
if(vp) {
diff --git a/src/H5vers.txt b/src/H5vers.txt
index 89f7bc6..07d2c4b 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -62,6 +62,7 @@ FUNCTION: H5Pget_filter; ; v10, v18
FUNCTION: H5Pget_filter_by_id; ; v16, v18
FUNCTION: H5Pinsert; ; v14, v18
FUNCTION: H5Pregister; ; v14, v18
+FUNCTION: H5Rdereference; ; v10, v110
FUNCTION: H5Rget_obj_type; ; v16, v18
FUNCTION: H5Tarray_create; ; v14, v18
FUNCTION: H5Tcommit; ; v10, v18
diff --git a/src/H5version.h b/src/H5version.h
index 296768e..b955a8f 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -22,7 +22,7 @@
/* Issue error if contradicting macros have been defined. */
#if (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS)
-#error "Can't choose old API versions when deprecated APIs are disabled"
+ #error "Can't choose old API versions when deprecated APIs are disabled"
#endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */
@@ -33,11 +33,11 @@
* API symbol, the individual API version macro takes priority.
*/
#if defined(H5_USE_16_API_DEFAULT) && !defined(H5_USE_16_API)
-#define H5_USE_16_API 1
+ #define H5_USE_16_API 1
#endif /* H5_USE_16_API_DEFAULT && !H5_USE_16_API */
#if defined(H5_USE_18_API_DEFAULT) && !defined(H5_USE_18_API)
-#define H5_USE_18_API 1
+ #define H5_USE_18_API 1
#endif /* H5_USE_18_API_DEFAULT && !H5_USE_18_API */
@@ -48,87 +48,91 @@
/*************/
#if !defined(H5Acreate_vers)
-#define H5Acreate_vers 1
+ #define H5Acreate_vers 1
#endif /* !defined(H5Acreate_vers) */
#if !defined(H5Aiterate_vers)
-#define H5Aiterate_vers 1
+ #define H5Aiterate_vers 1
#endif /* !defined(H5Aiterate_vers) */
#if !defined(H5Dcreate_vers)
-#define H5Dcreate_vers 1
+ #define H5Dcreate_vers 1
#endif /* !defined(H5Dcreate_vers) */
#if !defined(H5Dopen_vers)
-#define H5Dopen_vers 1
+ #define H5Dopen_vers 1
#endif /* !defined(H5Dopen_vers) */
#if !defined(H5Eclear_vers)
-#define H5Eclear_vers 1
+ #define H5Eclear_vers 1
#endif /* !defined(H5Eclear_vers) */
#if !defined(H5Eget_auto_vers)
-#define H5Eget_auto_vers 1
+ #define H5Eget_auto_vers 1
#endif /* !defined(H5Eget_auto_vers) */
#if !defined(H5Eprint_vers)
-#define H5Eprint_vers 1
+ #define H5Eprint_vers 1
#endif /* !defined(H5Eprint_vers) */
#if !defined(H5Epush_vers)
-#define H5Epush_vers 1
+ #define H5Epush_vers 1
#endif /* !defined(H5Epush_vers) */
#if !defined(H5Eset_auto_vers)
-#define H5Eset_auto_vers 1
+ #define H5Eset_auto_vers 1
#endif /* !defined(H5Eset_auto_vers) */
#if !defined(H5Ewalk_vers)
-#define H5Ewalk_vers 1
+ #define H5Ewalk_vers 1
#endif /* !defined(H5Ewalk_vers) */
#if !defined(H5Gcreate_vers)
-#define H5Gcreate_vers 1
+ #define H5Gcreate_vers 1
#endif /* !defined(H5Gcreate_vers) */
#if !defined(H5Gopen_vers)
-#define H5Gopen_vers 1
+ #define H5Gopen_vers 1
#endif /* !defined(H5Gopen_vers) */
#if !defined(H5Pget_filter_vers)
-#define H5Pget_filter_vers 1
+ #define H5Pget_filter_vers 1
#endif /* !defined(H5Pget_filter_vers) */
#if !defined(H5Pget_filter_by_id_vers)
-#define H5Pget_filter_by_id_vers 1
+ #define H5Pget_filter_by_id_vers 1
#endif /* !defined(H5Pget_filter_by_id_vers) */
#if !defined(H5Pinsert_vers)
-#define H5Pinsert_vers 1
+ #define H5Pinsert_vers 1
#endif /* !defined(H5Pinsert_vers) */
#if !defined(H5Pregister_vers)
-#define H5Pregister_vers 1
+ #define H5Pregister_vers 1
#endif /* !defined(H5Pregister_vers) */
+#if !defined(H5Rdereference_vers)
+ #define H5Rdereference_vers 1
+#endif /* !defined(H5Rdereference_vers) */
+
#if !defined(H5Rget_obj_type_vers)
-#define H5Rget_obj_type_vers 1
+ #define H5Rget_obj_type_vers 1
#endif /* !defined(H5Rget_obj_type_vers) */
#if !defined(H5Tarray_create_vers)
-#define H5Tarray_create_vers 1
+ #define H5Tarray_create_vers 1
#endif /* !defined(H5Tarray_create_vers) */
#if !defined(H5Tcommit_vers)
-#define H5Tcommit_vers 1
+ #define H5Tcommit_vers 1
#endif /* !defined(H5Tcommit_vers) */
#if !defined(H5Tget_array_dims_vers)
-#define H5Tget_array_dims_vers 1
+ #define H5Tget_array_dims_vers 1
#endif /* !defined(H5Tget_array_dims_vers) */
#if !defined(H5Topen_vers)
-#define H5Topen_vers 1
+ #define H5Topen_vers 1
#endif /* !defined(H5Topen_vers) */
/************/
@@ -136,11 +140,11 @@
/************/
#if !defined(H5E_auto_t_vers)
-#define H5E_auto_t_vers 1
+ #define H5E_auto_t_vers 1
#endif /* !defined(H5E_auto_t_vers) */
#if !defined(H5Z_class_t_vers)
-#define H5Z_class_t_vers 1
+ #define H5Z_class_t_vers 1
#endif /* !defined(H5Z_class_t_vers) */
#endif /* H5_USE_16_API */
@@ -152,91 +156,95 @@
/*************/
#if !defined(H5Acreate_vers)
-#define H5Acreate_vers 2
+ #define H5Acreate_vers 2
#endif /* !defined(H5Acreate_vers) */
#if !defined(H5Aiterate_vers)
-#define H5Aiterate_vers 2
+ #define H5Aiterate_vers 2
#endif /* !defined(H5Aiterate_vers) */
#if !defined(H5Dcreate_vers)
-#define H5Dcreate_vers 2
+ #define H5Dcreate_vers 2
#endif /* !defined(H5Dcreate_vers) */
#if !defined(H5Dopen_vers)
-#define H5Dopen_vers 2
+ #define H5Dopen_vers 2
#endif /* !defined(H5Dopen_vers) */
#if !defined(H5Eclear_vers)
-#define H5Eclear_vers 2
+ #define H5Eclear_vers 2
#endif /* !defined(H5Eclear_vers) */
#if !defined(H5Eget_auto_vers)
-#define H5Eget_auto_vers 2
+ #define H5Eget_auto_vers 2
#endif /* !defined(H5Eget_auto_vers) */
#if !defined(H5Eprint_vers)
-#define H5Eprint_vers 2
+ #define H5Eprint_vers 2
#endif /* !defined(H5Eprint_vers) */
#if !defined(H5Epush_vers)
-#define H5Epush_vers 2
+ #define H5Epush_vers 2
#endif /* !defined(H5Epush_vers) */
#if !defined(H5Eset_auto_vers)
-#define H5Eset_auto_vers 2
+ #define H5Eset_auto_vers 2
#endif /* !defined(H5Eset_auto_vers) */
#if !defined(H5Ewalk_vers)
-#define H5Ewalk_vers 2
+ #define H5Ewalk_vers 2
#endif /* !defined(H5Ewalk_vers) */
#if !defined(H5Fget_info_vers)
-#define H5Fget_info_vers 1
+ #define H5Fget_info_vers 1
#endif /* !defined(H5Fget_info_vers) */
#if !defined(H5Gcreate_vers)
-#define H5Gcreate_vers 2
+ #define H5Gcreate_vers 2
#endif /* !defined(H5Gcreate_vers) */
#if !defined(H5Gopen_vers)
-#define H5Gopen_vers 2
+ #define H5Gopen_vers 2
#endif /* !defined(H5Gopen_vers) */
#if !defined(H5Pget_filter_vers)
-#define H5Pget_filter_vers 2
+ #define H5Pget_filter_vers 2
#endif /* !defined(H5Pget_filter_vers) */
#if !defined(H5Pget_filter_by_id_vers)
-#define H5Pget_filter_by_id_vers 2
+ #define H5Pget_filter_by_id_vers 2
#endif /* !defined(H5Pget_filter_by_id_vers) */
#if !defined(H5Pinsert_vers)
-#define H5Pinsert_vers 2
+ #define H5Pinsert_vers 2
#endif /* !defined(H5Pinsert_vers) */
#if !defined(H5Pregister_vers)
-#define H5Pregister_vers 2
+ #define H5Pregister_vers 2
#endif /* !defined(H5Pregister_vers) */
+#if !defined(H5Rdereference_vers)
+ #define H5Rdereference_vers 1
+#endif /* !defined(H5Rdereference_vers) */
+
#if !defined(H5Rget_obj_type_vers)
-#define H5Rget_obj_type_vers 2
+ #define H5Rget_obj_type_vers 2
#endif /* !defined(H5Rget_obj_type_vers) */
#if !defined(H5Tarray_create_vers)
-#define H5Tarray_create_vers 2
+ #define H5Tarray_create_vers 2
#endif /* !defined(H5Tarray_create_vers) */
#if !defined(H5Tcommit_vers)
-#define H5Tcommit_vers 2
+ #define H5Tcommit_vers 2
#endif /* !defined(H5Tcommit_vers) */
#if !defined(H5Tget_array_dims_vers)
-#define H5Tget_array_dims_vers 2
+ #define H5Tget_array_dims_vers 2
#endif /* !defined(H5Tget_array_dims_vers) */
#if !defined(H5Topen_vers)
-#define H5Topen_vers 2
+ #define H5Topen_vers 2
#endif /* !defined(H5Topen_vers) */
/************/
@@ -244,11 +252,11 @@
/************/
#if !defined(H5E_auto_t_vers)
-#define H5E_auto_t_vers 2
+ #define H5E_auto_t_vers 2
#endif /* !defined(H5E_auto_t_vers) */
#if !defined(H5Z_class_t_vers)
-#define H5Z_class_t_vers 2
+ #define H5Z_class_t_vers 2
#endif /* !defined(H5Z_class_t_vers) */
#endif /* H5_USE_18_API */
@@ -265,253 +273,264 @@
/*************/
#if !defined(H5Acreate_vers) || H5Acreate_vers == 2
-#ifndef H5Acreate_vers
-#define H5Acreate_vers 2
-#endif /* H5Acreate_vers */
-#define H5Acreate H5Acreate2
+ #ifndef H5Acreate_vers
+ #define H5Acreate_vers 2
+ #endif /* H5Acreate_vers */
+ #define H5Acreate H5Acreate2
#elif H5Acreate_vers == 1
-#define H5Acreate H5Acreate1
+ #define H5Acreate H5Acreate1
#else /* H5Acreate_vers */
-#error "H5Acreate_vers set to invalid value"
+ #error "H5Acreate_vers set to invalid value"
#endif /* H5Acreate_vers */
#if !defined(H5Aiterate_vers) || H5Aiterate_vers == 2
-#ifndef H5Aiterate_vers
-#define H5Aiterate_vers 2
-#endif /* H5Aiterate_vers */
-#define H5Aiterate H5Aiterate2
-#define H5A_operator_t H5A_operator2_t
+ #ifndef H5Aiterate_vers
+ #define H5Aiterate_vers 2
+ #endif /* H5Aiterate_vers */
+ #define H5Aiterate H5Aiterate2
+ #define H5A_operator_t H5A_operator2_t
#elif H5Aiterate_vers == 1
-#define H5Aiterate H5Aiterate1
-#define H5A_operator_t H5A_operator1_t
+ #define H5Aiterate H5Aiterate1
+ #define H5A_operator_t H5A_operator1_t
#else /* H5Aiterate_vers */
-#error "H5Aiterate_vers set to invalid value"
+ #error "H5Aiterate_vers set to invalid value"
#endif /* H5Aiterate_vers */
#if !defined(H5Dcreate_vers) || H5Dcreate_vers == 2
-#ifndef H5Dcreate_vers
-#define H5Dcreate_vers 2
-#endif /* H5Dcreate_vers */
-#define H5Dcreate H5Dcreate2
+ #ifndef H5Dcreate_vers
+ #define H5Dcreate_vers 2
+ #endif /* H5Dcreate_vers */
+ #define H5Dcreate H5Dcreate2
#elif H5Dcreate_vers == 1
-#define H5Dcreate H5Dcreate1
+ #define H5Dcreate H5Dcreate1
#else /* H5Dcreate_vers */
-#error "H5Dcreate_vers set to invalid value"
+ #error "H5Dcreate_vers set to invalid value"
#endif /* H5Dcreate_vers */
#if !defined(H5Dopen_vers) || H5Dopen_vers == 2
-#ifndef H5Dopen_vers
-#define H5Dopen_vers 2
-#endif /* H5Dopen_vers */
-#define H5Dopen H5Dopen2
+ #ifndef H5Dopen_vers
+ #define H5Dopen_vers 2
+ #endif /* H5Dopen_vers */
+ #define H5Dopen H5Dopen2
#elif H5Dopen_vers == 1
-#define H5Dopen H5Dopen1
+ #define H5Dopen H5Dopen1
#else /* H5Dopen_vers */
-#error "H5Dopen_vers set to invalid value"
+ #error "H5Dopen_vers set to invalid value"
#endif /* H5Dopen_vers */
#if !defined(H5Eclear_vers) || H5Eclear_vers == 2
-#ifndef H5Eclear_vers
-#define H5Eclear_vers 2
-#endif /* H5Eclear_vers */
-#define H5Eclear H5Eclear2
+ #ifndef H5Eclear_vers
+ #define H5Eclear_vers 2
+ #endif /* H5Eclear_vers */
+ #define H5Eclear H5Eclear2
#elif H5Eclear_vers == 1
-#define H5Eclear H5Eclear1
+ #define H5Eclear H5Eclear1
#else /* H5Eclear_vers */
-#error "H5Eclear_vers set to invalid value"
+ #error "H5Eclear_vers set to invalid value"
#endif /* H5Eclear_vers */
#if !defined(H5Eget_auto_vers) || H5Eget_auto_vers == 2
-#ifndef H5Eget_auto_vers
-#define H5Eget_auto_vers 2
-#endif /* H5Eget_auto_vers */
-#define H5Eget_auto H5Eget_auto2
+ #ifndef H5Eget_auto_vers
+ #define H5Eget_auto_vers 2
+ #endif /* H5Eget_auto_vers */
+ #define H5Eget_auto H5Eget_auto2
#elif H5Eget_auto_vers == 1
-#define H5Eget_auto H5Eget_auto1
+ #define H5Eget_auto H5Eget_auto1
#else /* H5Eget_auto_vers */
-#error "H5Eget_auto_vers set to invalid value"
+ #error "H5Eget_auto_vers set to invalid value"
#endif /* H5Eget_auto_vers */
#if !defined(H5Eprint_vers) || H5Eprint_vers == 2
-#ifndef H5Eprint_vers
-#define H5Eprint_vers 2
-#endif /* H5Eprint_vers */
-#define H5Eprint H5Eprint2
+ #ifndef H5Eprint_vers
+ #define H5Eprint_vers 2
+ #endif /* H5Eprint_vers */
+ #define H5Eprint H5Eprint2
#elif H5Eprint_vers == 1
-#define H5Eprint H5Eprint1
+ #define H5Eprint H5Eprint1
#else /* H5Eprint_vers */
-#error "H5Eprint_vers set to invalid value"
+ #error "H5Eprint_vers set to invalid value"
#endif /* H5Eprint_vers */
#if !defined(H5Epush_vers) || H5Epush_vers == 2
-#ifndef H5Epush_vers
-#define H5Epush_vers 2
-#endif /* H5Epush_vers */
-#define H5Epush H5Epush2
+ #ifndef H5Epush_vers
+ #define H5Epush_vers 2
+ #endif /* H5Epush_vers */
+ #define H5Epush H5Epush2
#elif H5Epush_vers == 1
-#define H5Epush H5Epush1
+ #define H5Epush H5Epush1
#else /* H5Epush_vers */
-#error "H5Epush_vers set to invalid value"
+ #error "H5Epush_vers set to invalid value"
#endif /* H5Epush_vers */
#if !defined(H5Eset_auto_vers) || H5Eset_auto_vers == 2
-#ifndef H5Eset_auto_vers
-#define H5Eset_auto_vers 2
-#endif /* H5Eset_auto_vers */
-#define H5Eset_auto H5Eset_auto2
+ #ifndef H5Eset_auto_vers
+ #define H5Eset_auto_vers 2
+ #endif /* H5Eset_auto_vers */
+ #define H5Eset_auto H5Eset_auto2
#elif H5Eset_auto_vers == 1
-#define H5Eset_auto H5Eset_auto1
+ #define H5Eset_auto H5Eset_auto1
#else /* H5Eset_auto_vers */
-#error "H5Eset_auto_vers set to invalid value"
+ #error "H5Eset_auto_vers set to invalid value"
#endif /* H5Eset_auto_vers */
#if !defined(H5Ewalk_vers) || H5Ewalk_vers == 2
-#ifndef H5Ewalk_vers
-#define H5Ewalk_vers 2
-#endif /* H5Ewalk_vers */
-#define H5Ewalk H5Ewalk2
-#define H5E_error_t H5E_error2_t
-#define H5E_walk_t H5E_walk2_t
+ #ifndef H5Ewalk_vers
+ #define H5Ewalk_vers 2
+ #endif /* H5Ewalk_vers */
+ #define H5Ewalk H5Ewalk2
+ #define H5E_error_t H5E_error2_t
+ #define H5E_walk_t H5E_walk2_t
#elif H5Ewalk_vers == 1
-#define H5Ewalk H5Ewalk1
-#define H5E_error_t H5E_error1_t
-#define H5E_walk_t H5E_walk1_t
+ #define H5Ewalk H5Ewalk1
+ #define H5E_error_t H5E_error1_t
+ #define H5E_walk_t H5E_walk1_t
#else /* H5Ewalk_vers */
-#error "H5Ewalk_vers set to invalid value"
+ #error "H5Ewalk_vers set to invalid value"
#endif /* H5Ewalk_vers */
#if !defined(H5Fget_info_vers) || H5Fget_info_vers == 2
-#ifndef H5Fget_info_vers
-#define H5Fget_info_vers 2
-#endif /* H5Fget_info_vers */
-#define H5Fget_info H5Fget_info2
-#define H5F_info_t H5F_info2_t
+ #ifndef H5Fget_info_vers
+ #define H5Fget_info_vers 2
+ #endif /* H5Fget_info_vers */
+ #define H5Fget_info H5Fget_info2
+ #define H5F_info_t H5F_info2_t
#elif H5Fget_info_vers == 1
-#define H5Fget_info H5Fget_info1
-#define H5F_info_t H5F_info1_t
+ #define H5Fget_info H5Fget_info1
+ #define H5F_info_t H5F_info1_t
#else /* H5Fget_info_vers */
-#error "H5Fget_info_vers set to invalid value"
+ #error "H5Fget_info_vers set to invalid value"
#endif /* H5Fget_info_vers */
#if !defined(H5Gcreate_vers) || H5Gcreate_vers == 2
-#ifndef H5Gcreate_vers
-#define H5Gcreate_vers 2
-#endif /* H5Gcreate_vers */
-#define H5Gcreate H5Gcreate2
+ #ifndef H5Gcreate_vers
+ #define H5Gcreate_vers 2
+ #endif /* H5Gcreate_vers */
+ #define H5Gcreate H5Gcreate2
#elif H5Gcreate_vers == 1
-#define H5Gcreate H5Gcreate1
+ #define H5Gcreate H5Gcreate1
#else /* H5Gcreate_vers */
-#error "H5Gcreate_vers set to invalid value"
+ #error "H5Gcreate_vers set to invalid value"
#endif /* H5Gcreate_vers */
#if !defined(H5Gopen_vers) || H5Gopen_vers == 2
-#ifndef H5Gopen_vers
-#define H5Gopen_vers 2
-#endif /* H5Gopen_vers */
-#define H5Gopen H5Gopen2
+ #ifndef H5Gopen_vers
+ #define H5Gopen_vers 2
+ #endif /* H5Gopen_vers */
+ #define H5Gopen H5Gopen2
#elif H5Gopen_vers == 1
-#define H5Gopen H5Gopen1
+ #define H5Gopen H5Gopen1
#else /* H5Gopen_vers */
-#error "H5Gopen_vers set to invalid value"
+ #error "H5Gopen_vers set to invalid value"
#endif /* H5Gopen_vers */
#if !defined(H5Pget_filter_vers) || H5Pget_filter_vers == 2
-#ifndef H5Pget_filter_vers
-#define H5Pget_filter_vers 2
-#endif /* H5Pget_filter_vers */
-#define H5Pget_filter H5Pget_filter2
+ #ifndef H5Pget_filter_vers
+ #define H5Pget_filter_vers 2
+ #endif /* H5Pget_filter_vers */
+ #define H5Pget_filter H5Pget_filter2
#elif H5Pget_filter_vers == 1
-#define H5Pget_filter H5Pget_filter1
+ #define H5Pget_filter H5Pget_filter1
#else /* H5Pget_filter_vers */
-#error "H5Pget_filter_vers set to invalid value"
+ #error "H5Pget_filter_vers set to invalid value"
#endif /* H5Pget_filter_vers */
#if !defined(H5Pget_filter_by_id_vers) || H5Pget_filter_by_id_vers == 2
-#ifndef H5Pget_filter_by_id_vers
-#define H5Pget_filter_by_id_vers 2
-#endif /* H5Pget_filter_by_id_vers */
-#define H5Pget_filter_by_id H5Pget_filter_by_id2
+ #ifndef H5Pget_filter_by_id_vers
+ #define H5Pget_filter_by_id_vers 2
+ #endif /* H5Pget_filter_by_id_vers */
+ #define H5Pget_filter_by_id H5Pget_filter_by_id2
#elif H5Pget_filter_by_id_vers == 1
-#define H5Pget_filter_by_id H5Pget_filter_by_id1
+ #define H5Pget_filter_by_id H5Pget_filter_by_id1
#else /* H5Pget_filter_by_id_vers */
-#error "H5Pget_filter_by_id_vers set to invalid value"
+ #error "H5Pget_filter_by_id_vers set to invalid value"
#endif /* H5Pget_filter_by_id_vers */
#if !defined(H5Pinsert_vers) || H5Pinsert_vers == 2
-#ifndef H5Pinsert_vers
-#define H5Pinsert_vers 2
-#endif /* H5Pinsert_vers */
-#define H5Pinsert H5Pinsert2
+ #ifndef H5Pinsert_vers
+ #define H5Pinsert_vers 2
+ #endif /* H5Pinsert_vers */
+ #define H5Pinsert H5Pinsert2
#elif H5Pinsert_vers == 1
-#define H5Pinsert H5Pinsert1
+ #define H5Pinsert H5Pinsert1
#else /* H5Pinsert_vers */
-#error "H5Pinsert_vers set to invalid value"
+ #error "H5Pinsert_vers set to invalid value"
#endif /* H5Pinsert_vers */
#if !defined(H5Pregister_vers) || H5Pregister_vers == 2
-#ifndef H5Pregister_vers
-#define H5Pregister_vers 2
-#endif /* H5Pregister_vers */
-#define H5Pregister H5Pregister2
+ #ifndef H5Pregister_vers
+ #define H5Pregister_vers 2
+ #endif /* H5Pregister_vers */
+ #define H5Pregister H5Pregister2
#elif H5Pregister_vers == 1
-#define H5Pregister H5Pregister1
+ #define H5Pregister H5Pregister1
#else /* H5Pregister_vers */
-#error "H5Pregister_vers set to invalid value"
+ #error "H5Pregister_vers set to invalid value"
#endif /* H5Pregister_vers */
+#if !defined(H5Rdereference_vers) || H5Rdereference_vers == 2
+ #ifndef H5Rdereference_vers
+ #define H5Rdereference_vers 2
+ #endif /* H5Rdereference_vers */
+ #define H5Rdereference H5Rdereference2
+#elif H5Rdereference_vers == 1
+ #define H5Rdereference H5Rdereference1
+#else /* H5Rdereference_vers */
+ #error "H5Rdereference_vers set to invalid value"
+#endif /* H5Rdereference_vers */
+
#if !defined(H5Rget_obj_type_vers) || H5Rget_obj_type_vers == 2
-#ifndef H5Rget_obj_type_vers
-#define H5Rget_obj_type_vers 2
-#endif /* H5Rget_obj_type_vers */
-#define H5Rget_obj_type H5Rget_obj_type2
+ #ifndef H5Rget_obj_type_vers
+ #define H5Rget_obj_type_vers 2
+ #endif /* H5Rget_obj_type_vers */
+ #define H5Rget_obj_type H5Rget_obj_type2
#elif H5Rget_obj_type_vers == 1
-#define H5Rget_obj_type H5Rget_obj_type1
+ #define H5Rget_obj_type H5Rget_obj_type1
#else /* H5Rget_obj_type_vers */
-#error "H5Rget_obj_type_vers set to invalid value"
+ #error "H5Rget_obj_type_vers set to invalid value"
#endif /* H5Rget_obj_type_vers */
#if !defined(H5Tarray_create_vers) || H5Tarray_create_vers == 2
-#ifndef H5Tarray_create_vers
-#define H5Tarray_create_vers 2
-#endif /* H5Tarray_create_vers */
-#define H5Tarray_create H5Tarray_create2
+ #ifndef H5Tarray_create_vers
+ #define H5Tarray_create_vers 2
+ #endif /* H5Tarray_create_vers */
+ #define H5Tarray_create H5Tarray_create2
#elif H5Tarray_create_vers == 1
-#define H5Tarray_create H5Tarray_create1
+ #define H5Tarray_create H5Tarray_create1
#else /* H5Tarray_create_vers */
-#error "H5Tarray_create_vers set to invalid value"
+ #error "H5Tarray_create_vers set to invalid value"
#endif /* H5Tarray_create_vers */
#if !defined(H5Tcommit_vers) || H5Tcommit_vers == 2
-#ifndef H5Tcommit_vers
-#define H5Tcommit_vers 2
-#endif /* H5Tcommit_vers */
-#define H5Tcommit H5Tcommit2
+ #ifndef H5Tcommit_vers
+ #define H5Tcommit_vers 2
+ #endif /* H5Tcommit_vers */
+ #define H5Tcommit H5Tcommit2
#elif H5Tcommit_vers == 1
-#define H5Tcommit H5Tcommit1
+ #define H5Tcommit H5Tcommit1
#else /* H5Tcommit_vers */
-#error "H5Tcommit_vers set to invalid value"
+ #error "H5Tcommit_vers set to invalid value"
#endif /* H5Tcommit_vers */
#if !defined(H5Tget_array_dims_vers) || H5Tget_array_dims_vers == 2
-#ifndef H5Tget_array_dims_vers
-#define H5Tget_array_dims_vers 2
-#endif /* H5Tget_array_dims_vers */
-#define H5Tget_array_dims H5Tget_array_dims2
+ #ifndef H5Tget_array_dims_vers
+ #define H5Tget_array_dims_vers 2
+ #endif /* H5Tget_array_dims_vers */
+ #define H5Tget_array_dims H5Tget_array_dims2
#elif H5Tget_array_dims_vers == 1
-#define H5Tget_array_dims H5Tget_array_dims1
+ #define H5Tget_array_dims H5Tget_array_dims1
#else /* H5Tget_array_dims_vers */
-#error "H5Tget_array_dims_vers set to invalid value"
+ #error "H5Tget_array_dims_vers set to invalid value"
#endif /* H5Tget_array_dims_vers */
#if !defined(H5Topen_vers) || H5Topen_vers == 2
-#ifndef H5Topen_vers
-#define H5Topen_vers 2
-#endif /* H5Topen_vers */
-#define H5Topen H5Topen2
+ #ifndef H5Topen_vers
+ #define H5Topen_vers 2
+ #endif /* H5Topen_vers */
+ #define H5Topen H5Topen2
#elif H5Topen_vers == 1
-#define H5Topen H5Topen1
+ #define H5Topen H5Topen1
#else /* H5Topen_vers */
-#error "H5Topen_vers set to invalid value"
+ #error "H5Topen_vers set to invalid value"
#endif /* H5Topen_vers */
/************/
@@ -519,26 +538,26 @@
/************/
#if !defined(H5E_auto_t_vers) || H5E_auto_t_vers == 2
-#ifndef H5E_auto_t_vers
-#define H5E_auto_t_vers 2
-#endif /* H5E_auto_t_vers */
-#define H5E_auto_t H5E_auto2_t
+ #ifndef H5E_auto_t_vers
+ #define H5E_auto_t_vers 2
+ #endif /* H5E_auto_t_vers */
+ #define H5E_auto_t H5E_auto2_t
#elif H5E_auto_t_vers == 1
-#define H5E_auto_t H5E_auto1_t
+ #define H5E_auto_t H5E_auto1_t
#else /* H5E_auto_t_vers */
-#error "H5E_auto_t_vers set to invalid value"
+ #error "H5E_auto_t_vers set to invalid value"
#endif /* H5E_auto_t_vers */
#if !defined(H5Z_class_t_vers) || H5Z_class_t_vers == 2
-#ifndef H5Z_class_t_vers
-#define H5Z_class_t_vers 2
-#endif /* H5Z_class_t_vers */
-#define H5Z_class_t H5Z_class2_t
+ #ifndef H5Z_class_t_vers
+ #define H5Z_class_t_vers 2
+ #endif /* H5Z_class_t_vers */
+ #define H5Z_class_t H5Z_class2_t
#elif H5Z_class_t_vers == 1
-#define H5Z_class_t H5Z_class1_t
+ #define H5Z_class_t H5Z_class1_t
#else /* H5Z_class_t_vers */
-#error "H5Z_class_t_vers set to invalid value"
+ #error "H5Z_class_t_vers set to invalid value"
#endif /* H5Z_class_t_vers */
#endif /* H5version_H */
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index a428899..5f886d1 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -23,7 +23,7 @@
*
*/
-#ifdef _WIN32
+#ifdef H5_HAVE_WIN32_API
typedef struct _stati64 h5_stat_t;
typedef __int64 h5_stat_size_t;
@@ -33,41 +33,25 @@ typedef __int64 h5_stat_size_t;
#define HDdup(F) _dup(F)
#define HDfdopen(N,S) _fdopen(N,S)
#define HDfileno(F) _fileno(F)
-#if _MSC_VER > 1310 /* Newer than VS.NET 2003 */
-#define HDftruncate(F,L) _chsize_s(F,L)
-#else
-#define HDftruncate(F,L) chsize(F,L)
-#endif
+#define HDfseek(F,O,W) _fseeki64(F,O,W)
#define HDfstat(F,B) _fstati64(F,B)
+#define HDftruncate(F,L) _chsize_s(F,L)
#define HDisatty(F) _isatty(F)
-#define HDlstat(S,B) _lstati64(S,B)
-#define HDstat(S,B) _stati64(S,B)
#define HDgetcwd(S,Z) _getcwd(S,Z)
#define HDgetdcwd(D,S,Z) _getdcwd(D,S,Z)
-
-struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
-};
-
-#ifdef __cplusplus
- extern "C" {
-#endif /* __cplusplus */
-H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
-#ifdef __cplusplus
- }
-#endif /* __cplusplus */
-#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)
-
#define HDgetdrive() _getdrive()
#define HDlseek(F,O,W) _lseeki64(F,O,W)
-#define HDoff_t __int64
-#define HDmemset(X,C,Z) memset((void*)(X),C,Z)
+#define HDlstat(S,B) _lstati64(S,B)
#define HDmkdir(S,M) _mkdir(S)
+#define HDoff_t __int64
+/* _O_BINARY must be set in Windows to avoid CR-LF <-> LF EOL
+ * transformations when performing I/O.
+ */
#define HDopen(S,F,M) _open(S,F|_O_BINARY,M)
#define HDread(F,M,Z) _read(F,M,Z)
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2))
#define HDsleep(S) Sleep(S*1000)
+#define HDstat(S,B) _stati64(S,B)
#define HDstrcasecmp(A,B) _stricmp(A,B)
#define HDstrtoull(S,R,N) _strtoui64(S,R,N)
#define HDstrdup(S) _strdup(S)
@@ -77,11 +61,34 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
#define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A)
#define HDwrite(F,M,Z) _write(F,M,Z)
+#ifdef H5_HAVE_VISUAL_STUDIO
+/*
+ * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO
+ */
+#define HDmemset(X,C,Z) memset((void*)(X),C,Z)
+
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+
+#ifdef __cplusplus
+ extern "C" {
+#endif /* __cplusplus */
+ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
+ H5_DLL char* Wgetlogin();
+#ifdef __cplusplus
+ }
+#endif /* __cplusplus */
+#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)
+#define HDgetlogin() Wgetlogin()
+
+#endif /* H5_HAVE_VISUAL_STUDIO */
+
/* Non-POSIX functions */
/* Don't use actual pthread_self on Windows because the return
* type cannot be cast as a ulong like other systems. */
#define HDpthread_self_ulong() ((unsigned long)GetCurrentThreadId())
-
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d27bbf..e03a626 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,7 +53,8 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5E.c H5Edeprec.c H5Eint.c \
H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \
H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \
- H5F.c H5Faccum.c H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c H5Fio.c \
+ H5F.c H5Faccum.c H5Fcwfs.c \
+ H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c H5Fio.c \
H5Fmount.c H5Fmpi.c H5Fquery.c \
H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \
H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \
@@ -70,7 +71,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c H5HFsection.c \
H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \
- H5HG.c H5HGcache.c H5HGdbg.c \
+ H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \
H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c \
H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c \
H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \
diff --git a/src/Makefile.in b/src/Makefile.in
index 6c95491..bf7f62d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -107,48 +107,48 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
H5Dselect.lo H5Dtest.lo H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo \
H5EAcache.lo H5EAdbg.lo H5EAdblkpage.lo H5EAdblock.lo \
H5EAhdr.lo H5EAiblock.lo H5EAint.lo H5EAsblock.lo H5EAstat.lo \
- H5EAtest.lo H5F.lo H5Faccum.lo H5Fdbg.lo H5Fdeprec.lo \
- H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo \
- H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \
- H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo H5FAdblock.lo \
- H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo H5FAtest.lo H5FD.lo \
- H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \
- H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo \
- H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo \
- H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo H5FStest.lo \
- H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo H5Gdense.lo \
- H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo H5Gloc.lo \
- H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo H5Gstab.lo \
- H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo \
- H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo \
- H5HFiblock.lo H5HFiter.lo H5HFman.lo H5HFsection.lo \
- H5HFspace.lo H5HFstat.lo H5HFtest.lo H5HFtiny.lo H5HG.lo \
- H5HGcache.lo H5HGdbg.lo H5HL.lo H5HLcache.lo H5HLdbg.lo \
- H5HLint.lo H5HP.lo H5I.lo H5Itest.lo H5L.lo H5Lexternal.lo \
- H5lib_settings.lo H5MF.lo H5MFaggr.lo H5MFdbg.lo \
- H5MFsection.lo H5MM.lo H5MP.lo H5MPtest.lo H5O.lo H5Oainfo.lo \
- H5Oalloc.lo H5Oattr.lo H5Oattribute.lo H5Obogus.lo \
- H5Obtreek.lo H5Ocache.lo H5Ochunk.lo H5Ocont.lo H5Ocopy.lo \
- H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo H5Oefl.lo H5Ofill.lo \
- H5Oflush.lo H5Ofsinfo.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo \
- H5Olink.lo H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo \
- H5Opline.lo H5Orefcount.lo H5Osdspace.lo H5Oshared.lo \
- H5Oshmesg.lo H5Ostab.lo H5Ostorage.lo H5Otest.lo H5Ounknown.lo \
- H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \
- H5Pdxpl.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo \
- H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo \
- H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.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 \
- H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo \
- H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo \
- H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo \
- H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo \
- H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo \
- H5V.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \
- H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \
- H5Ztrans.lo
+ H5EAtest.lo H5F.lo H5Faccum.lo H5Fcwfs.lo H5Fdbg.lo \
+ H5Fdeprec.lo H5Fefc.lo H5Ffake.lo H5Fio.lo H5Fmount.lo \
+ H5Fmpi.lo H5Fquery.lo H5Fsfile.lo H5Fsuper.lo \
+ H5Fsuper_cache.lo H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo \
+ H5FAdblock.lo H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo \
+ H5FAtest.lo H5FD.lo H5FDcore.lo H5FDdirect.lo H5FDfamily.lo \
+ H5FDint.lo H5FDlog.lo H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo \
+ H5FDmulti.lo H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo \
+ H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \
+ H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \
+ H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \
+ H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \
+ H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo \
+ H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \
+ H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \
+ H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \
+ H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \
+ H5HL.lo H5HLcache.lo H5HLdbg.lo H5HLint.lo H5HP.lo H5I.lo \
+ H5Itest.lo H5L.lo H5Lexternal.lo H5lib_settings.lo H5MF.lo \
+ H5MFaggr.lo H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo \
+ H5MPtest.lo H5O.lo H5Oainfo.lo H5Oalloc.lo H5Oattr.lo \
+ H5Oattribute.lo H5Obogus.lo H5Obtreek.lo H5Ocache.lo \
+ H5Ochunk.lo H5Ocont.lo H5Ocopy.lo H5Odbg.lo H5Odrvinfo.lo \
+ H5Odtype.lo H5Oefl.lo H5Ofill.lo H5Oflush.lo H5Ofsinfo.lo \
+ H5Oginfo.lo H5Olayout.lo H5Olinfo.lo H5Olink.lo H5Omessage.lo \
+ H5Omtime.lo H5Oname.lo H5Onull.lo H5Opline.lo H5Orefcount.lo \
+ H5Osdspace.lo H5Oshared.lo H5Oshmesg.lo H5Ostab.lo \
+ H5Ostorage.lo H5Otest.lo H5Ounknown.lo H5P.lo H5Pacpl.lo \
+ H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pfapl.lo \
+ H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo H5Plapl.lo \
+ H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo \
+ H5R.lo H5Rdeprec.lo H5RC.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 H5T.lo H5Tarray.lo \
+ H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo H5Tcset.lo \
+ H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo H5Tfields.lo H5Tfixed.lo \
+ H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo H5Toh.lo \
+ H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo \
+ H5Tvisit.lo H5Tvlen.lo H5TS.lo H5V.lo H5WB.lo H5Z.lo \
+ H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo H5Zshuffle.lo \
+ H5Zszip.lo H5Zscaleoffset.lo H5Ztrans.lo
libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
@@ -266,6 +266,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
+FC2003 = @FC2003@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
@@ -286,10 +287,12 @@ H5_LONE_COLON = @H5_LONE_COLON@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
+HDF_FORTRAN2003 = @HDF_FORTRAN2003@
HID_T = @HID_T@
HL = @HL@
HL_FOR = @HL_FOR@
@@ -483,7 +486,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 = 71
+LT_VERS_REVISION = 101
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
@@ -511,7 +514,8 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5E.c H5Edeprec.c H5Eint.c \
H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \
H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \
- H5F.c H5Faccum.c H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c H5Fio.c \
+ H5F.c H5Faccum.c H5Fcwfs.c \
+ H5Fdbg.c H5Fdeprec.c H5Fefc.c H5Ffake.c H5Fio.c \
H5Fmount.c H5Fmpi.c H5Fquery.c \
H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \
H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \
@@ -528,7 +532,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFman.c H5HFsection.c \
H5HFspace.c H5HFstat.c H5HFtest.c H5HFtiny.c \
- H5HG.c H5HGcache.c H5HGdbg.c \
+ H5HG.c H5HGcache.c H5HGdbg.c H5HGquery.c \
H5HL.c H5HLcache.c H5HLdbg.c H5HLint.c \
H5HP.c H5I.c H5Itest.c H5L.c H5Lexternal.c H5lib_settings.c \
H5MF.c H5MFaggr.c H5MFdbg.c H5MFsection.c \
@@ -795,6 +799,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FSstat.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FStest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Faccum.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fcwfs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdbg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdeprec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fefc.Plo@am__quote@
@@ -844,6 +849,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HG.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGdbg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HGquery.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HLcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5HLdbg.Plo@am__quote@
diff --git a/src/hdf5.h b/src/hdf5.h
index ef15063..a37329d 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -41,6 +41,7 @@
/* Predefined file drivers */
#include "H5FDcore.h" /* Files stored entirely in memory */
+#include "H5FDdirect.h" /* Linux direct I/O */
#include "H5FDfamily.h" /* File families */
#include "H5FDlog.h" /* sec2 driver with I/O logging (for debugging) */
#include "H5FDmpi.h" /* MPI-based file drivers */
@@ -50,6 +51,5 @@
#ifdef H5_HAVE_WINDOWS
#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
-#include "H5FDdirect.h" /* Linux direct I/O */
#endif
diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in
index a873062..343fa34 100644
--- a/src/libhdf5.settings.in
+++ b/src/libhdf5.settings.in
@@ -39,6 +39,7 @@ Languages:
----------
Fortran: @HDF_FORTRAN@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@
+@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran 2003 Compiler: @HAVE_FORTRAN_2003@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@