[svn-r1087] Changes since 19990218

----------------------

./src/H5F.c
./src/H5private.h
./src/H5Ipublic.h
./src/H5O.c
	Fixed a rather nasty bug with file closing that caused the
	file boot block to be updated incorrectly, effectively
	truncating the file.  The bug I fixed was triggered by:

	    1. Create a file, F
	    2. Open an object, X
	    3. Close file F
	    4. Reopen file F for read/write.
	    5. Create and close some objects
	    6. Close file F
	    7. Close library (exit).

	Step 3 pended the close because object X is still open, but
	the file ID was removed from the H5I_FILE ID group. Step 4
	created a new file because it didn't see any matching file on
	the H5I_FILE ID group.  Step 5 extends the file. Step 6 writes
	the new file boot block to disk. Step 7 closes object X and
	completes the close from step 3, writing the old boot block
	information to disk.

	The new behavior is that step 3 moves the file from the
	H5I_FILE group to the H5I_FILE_CLOSING group. Step 4 searches
	both groups and finds the file. Step 5 extends the file using
	the same H5F_file_t struct as step 3. Step 6 closes the H5F_t
	struct opened in step 3 but not the H5F_file_t struct shared
	by steps 1 and 3. Step 7 closes object X which closes the
	H5F_file_t from step 1, flushing the boot block which was
	shared by all steps.

./src/H5F.c
	Added some bulletproofing to file reference counting and
	removed comments which no longer apply.  Added H5F_flush_all()
	and H5F_close_all() which apply to all files.

