summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-02-18 16:21:34 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-02-18 16:21:34 (GMT)
commit37cfaf1665f1a036c4a907367c7e25b7ac849013 (patch)
treecbdea15114da44de5f1d74057fdb8de449d18f41 /src/H5F.c
parent901051cecb91bffb1920c0b31bec2f0661363a1a (diff)
downloadhdf5-37cfaf1665f1a036c4a907367c7e25b7ac849013.zip
hdf5-37cfaf1665f1a036c4a907367c7e25b7ac849013.tar.gz
hdf5-37cfaf1665f1a036c4a907367c7e25b7ac849013.tar.bz2
[svn-r1078] Changes since 19990215
---------------------- ./src/H5.c Fixed more dependency problems in H5_term_library(). There was a bug in the previous version that could cause the wrong EOF marker to be written to the boot block under certain circumstances. Hopefully this fixes it although I don't ready access to a test case (Mark Miller will test it). ./src/H5F.c ./src/H5Fprivate.h Added an H5F_close_all() that is similar to H5F_term_interface() but which doesn't close the interface. Files that don't have open object headers are closed, others are delayed until all object headers close. All files are flushed. ./src/H5ACprivate.h ./src/H5Bprivate.h ./src/H5Dprivate.h ./src/H5Eprivate.h ./src/H5Fprivate.h ./src/H5Gpkg.h ./src/H5Gprivate.h ./src/H5Gpublic.h ./src/H5HGprivate.h ./src/H5HLprivate.h ./src/H5Iprivate.h ./src/H5MFprivate.h ./src/H5MMprivate.h ./src/H5Oprivate.h ./src/H5Pprivate.h ./src/H5Ppublic.h ./src/H5RAprivate.h ./src/H5Sprivate.h ./src/H5Spublic.h ./src/H5Tpkg.h ./src/H5Tprivate.h ./src/H5Tpublic.h ./src/H5Vprivate.h ./src/H5Zprivate.h ./src/H5private.h ./src/H5public.h Reindented after __DLL__ was added.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 4798141..bfe4068 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -244,6 +244,46 @@ H5F_term_interface(intn status)
}
+/*-------------------------------------------------------------------------
+ * Function: H5F_close_all
+ *
+ * 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()).
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Thursday, February 18, 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.
+ */
+ 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");
+ }
+
+ FUNC_LEAVE(SUCCEED);
+}
+
+
/*--------------------------------------------------------------------------
NAME
H5F_encode_length_unusual -- encode an unusual length size