./src/H5A.c
./src/H5D.c
./src/H5F.c
./src/H5G.c
./src/H5I.c
./src/H5Iprivate.h
./src/H5R.c
./src/H5RA.c
./src/H5S.c
./src/H5T.c
	Added the new H5I_free_t data type to describe the function
	type to be passed as the `free_func' argument to
	H5I_init_group().

./src/H5I.c
	Bulletproofed the object removal functions. Removed comments
	which no longer apply. Changed global variable names so they
	don't violate the naming scheme. Added H5I_debug() that prints
	the contents of an ID group.  Removed H5I_inc_ref() because it
	isn't used. Reindented a couple of functions.

./src/H5.c
./src/H5G.c
./src/H5Ipublic.h
	Changed H5I_MAXID to H5I_NGROUPS to better relect the fact
	that it's the total number of valid ID groups.

./src/H5Shyper.c
	Changed hyperslab offset arrays to signed quantities to get
	rid of warnings on DEC cluster.

./src/H5Flow.c
./src/H5Fprivate.h
	Changed the objno argument of H5F_addr_pack() to be unsigned
	to get rid of warnings on DEC cluster.
This commit is contained in:
Robb Matzke 1999-02-20 11:18:51 -05:00
parent 35a62b068b
commit e2e5476fa5
21 changed files with 1308 additions and 1092 deletions

2
README
View File

@ -1,4 +1,4 @@
This is hdf5-1.1.43 released on Fri Feb 19 04:18:33 CST 1999
This is hdf5-1.1.43 released on Fri Feb 19 09:30:24 EST 1999
Please refer to the INSTALL file for installation instructions.
------------------------------------------------------------------------------

View File

@ -1,67 +1,3 @@
H5.o: \
H5.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h \
H5Zpublic.h \
H5Rpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h
H5A.o: \
H5A.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h
H5AC.o: \
H5AC.c \
H5private.h \
@ -91,43 +27,6 @@ H5B.o: \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h
H5D.o: \
H5D.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h
H5E.o: \
H5E.c \
H5private.h \
@ -135,38 +34,6 @@ H5E.o: \
H5config.h \
H5api_adpt.h \
H5Iprivate.h
H5F.o: \
H5F.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Aprivate.h \
H5Apublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Iprivate.h \
H5ACprivate.h \
H5ACpublic.h \
H5Eprivate.h \
H5Epublic.h
H5Farray.o: \
H5Farray.c \
H5private.h \
@ -218,33 +85,18 @@ H5Ffamily.o: \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h
H5Fistore.o: \
H5Fistore.c \
H5Flow.o: \
H5Flow.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h
H5Dpublic.h
H5Fmpio.o: \
H5Fmpio.c \
H5private.h \
@ -308,43 +160,6 @@ H5Fstdio.o: \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h
H5G.o: \
H5G.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Aprivate.h \
H5Apublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Gpkg.h \
H5ACprivate.h \
H5ACpublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h
H5Gent.o: \
H5Gent.c \
H5private.h \
@ -465,13 +280,6 @@ H5HL.o: \
H5HLprivate.h \
H5HLpublic.h \
H5MFprivate.h
H5I.o: \
H5I.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h
H5MF.o: \
H5MF.c \
H5private.h \
@ -491,60 +299,6 @@ H5MM.o: \
H5config.h \
H5api_adpt.h \
H5Eprivate.h
H5O.o: \
H5O.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h
H5Oattr.o: \
H5Oattr.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
H5Ocomp.o: \
H5Ocomp.c \
H5private.h \
@ -864,119 +618,6 @@ H5Ostab.o: \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
H5P.o: \
H5P.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
H5R.o: \
H5R.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Dprivate.h \
H5Dpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
H5RA.o: \
H5RA.c \
H5RAprivate.h \
H5RApublic.h \
H5Ipublic.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5private.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h
H5S.o: \
H5S.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
H5Sall.o: \
H5Sall.c \
H5private.h \
@ -1004,6 +645,33 @@ H5Sall.o: \
H5Zprivate.h \
H5Zpublic.h \
H5Vprivate.h
H5Shyper.o: \
H5Shyper.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Vprivate.h
H5Smpio.o: \
H5Smpio.c \
H5private.h \
@ -1107,38 +775,6 @@ H5Sselect.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5T.o: \
H5T.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Iprivate.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Tpkg.h \
H5Rprivate.h
H5Tbit.o: \
H5Tbit.c \
H5private.h \
@ -1268,32 +904,111 @@ H5Z.o: \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
H5Flow.o: \
H5Flow.c \
H5P.o: \
H5P.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h
H5Shyper.o: \
H5Shyper.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
H5T.o: \
H5T.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Iprivate.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Tpkg.h \
H5Rprivate.h
H5A.o: \
H5A.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h
H5D.o: \
H5D.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
@ -1304,6 +1019,301 @@ H5Shyper.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Vprivate.h
H5Eprivate.h \
H5Epublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h
H5Fistore.o: \
H5Fistore.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Iprivate.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h
H5G.o: \
H5G.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Aprivate.h \
H5Apublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Iprivate.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Gpkg.h \
H5ACprivate.h \
H5ACpublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5MMprivate.h \
H5MMpublic.h
H5Oattr.o: \
H5Oattr.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Iprivate.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
H5R.o: \
H5R.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Dprivate.h \
H5Dpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
H5RA.o: \
H5RA.c \
H5RAprivate.h \
H5RApublic.h \
H5Ipublic.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Dprivate.h \
H5Dpublic.h \
H5private.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Iprivate.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h
H5S.o: \
H5S.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h \
H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
H5.o: \
H5.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h \
H5Zpublic.h \
H5Rpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h
H5F.o: \
H5F.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Aprivate.h \
H5Apublic.h \
H5Ipublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Iprivate.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5ACprivate.h \
H5ACpublic.h \
H5Eprivate.h \
H5Epublic.h
H5I.o: \
H5I.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5Iprivate.h
H5O.o: \
H5O.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h

View File

@ -150,9 +150,7 @@ H5_term_library(void)
* (because H5F_close() can delay until all object headers are
* closed). We handle this cycle by calling H5F_close() for all
* files, which flushes the meta data caches and updates the file
* boot block but doesn't actually finalize the close until all
* open objects are closed by the H5*_term_interface() functions
* below. Once that happens we can close the H5F interface.
* boot block.
*/
H5F_close_all();
@ -168,7 +166,7 @@ H5_term_library(void)
H5S_term_interface(-1); /* */
H5T_native_close(-1); /* D RA */
H5T_term_interface(-1); /* D RA */
H5P_term_interface(-1); /* D */
H5P_term_interface(-1); /* D F */
H5F_term_interface(-1); /* A D G S T */
H5I_term_interface(-1); /* A D F G P RA S T TB Z */
/*------------------------- --------------------------------- */
@ -1804,8 +1802,8 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...)
case H5I_REFERENCE:
fprintf (out, "H5I_REFERENCE");
break;
case H5I_MAXID:
fprintf (out, "H5I_MAXID");
case H5I_NGROUPS:
fprintf (out, "H5I_NGROUPS");
break;
default:
fprintf (out, "%ld", (long)id_type);

View File

@ -68,7 +68,7 @@ H5A_init_interface(void)
* Create attribute group.
*/
if (H5I_init_group(H5I_ATTR, H5I_ATTRID_HASHSIZE, H5A_RESERVED_ATOMS,
(herr_t (*)(void *)) H5A_close)<0) {
(H5I_free_t)H5A_close)<0) {
HRETURN_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -285,8 +285,7 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type,
done:
if (ret_value < 0) {
if(attr)
H5A_close(attr);
if(attr) H5A_close(attr);
}
FUNC_LEAVE(ret_value);
@ -522,8 +521,7 @@ H5A_open(H5G_entry_t *ent, unsigned idx)
done:
if (ret_value < 0) {
if(attr)
H5A_close(attr);
if(attr) H5A_close(attr);
}
FUNC_LEAVE(ret_value);
@ -928,21 +926,21 @@ H5Aget_type(hid_t attr_id)
* reopen the type before returning it to the user. Make the type
* read-only.
*/
if (NULL==(dst=H5T_copy (attr->dt, H5T_COPY_REOPEN))) {
HRETURN_ERROR (H5E_ATTR, H5E_CANTINIT, FAIL,
"unable to copy datatype");
if (NULL==(dst=H5T_copy(attr->dt, H5T_COPY_REOPEN))) {
HRETURN_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL,
"unable to copy datatype");
}
if (H5T_lock (dst, FALSE)<0) {
H5T_close (dst);
HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to lock transient data type");
if (H5T_lock(dst, FALSE)<0) {
H5T_close(dst);
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to lock transient data type");
}
/* Atomize */
if ((ret_value=H5I_register (H5I_DATATYPE, dst))<0) {
H5T_close (dst);
HRETURN_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL,
"unable to register datatype atom");
if ((ret_value=H5I_register(H5I_DATATYPE, dst))<0) {
H5T_close(dst);
HRETURN_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL,
"unable to register datatype atom");
}
FUNC_LEAVE(ret_value);
@ -1377,16 +1375,12 @@ H5A_close(H5A_t *attr)
/* Free dynamicly allocated items */
if(attr->name)
H5MM_xfree(attr->name);
if(attr->dt)
H5T_close(attr->dt);
if(attr->ds)
H5S_close(attr->ds);
if(attr->data)
H5MM_xfree(attr->data);
if(attr->dt) H5T_close(attr->dt);
if(attr->ds) H5S_close(attr->ds);
if(attr->data) H5MM_xfree(attr->data);
/* Close the object's symbol-table entry */
if(attr->ent_opened)
H5O_close(&(attr->ent));
if(attr->ent_opened) H5O_close(&(attr->ent));
#ifndef LATER
/* Do something with the shared information? */

View File

@ -106,23 +106,23 @@ typedef struct H5AC_t {
/*
* Library prototypes.
*/
__DLL__ herr_t H5AC_dest (H5F_t *f);
__DLL__ void *H5AC_find_f (H5F_t *f, const H5AC_class_t *type,
__DLL__ herr_t H5AC_dest(H5F_t *f);
__DLL__ void *H5AC_find_f(H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, const void *udata1,
void *udata2);
__DLL__ void *H5AC_protect(H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, const void *udata1,
void *udata2);
__DLL__ void *H5AC_protect (H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, const void *udata1,
void *udata2);
__DLL__ herr_t H5AC_unprotect (H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, void *thing);
__DLL__ herr_t H5AC_flush (H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, hbool_t destroy);
__DLL__ herr_t H5AC_create (H5F_t *f, intn size_hint);
__DLL__ herr_t H5AC_rename (H5F_t *f, const H5AC_class_t *type,
const haddr_t *old_addr, const haddr_t *new_addr);
__DLL__ herr_t H5AC_set (H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, void *thing);
__DLL__ herr_t H5AC_debug (H5F_t *f);
__DLL__ herr_t H5AC_unprotect(H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, void *thing);
__DLL__ herr_t H5AC_flush(H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, hbool_t destroy);
__DLL__ herr_t H5AC_create(H5F_t *f, intn size_hint);
__DLL__ herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
const haddr_t *old_addr, const haddr_t *new_addr);
__DLL__ herr_t H5AC_set(H5F_t *f, const H5AC_class_t *type,
const haddr_t *addr, void *thing);
__DLL__ herr_t H5AC_debug(H5F_t *f);
#define H5AC_find(F,TYPE,ADDR_P,UDATA1,UDATA2) \
(((F)->shared->cache->slot[H5AC_HASH(F,ADDR_P)].type==(TYPE) && \

View File

@ -117,7 +117,7 @@ H5D_init_interface(void)
/* Initialize the atom group for the dataset IDs */
if (H5I_init_group(H5I_DATASET, H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS,
(herr_t (*)(void *)) H5D_close)<0) {
(H5I_free_t)H5D_close)<0) {
HRETURN_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -383,7 +383,7 @@ H5Dget_space(hid_t dset_id)
/* Create an atom */
if ((ret_value=H5I_register (H5I_DATASPACE, space))<0) {
H5S_close (space);
H5S_close(space);
HRETURN_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL,
"unable to register data space");
}
@ -1340,7 +1340,7 @@ H5D_open_oid(H5G_entry_t *ent)
ret_value = dataset;
done:
if (space) H5S_close (space);
if (space) H5S_close(space);
if (ret_value==NULL && dataset) {
if (H5F_addr_defined(&(dataset->ent.header))) {
H5O_close(&(dataset->ent));
@ -1394,7 +1394,7 @@ H5D_close(H5D_t *dataset)
* can do if one of these fails, so we just continue.
*/
free_failed = (H5T_close(dataset->type) < 0 ||
H5P_close (H5P_DATASET_CREATE, dataset->create_parms));
H5P_close(H5P_DATASET_CREATE, dataset->create_parms));
/* Close the dataset object */
H5O_close(&(dataset->ent));
@ -1764,7 +1764,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
if (dst_id >= 0) H5I_dec_ref(dst_id);
if (tconv_buf && NULL==xfer_parms->tconv_buf) H5TB_release_buf(tconv_id);
if (bkg_buf && NULL==xfer_parms->bkg_buf) H5TB_release_buf (bkg_id);
if (free_this_space) H5S_close (free_this_space);
if (free_this_space) H5S_close(free_this_space);
FUNC_LEAVE(ret_value);
}
@ -2138,7 +2138,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
if (dst_id >= 0) H5I_dec_ref(dst_id);
if (tconv_buf && NULL==xfer_parms->tconv_buf) H5TB_release_buf(tconv_id);
if (bkg_buf && NULL==xfer_parms->bkg_buf) H5TB_release_buf (bkg_id);
if (free_this_space) H5S_close (free_this_space);
if (free_this_space) H5S_close(free_this_space);
FUNC_LEAVE(ret_value);
}
@ -2222,7 +2222,7 @@ H5D_extend (H5D_t *dataset, const hsize_t *size)
ret_value = SUCCEED;
done:
H5S_close (space);
H5S_close(space);
FUNC_LEAVE (ret_value);
}

View File

@ -2002,8 +2002,8 @@ H5F_istore_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_get_addr (H5F_t *f, const H5O_layout_t *layout,
const hssize_t offset[], void *_udata/*out*/)
H5F_istore_get_addr(H5F_t *f, const H5O_layout_t *layout,
const hssize_t offset[], void *_udata/*out*/)
{
H5F_istore_ud1_t *udata = _udata;
intn i;

View File

@ -67,21 +67,21 @@ __DLLVAR__ const H5D_create_t H5D_create_dflt;
__DLLVAR__ const H5D_xfer_t H5D_xfer_dflt;
/* Functions defined in H5D.c */
__DLL__ H5D_t *H5D_create (H5G_entry_t *loc, const char *name,
const H5T_t *type, const H5S_t *space,
const H5D_create_t *create_parms);
__DLL__ H5D_t *H5D_open (H5G_entry_t *loc, const char *name);
__DLL__ herr_t H5D_close (H5D_t *dataset);
__DLL__ H5D_t *H5D_create(H5G_entry_t *loc, const char *name,
const H5T_t *type, const H5S_t *space,
const H5D_create_t *create_parms);
__DLL__ H5D_t *H5D_open(H5G_entry_t *loc, const char *name);
__DLL__ herr_t H5D_close(H5D_t *dataset);
__DLL__ htri_t H5D_isa(H5G_entry_t *ent);
__DLL__ herr_t H5D_read (H5D_t *dataset, const H5T_t *mem_type,
__DLL__ herr_t H5D_read(H5D_t *dataset, const H5T_t *mem_type,
const H5S_t *mem_space, const H5S_t *file_space,
const H5D_xfer_t *xfer_parms, void *buf/*out*/);
__DLL__ herr_t H5D_write(H5D_t *dataset, const H5T_t *mem_type,
const H5S_t *mem_space, const H5S_t *file_space,
const H5D_xfer_t *xfer_parms, void *buf/*out*/);
__DLL__ herr_t H5D_write (H5D_t *dataset, const H5T_t *mem_type,
const H5S_t *mem_space, const H5S_t *file_space,
const H5D_xfer_t *xfer_parms, const void *buf);
__DLL__ herr_t H5D_extend (H5D_t *dataset, const hsize_t *size);
__DLL__ H5G_entry_t *H5D_entof (H5D_t *dataset);
__DLL__ H5T_t *H5D_typeof (H5D_t *dset);
const H5D_xfer_t *xfer_parms, const void *buf);
__DLL__ herr_t H5D_extend(H5D_t *dataset, const hsize_t *size);
__DLL__ H5G_entry_t *H5D_entof(H5D_t *dataset);
__DLL__ H5T_t *H5D_typeof(H5D_t *dset);
__DLL__ H5S_t *H5D_get_space(H5D_t *dset);
__DLL__ H5D_t * H5D_open_oid(H5G_entry_t *ent);
__DLL__ H5F_t * H5D_get_file(const H5D_t *dset);

291
src/H5F.c
View File

@ -20,22 +20,6 @@ static char RcsId[] = "@(#)$Revision$";
/* $Id$ */
/*LINTLIBRARY */
/*
FILE
hdf5file.c
HDF5 file I/O routines
EXPORTED ROUTINES
H5Fcreate -- Create an HDF5 file
H5Fclose -- Close an open HDF5 file
LIBRARY-SCOPED ROUTINES
LOCAL ROUTINES
H5F_init_interface -- initialize the H5F interface
*/
/* Packages needed by this file... */
#include <H5private.h> /*library functions */
#include <H5Aprivate.h> /*attributes */
@ -49,17 +33,8 @@ static char RcsId[] = "@(#)$Revision$";
#include <H5Pprivate.h> /*property lists */
#include <H5Tprivate.h> /*data types */
/*
* Define the following if you want H5F_block_read() and H5F_block_write() to
* keep track of the file position and attempt to minimize calls to the file
* seek method.
*/
/* #define H5F_OPT_SEEK */
#define PABLO_MASK H5F_mask
/*-------------------- Locally scoped variables -----------------------------*/
/*
* Define the default file creation property list.
*/
@ -110,6 +85,7 @@ static herr_t H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate);
static herr_t H5F_locate_signature(H5F_low_t *f_handle,
const H5F_access_t *access_parms,
haddr_t *addr/*out*/);
static intn H5F_flush_all_cb(H5F_t *f, const void *_invalidate);
/*-------------------------------------------------------------------------
@ -154,8 +130,11 @@ H5F_init(void)
* Changed pablo mask from H5_mask to H5F_mask for the FUNC_LEAVE call.
* It was already H5F_mask for the PABLO_TRACE_ON call.
*
* rky 980816
* Kim Yates, 1998-08-16
* Added .disp, .btype, .ftype to H5F_access_t.
*
* Robb Matzke, 1999-02-19
* Added initialization for the H5I_FILE_CLOSING ID group.
*-------------------------------------------------------------------------
*/
static herr_t
@ -175,9 +154,18 @@ H5F_init_interface(void)
}
#endif
/* Initialize the atom group for the file IDs */
/*
* Initialize the atom group for the file IDs. There are two groups:
* the H5I_FILE group contains all the ID's for files which are currently
* open at the public API level while the H5I_FILE_CLOSING group contains
* ID's for files for which the application has called H5Fclose() but
* which are pending completion because there are object headers still
* open within the file.
*/
if (H5I_init_group(H5I_FILE, H5I_FILEID_HASHSIZE, 0,
(herr_t (*)(void*))H5F_close)<0) {
(H5I_free_t)H5F_close)<0 ||
H5I_init_group(H5I_FILE_CLOSING, H5I_FILEID_HASHSIZE, 0,
(H5I_free_t)H5F_close)<0) {
HRETURN_ERROR (H5E_FILE, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -217,39 +205,63 @@ H5F_init_interface(void)
}
/*--------------------------------------------------------------------------
NAME
H5F_term_interface
PURPOSE
Terminate various H5F objects
USAGE
void H5F_term_interface()
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
Release the atom group and any other resources allocated.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Can't report errors...
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
* Function: H5F_term_interface
*
* Purpose: Terminate this interface: free all memory and reset global
* variables to their initial values. Release all ID groups
* associated with this interface.
*
* Return: Success:
*
* Failure:
*
* Programmer: Robb Matzke
* Friday, February 19, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
H5F_term_interface(intn status)
{
if (interface_initialize_g>0) {
H5I_destroy_group(H5I_FILE);
H5I_destroy_group(H5I_FILE_CLOSING);
}
interface_initialize_g = status;
}
/*-------------------------------------------------------------------------
* Function: H5F_close_all
* Function: H5F_flush_all_cb
*
* Purpose: Closes all open files. If a file has open object headers then
* the underlying file is held open until all object headers are
* closed for the file (see H5O_close()).
* Purpose: Callback function for H5F_flush_all().
*
* Return: Always returns zero.
*
* Programmer: Robb Matzke
* Friday, February 19, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static intn
H5F_flush_all_cb(H5F_t *f, const void *_invalidate)
{
hbool_t invalidate = (hbool_t)_invalidate;
H5F_flush(f, H5F_SCOPE_LOCAL, invalidate);
return 0;
}
/*-------------------------------------------------------------------------
* Function: H5F_flush_all
*
* Purpose: Flush all open files. If INVALIDATE is true then also remove
* everything from the cache.
*
* Return: Success: Non-negative
*
@ -263,23 +275,55 @@ H5F_term_interface(intn status)
*-------------------------------------------------------------------------
*/
herr_t
H5F_flush_all(hbool_t invalidate)
{
FUNC_ENTER(H5F_flush_all, FAIL);
H5I_search(H5I_FILE, (H5I_search_func_t)H5F_flush_all_cb,
(void*)invalidate);
FUNC_LEAVE(SUCCEED);
}
/*-------------------------------------------------------------------------
* Function: H5F_close_all
*
* Purpose: Close all open files.
*
* Return: Success: Non-negative
*
* Failure: Negative
*
* Programmer: Robb Matzke
* Friday, February 19, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
H5F_close_all(void)
{
FUNC_ENTER(H5F_close_all, FAIL);
/*
* There is no way to call H5F_close() on all items in the group and
* remove the items from the group without destroying the group, so we do
* it in two steps: first destroy the group, then create a new empty
* group.
* Close all normally open files. Any file which has open object headers
* will be moved to the H5I_FILE_CLOSING ID group.
*/
H5I_destroy_group(H5I_FILE);
if (H5I_init_group(H5I_FILE, H5I_FILEID_HASHSIZE, 0,
(herr_t (*)(void*))H5F_close)<0) {
HRETURN_ERROR (H5E_FILE, H5E_CANTINIT, FAIL,
"unable to initialize file group");
if (H5I_destroy_group(H5I_FILE)<0) {
HRETURN_ERROR(H5E_FILE, H5E_CANTINIT, FAIL,
"unable to destroy H5I_FILE ID group");
}
/*
* Recreate the H5I_FILE group just in case someone wants to open or
* create another file later.
*/
if (H5I_init_group(H5I_FILE, H5I_FILEID_HASHSIZE, 0,
(H5I_free_t)H5F_close)<0) {
HRETURN_ERROR(H5E_FILE, H5E_CANTINIT, FAIL,
"unable to recreate H5I_FILE ID group");
}
FUNC_LEAVE(SUCCEED);
}
@ -647,6 +691,7 @@ H5F_new(H5F_file_t *shared, const H5F_create_t *fcpl, const H5F_access_t *fapl)
/* Create the chunk cache */
H5F_istore_init (f);
}
f->shared->nrefs++;
f->nrefs = 1;
ret_value = f;
@ -681,6 +726,11 @@ H5F_new(H5F_file_t *shared, const H5F_create_t *fcpl, const H5F_access_t *fapl)
* Nothing happens unless the reference count for the H5F_t goes to
* zero. The reference counts are decremented here.
*
* Robb Matzke, 1999-02-19
* More careful about decrementing reference counts so they don't go
* negative or wrap around to some huge value. Nothing happens if a
* reference count is already zero.
*
*-------------------------------------------------------------------------
*/
static herr_t
@ -690,8 +740,8 @@ H5F_dest(H5F_t *f)
FUNC_ENTER(H5F_dest, FAIL);
if (f && 0 == --f->nrefs) {
if (0 == --f->shared->nrefs) {
if (f && 1==f->nrefs) {
if (1==f->shared->nrefs) {
/*
* Do not close the root group since we didn't count it, but free
* the memory associated with it.
@ -710,12 +760,27 @@ H5F_dest(H5F_t *f)
H5P_close (H5P_FILE_CREATE, f->shared->create_parms);
H5P_close (H5P_FILE_ACCESS, f->shared->access_parms);
f->shared = H5MM_xfree(f->shared);
} else if (f->shared->nrefs>0) {
/*
* There are other references to the shared part of the file.
* Only decrement the reference count.
*/
--f->shared->nrefs;
}
/* Free the non-shared part of the file */
f->name = H5MM_xfree(f->name);
f->mtab.child = H5MM_xfree(f->mtab.child);
f->mtab.nalloc = 0;
H5MM_xfree(f);
} else if (f->nrefs>0) {
/*
* There are other references to this file. Only decrement the
* reference count.
*/
--f->nrefs;
}
FUNC_LEAVE(ret_value);
}
@ -880,7 +945,8 @@ H5F_open(const char *name, uintn flags,
HRETURN_ERROR(H5E_FILE, H5E_WRITEERROR, NULL,
"file is not writable");
}
if ((old = H5I_search(H5I_FILE, H5F_compare_files, &search))) {
if ((old = H5I_search(H5I_FILE, H5F_compare_files, &search)) ||
(old = H5I_search(H5I_FILE_CLOSING, H5F_compare_files, &search))) {
if (flags & H5F_ACC_TRUNC) {
HRETURN_ERROR(H5E_FILE, H5E_FILEOPEN, NULL,
"file already open - TRUNC failed");
@ -1615,9 +1681,19 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
/*-------------------------------------------------------------------------
* Function: H5F_close
*
* Purpose: Closes an open HDF5 file. From the API this function gets
* called when a file hid_t reference count gets to zero as a
* result of calling H5Fclose().
* Purpose: Closes a file or causes the close operation to be pended.
* This function is called two ways: from the API it gets called
* by H5Fclose->H5I_dec_ref->H5F_close when H5I_dec_ref()
* decrements the file ID reference count to zero. The file ID
* is removed from the H5I_FILE group by H5I_dec_ref() just
* before H5F_close() is called. If there are open object
* headers then the close is pended by moving the file to the
* H5I_FILE_CLOSING ID group (the f->closing contains the ID
* assigned to file).
*
* This function is also called directly from H5O_close() when
* the last object header is closed for the file and the file
* has a pending close.
*
* Return: Non-negative on success/Negative on failure
*
@ -1639,10 +1715,11 @@ H5F_close(H5F_t *f)
uintn i;
FUNC_ENTER(H5F_close, FAIL);
assert(f->nrefs>0);
/*
* If the reference count is positive then just decrement the count and
* flush the file.
* If this file is referenced more than once then just decrement the
* count, flush the file, and return.
*/
if (f->nrefs>1) {
if (H5F_flush(f, H5F_SCOPE_LOCAL, FALSE)<0) {
@ -1668,7 +1745,8 @@ H5F_close(H5F_t *f)
* If object headers are still open then delay deletion of resources until
* they have all been closed. Flush all caches and update the object
* header anyway so that failing to close all objects isn't a major
* problem.
* problem. If the file is on the H5I_FILE list then move it to the
* H5I_FILE_CLOSING list instead.
*/
if (f->nopen_objs>0) {
if (H5F_flush(f, H5F_SCOPE_LOCAL, FALSE)<0) {
@ -1685,9 +1763,11 @@ H5F_close(H5F_t *f)
1 == f->nopen_objs?"that header is":"those headers are");
}
#endif
f->close_pending = TRUE;
if (!f->closing) {
f->closing = H5I_register(H5I_FILE_CLOSING, f);
}
HRETURN(SUCCEED);
} else if (f->close_pending) {
} else if (f->closing) {
#ifdef H5F_DEBUG
if (H5DEBUG(F)) {
fprintf(H5DEBUG(F), "H5F: H5F_close: operation completing\n");
@ -1699,16 +1779,17 @@ H5F_close(H5F_t *f)
* If this is the last reference to the shared part of the file then
* close it also.
*/
if (1==f->nrefs && 1==f->shared->nrefs) {
assert(1==f->nrefs);
if (1==f->shared->nrefs) {
/* Flush and destroy all caches */
if (H5F_flush (f, H5F_SCOPE_LOCAL, TRUE)<0) {
HRETURN_ERROR (H5E_CACHE, H5E_CANTFLUSH, FAIL,
"unable to flush cache");
if (H5F_flush(f, H5F_SCOPE_LOCAL, TRUE)<0) {
HRETURN_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL,
"unable to flush cache");
}
/* Dump debugging info */
H5AC_debug(f);
H5F_istore_stats (f, FALSE);
H5F_istore_stats(f, FALSE);
/* Close files and release resources */
H5F_low_close(f->shared->lf, f->shared->access_parms);
@ -1723,7 +1804,12 @@ H5F_close(H5F_t *f)
"unable to flush cache");
}
}
/*
* Destroy the H5F_t struct and decrement the reference count for the
* shared H5F_file_t struct. If the reference count for the H5F_file_t
* struct reaches zero then destroy it also.
*/
if (H5F_dest(f)<0) {
HRETURN_ERROR (H5E_FILE, H5E_CANTINIT, FAIL,
"problems closing file");
@ -1732,42 +1818,31 @@ H5F_close(H5F_t *f)
}
/*--------------------------------------------------------------------------
NAME
H5Fclose
PURPOSE
Close an open HDF5 file.
USAGE
herr_t H5Fclose(file_id)
int32_t file_id; IN: File ID of file to close
ERRORS
ARGS BADTYPE Not a file atom.
ATOM BADATOM Can't remove atom.
ATOM BADATOM Can't unatomize file.
CACHE CANTFLUSH Can't flush cache.
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
This function terminates access to an HDF5 file. If this is the last
file ID open for a file and if access IDs are still in use, this function
will fail.
MODIFICATIONS:
Robb Matzke, 18 Jul 1997
File struct destruction is through H5F_dest().
Robb Matzke, 29 Aug 1997
The file boot block is flushed to disk since it's contents may have
changed.
--------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
* Function: H5Fclose
*
* Purpose: This function closes the file specified by FILE_ID by
* flushing all data to storage, and terminating access to the
* file through FILE_ID. If objects (e.g., datasets, groups,
* etc.) are open in the file then the underlying storage is not
* closed until those objects are closed; however, all data for
* the file and the open objects is flushed.
*
* Return: Success: Non-negative
*
* Failure: Negative
*
* Programmer: Robb Matzke
* Saturday, February 20, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
H5Fclose(hid_t file_id)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER(H5Fclose, FAIL);

View File

@ -2002,8 +2002,8 @@ H5F_istore_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
*-------------------------------------------------------------------------
*/
static herr_t
H5F_istore_get_addr (H5F_t *f, const H5O_layout_t *layout,
const hssize_t offset[], void *_udata/*out*/)
H5F_istore_get_addr(H5F_t *f, const H5O_layout_t *layout,
const hssize_t offset[], void *_udata/*out*/)
{
H5F_istore_ud1_t *udata = _udata;
intn i;

View File

@ -336,6 +336,12 @@ typedef struct H5F_low_class_t {
haddr_t *addr/*out*/);
} H5F_low_class_t;
/*
* One of these H5F_low_t structs is allocated for each H5F_file_t struct.
* This struct describes how to access the storage for the hdf5 address space,
* whether that storage is file, local memory, shared memory, network
* distributed global memory, etc.
*/
typedef struct H5F_low_t {
const H5F_low_class_t *type;/* What type of file is this? */
haddr_t eof; /* Address of logical end-of-file */
@ -427,28 +433,12 @@ typedef struct H5F_rdcc_t {
struct H5F_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/
} H5F_rdcc_t;
/* Mount property list */
typedef struct H5F_mprop_t {
hbool_t local; /* Are absolute symlinks local to file? */
} H5F_mprop_t;
/* A record of the mount table */
typedef struct H5F_mount_t {
struct H5G_t *group; /* Mount point group held open */
struct H5F_t *file; /* File mounted at that point */
} H5F_mount_t;
/* The mount table */
typedef struct H5F_mtab_t {
struct H5F_t *parent;/* Parent file */
uintn nmounts;/* Number of children which are mounted */
uintn nalloc; /* Number of mount slots allocated */
H5F_mount_t *child; /* An array of mount records */
} H5F_mtab_t;
/*
* Define the structure to store the file information for HDF5 files. One of
* these structures is allocated per file, not per H5Fopen().
* these structures is allocated per file, not per H5Fopen(). That is, set of
* H5F_t structs can all point to the same H5F_file_t struct. The `nrefs'
* count in this struct indicates the number of H5F_t structs which are
* pointing to this struct.
*/
typedef struct H5F_file_t {
H5F_search_t key; /* The key for looking up files */
@ -471,10 +461,35 @@ typedef struct H5F_file_t {
H5MF_free_t fl_free[H5MF_NFREE]; /*free block array */
} H5F_file_t;
/* Mount property list */
typedef struct H5F_mprop_t {
hbool_t local; /* Are absolute symlinks local to file? */
} H5F_mprop_t;
/* A record of the mount table */
typedef struct H5F_mount_t {
struct H5G_t *group; /* Mount point group held open */
struct H5F_t *file; /* File mounted at that point */
} H5F_mount_t;
/*
* The mount table describes what files are attached to (mounted on) the file
* to which this table belongs.
*/
typedef struct H5F_mtab_t {
struct H5F_t *parent;/* Parent file */
uintn nmounts;/* Number of children which are mounted */
uintn nalloc; /* Number of mount slots allocated */
H5F_mount_t *child; /* An array of mount records */
} H5F_mtab_t;
/*
* This is the top-level file descriptor. One of these structures is
* allocated every time H5Fopen() is called although they may contain
* pointers to shared H5F_file_t structs.
* allocated every time H5Fopen() is called although they may contain pointers
* to shared H5F_file_t structs. The reference count (nrefs) indicates the
* number of times the file has been opened (the application can only open a
* file once explicitly, but the library can open the file a second time to
* indicate that the file is mounted on some other file).
*/
typedef struct H5F_t {
uintn nrefs; /* Reference count */
@ -482,7 +497,7 @@ typedef struct H5F_t {
char *name; /* Name used to open file */
H5F_file_t *shared; /* The shared file info */
uintn nopen_objs; /* Number of open object headers*/
hbool_t close_pending; /* File close is pending */
hid_t closing; /* H5I_FILE_CLOSING ID or zero */
H5F_mtab_t mtab; /* File mount table */
} H5F_t;
@ -545,13 +560,14 @@ __DLLVAR__ hbool_t H5_mpi_1_metawrite_g;
/* Private functions, not part of the publicly documented API */
__DLL__ herr_t H5F_init(void);
__DLL__ herr_t H5F_close_all(void);
__DLL__ void H5F_encode_length_unusual(const H5F_t *f, uint8_t **p,
uint8_t *l);
__DLL__ H5F_t *H5F_open(const char *name, uintn flags,
const H5F_create_t *create_parms,
const H5F_access_t *access_parms);
__DLL__ herr_t H5F_close(H5F_t *f);
__DLL__ herr_t H5F_close_all(void);
__DLL__ herr_t H5F_flush_all(hbool_t invalidate);
__DLL__ herr_t H5F_debug(H5F_t *f, const haddr_t *addr, FILE * stream,
intn indent, intn fwidth);
__DLL__ herr_t H5F_istore_debug(H5F_t *f, const haddr_t *addr, FILE * stream,

View File

@ -306,7 +306,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx,
HRETURN_ERROR (H5E_SYM, H5E_CANTINIT, FAIL, "unable to open group");
}
if ((udata.group_id=H5I_register (H5I_GROUP, udata.group))<0) {
H5G_close (udata.group);
H5G_close(udata.group);
HRETURN_ERROR (H5E_SYM, H5E_CANTINIT, FAIL,
"unable to register group");
}
@ -682,7 +682,7 @@ H5G_init_interface(void)
/* Initialize the atom group for the group IDs */
if (H5I_init_group(H5I_GROUP, H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS,
(herr_t (*)(void *)) H5G_close) < 0) {
(H5I_free_t)H5G_close) < 0) {
HRETURN_ERROR(H5E_SYM, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -1189,7 +1189,7 @@ H5G_mkroot (H5F_t *f, H5G_entry_t *ent)
"unable to open root group");
}
if (NULL==H5O_read (ent, H5O_STAB, 0, &stab)) {
H5O_close (ent);
H5O_close(ent);
HRETURN_ERROR (H5E_SYM, H5E_NOTFOUND, FAIL,
"root object is not a group");
}
@ -1377,7 +1377,7 @@ H5G_open(H5G_entry_t *loc, const char *name)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group");
}
if (NULL==H5O_read (&(grp->ent), H5O_STAB, 0, &mesg)) {
H5O_close (&(grp->ent));
H5O_close(&(grp->ent));
HGOTO_ERROR (H5E_SYM, H5E_CANTOPENOBJ, NULL, "not a group");
}
grp->nref = 1;
@ -1767,8 +1767,9 @@ H5G_loc (hid_t loc_id)
}
break;
case H5I_MAXID:
case H5I_NGROUPS:
case H5I_BADID:
case H5I_FILE_CLOSING:
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object ID");
}

882
src/H5I.c

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
/****************************************************************************
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
****************************************************************************/
/*-----------------------------------------------------------------------------
@ -19,51 +19,60 @@
#ifndef _H5Iprivate_H
#define _H5Iprivate_H
#include <H5Ipublic.h> /*include Public Definitions */
#include <H5Ipublic.h> /*include Public Definitions */
/* Private headers needed by this file */
#include <H5private.h>
/* Default sizes of the hash-tables for various atom groups */
#define H5I_ERRSTACK_HASHSIZE 64
#define H5I_FILEID_HASHSIZE 64
#define H5I_TEMPID_HASHSIZE 64
#define H5I_DATATYPEID_HASHSIZE 64
#define H5I_DATASPACEID_HASHSIZE 64
#define H5I_DATASETID_HASHSIZE 64
#define H5I_OID_HASHSIZE 64
#define H5I_GROUPID_HASHSIZE 64
#define H5I_ATTRID_HASHSIZE 64
#define H5I_TEMPBUFID_HASHSIZE 64
#define H5I_RAGGED_HASHSIZE 64
#define H5I_REFID_HASHSIZE 64
#define H5I_ERRSTACK_HASHSIZE 64
#define H5I_FILEID_HASHSIZE 64
#define H5I_TEMPID_HASHSIZE 64
#define H5I_DATATYPEID_HASHSIZE 64
#define H5I_DATASPACEID_HASHSIZE 64
#define H5I_DATASETID_HASHSIZE 64
#define H5I_OID_HASHSIZE 64
#define H5I_GROUPID_HASHSIZE 64
#define H5I_ATTRID_HASHSIZE 64
#define H5I_TEMPBUFID_HASHSIZE 64
#define H5I_RAGGED_HASHSIZE 64
#define H5I_REFID_HASHSIZE 64
/*
* Function for freeing objects. This function will be called with an object
* ID group number (object type) and a pointer to the object. The function
* should free the object and return non-negative to indicate that the object
* can be removed from the ID group. If the function returns negative
* (failure) then the object will remain in the ID group.
*/
typedef herr_t (*H5I_free_t)(void*);
/* Type of the function to compare objects & keys */
typedef intn (*H5I_search_func_t)(void *obj, const void *key);
/* Atom information structure used */
typedef struct H5I_id_info_t {
hid_t id; /* ID for this info */
uintn count; /* ref. count for this atom */
void *obj_ptr; /* pointer associated with the atom */
struct H5I_id_info_t *next; /* link to next atom (in case of hash-clash)*/
hid_t id; /* ID for this info */
uintn count; /* ref. count for this atom */
void *obj_ptr; /* pointer associated with the atom */
struct H5I_id_info_t *next; /* link to next atom (in case of hash-clash)*/
} H5I_id_info_t;
/* ID group structure used */
typedef struct {
uintn count; /*# of times this group has been initialized */
uintn reserved; /*# of IDs to reserve for constant IDs */
uintn wrapped; /*whether the id count has wrapped around */
size_t hash_size; /*sizeof the hash table to store the IDs in*/
uintn ids; /*current number of IDs held */
uintn nextid; /*ID to use for the next atom */
herr_t (*free_func)(void*);/*func to call to release object */
H5I_id_info_t **id_list; /*pointer to an array of ptrs to IDs */
uintn count; /*# of times this group has been initialized*/
uintn reserved; /*# of IDs to reserve for constant IDs */
uintn wrapped; /*whether the id count has wrapped around */
size_t hash_size; /*sizeof the hash table to store the IDs in */
uintn ids; /*current number of IDs held */
uintn nextid; /*ID to use for the next atom */
H5I_free_t free_func; /*release object method */
H5I_id_info_t **id_list; /*pointer to an array of ptrs to IDs */
} H5I_id_group_t;
/* Type of the function to compare objects & keys */
typedef intn (*H5I_search_func_t) (void * obj, const void * key);
/* Private Functions in H5I.c */
__DLL__ intn H5I_init_group(H5I_type_t grp, size_t hash_size, uintn reserved,
herr_t (*free_func)(void *));
H5I_free_t func);
__DLL__ herr_t H5I_destroy_group(H5I_type_t grp);
__DLL__ hid_t H5I_register(H5I_type_t grp, void *object);
__DLL__ void *H5I_object(hid_t id);
@ -72,6 +81,4 @@ __DLL__ void *H5I_remove(hid_t id);
__DLL__ void *H5I_search(H5I_type_t grp, H5I_search_func_t func,
const void *key);
__DLL__ intn H5I_dec_ref(hid_t id);
__DLL__ hid_t H5I_inc_ref(hid_t id);
#endif

View File

@ -1,13 +1,13 @@
/****************************************************************************
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
****************************************************************************/
/*
@ -22,32 +22,35 @@
/*
* Group values allowed. Start with `1' instead of `0' because it makes the
* tracing output look better when hid_t values are large numbers.
* tracing output look better when hid_t values are large numbers. Change the
* GROUP_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will
* fail otherwise).
*/
typedef enum {
H5I_BADID = (-1),/*invalid Group */
H5I_FILE = 1, /*group ID for File objects */
H5I_TEMPLATE_0, /*group ID for Template objects */
H5I_TEMPLATE_1, /*group ID for Template objects */
H5I_TEMPLATE_2, /*group ID for Template objects */
H5I_TEMPLATE_3, /*group ID for Template objects */
H5I_TEMPLATE_4, /*group ID for Template objects */
H5I_TEMPLATE_5, /*group ID for Template objects */
H5I_TEMPLATE_6, /*group ID for Template objects */
H5I_TEMPLATE_7, /*group ID for Template objects */
H5I_BADID = (-1), /*invalid Group */
H5I_FILE = 1, /*group ID for File objects */
H5I_FILE_CLOSING, /*files pending close due to open objhdrs */
H5I_TEMPLATE_0, /*group ID for Template objects */
H5I_TEMPLATE_1, /*group ID for Template objects */
H5I_TEMPLATE_2, /*group ID for Template objects */
H5I_TEMPLATE_3, /*group ID for Template objects */
H5I_TEMPLATE_4, /*group ID for Template objects */
H5I_TEMPLATE_5, /*group ID for Template objects */
H5I_TEMPLATE_6, /*group ID for Template objects */
H5I_TEMPLATE_7, /*group ID for Template objects */
#ifndef NDEBUG
H5I_TEMPLATE_MAX, /*not really a group ID */
H5I_TEMPLATE_MAX, /*not really a group ID */
#endif
H5I_GROUP, /*group ID for Group objects */
H5I_DATATYPE, /*group ID for Datatype objects */
H5I_DATASPACE, /*group ID for Dataspace objects */
H5I_DATASET, /*group ID for Dataset objects */
H5I_ATTR, /*group ID for Attribute objects */
H5I_TEMPBUF, /*group ID for Temporary buffer objects */
H5I_RAGGED, /*group ID for Ragged array objects */
H5I_REFERENCE, /*group ID for Reference objects */
H5I_MAXID /*highest group in group_t (Invalid as true group)*/
/* Change the GROUP_BITS in H5I.c if the MAXID gets larger than 32 */
H5I_GROUP, /*group ID for Group objects */
H5I_DATATYPE, /*group ID for Datatype objects */
H5I_DATASPACE, /*group ID for Dataspace objects */
H5I_DATASET, /*group ID for Dataset objects */
H5I_ATTR, /*group ID for Attribute objects */
H5I_TEMPBUF, /*group ID for Temporary buffer objects */
H5I_RAGGED, /*group ID for Ragged array objects */
H5I_REFERENCE, /*group ID for Reference objects */
H5I_NGROUPS /*number of valid groups, MUST BE LAST! */
} H5I_type_t;
/* Type of atoms to return to users */

View File

@ -18,6 +18,7 @@
#include <H5ACprivate.h>
#include <H5Eprivate.h>
#include <H5Fprivate.h>
#include <H5Iprivate.h>
#include <H5MFprivate.h>
#include <H5MMprivate.h>
#include <H5Oprivate.h>
@ -274,10 +275,11 @@ H5O_close(H5G_entry_t *obj_ent)
/*
* If the file open-lock count has reached zero and the file has a close
* pending then close the file.
* pending then close the file and remove it from the H5I_FILE_CLOSING ID
* group.
*/
if (0 == obj_ent->file->nopen_objs && obj_ent->file->close_pending) {
H5F_close(obj_ent->file);
if (0==obj_ent->file->nopen_objs && obj_ent->file->closing) {
H5I_dec_ref(obj_ent->file->closing);
}
#ifdef H5O_DEBUG
if (H5DEBUG(O)) {

View File

@ -295,7 +295,7 @@ H5Pclose(hid_t plist_id)
*-------------------------------------------------------------------------
*/
herr_t
H5P_close (H5P_class_t type, void *plist)
H5P_close(H5P_class_t type, void *plist)
{
H5F_access_t *fa_list = (H5F_access_t*)plist;
H5D_create_t *dc_list = (H5D_create_t*)plist;

View File

@ -59,7 +59,7 @@ H5R_init_interface(void)
/* Initialize the atom group for the file IDs */
if (H5I_init_group(H5I_REFERENCE, H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS,
(herr_t (*)(void *)) NULL)<0) {
(H5I_free_t)NULL)<0) {
HRETURN_ERROR (H5E_REFERENCE, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -370,9 +370,9 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
INT32DECODE(p,hobjid.idx);
/* Get the dataset region from the heap (allocate inside routine) */
printf("%s: hobjid.addr=",FUNC);
H5F_addr_print(stdout,&hobjid.addr);
printf(", hobjid.idx=%d\n", hobjid.idx);
printf("%s: hobjid.addr=",FUNC);
H5F_addr_print(stdout,&hobjid.addr);
printf(", hobjid.idx=%d\n", hobjid.idx);
if((buf=H5HG_read(ent.file,&hobjid,NULL))==NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL,
"Unable to read dataset region information");

View File

@ -79,7 +79,7 @@ H5RA_init_interface(void)
/* The atom group */
if (H5I_init_group(H5I_RAGGED, H5I_RAGGED_HASHSIZE, 0,
(herr_t(*)(void*))H5RA_close)<0) {
(H5I_free_t)H5RA_close)<0) {
HRETURN_ERROR (H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}

View File

@ -64,7 +64,7 @@ H5S_init_interface(void)
/* Initialize the atom group for the file IDs */
if (H5I_init_group(H5I_DATASPACE, H5I_DATASPACEID_HASHSIZE,
H5S_RESERVED_ATOMS, (herr_t (*)(void *))H5S_close)<0) {
H5S_RESERVED_ATOMS, (H5I_free_t)H5S_close)<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}

View File

@ -183,7 +183,7 @@ H5T_init_interface(void)
/* Initialize the atom group for the file IDs */
if (H5I_init_group(H5I_DATATYPE, H5I_DATATYPEID_HASHSIZE,
H5T_RESERVED_ATOMS, (herr_t (*)(void *))H5T_close)<0) {
H5T_RESERVED_ATOMS, (H5I_free_t)H5T_close)<0) {
HGOTO_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize interface");
}
@ -4222,7 +4222,7 @@ H5T_open (H5G_entry_t *loc, const char *name)
"unable to open named data type");
}
if (NULL==(dt=H5O_read (&ent, H5O_DTYPE, 0, NULL))) {
H5O_close (&ent);
H5O_close(&ent);
HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, NULL,
"unable to load type message from object header");
}
@ -4443,7 +4443,7 @@ H5T_commit (H5G_entry_t *loc, const char *name, H5T_t *type)
done:
if (ret_value<0) {
if (H5F_addr_defined (&(type->ent.header))) {
H5O_close (&(type->ent));
H5O_close(&(type->ent));
H5F_addr_undef (&(type->ent.header));
}
}