summaryrefslogtreecommitdiffstats
path: root/src/H5Gprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-07-15 21:23:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-07-15 21:23:19 (GMT)
commitd6dadadc7e048436082fa40901fd0f2394064111 (patch)
tree76b378ce385690648f8652e6051a9b7309172a3e /src/H5Gprivate.h
parentac73359fb1c766140ffa1b88c4820be56cd01f0a (diff)
downloadhdf5-d6dadadc7e048436082fa40901fd0f2394064111.zip
hdf5-d6dadadc7e048436082fa40901fd0f2394064111.tar.gz
hdf5-d6dadadc7e048436082fa40901fd0f2394064111.tar.bz2
[svn-r15368] Description:
Bring back r15367 from the trunk: Add check to avoid mounting a file on a group twice, when the mounts are done on the same HDF5 file, but opened with separate H5Fopen queries. Also add new 'mounted' flag to the H5G_info_t struct, queried with the H5Gget_info() API call, to allow applications to detect and avoid this situation. Tested on: Mac OS X/32 10.5.4 (amazon) Linux/64 10.5.4 (chicago)
Diffstat (limited to 'src/H5Gprivate.h')
-rw-r--r--src/H5Gprivate.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index c54f11d..ab6abc1 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -101,6 +101,12 @@
H5G_CRT_GINFO_EST_NAME_LEN \
}
+/* If the module using this macro is allowed access to the private variables, access them directly */
+#ifdef H5G_PACKAGE
+#define H5G_MOUNTED(G) ((G)->shared->mounted)
+#else /* H5G_PACKAGE */
+#define H5G_MOUNTED(G) (H5G_mounted(G))
+#endif /* H5G_PACKAGE */
/* Type of operation being performed for call to H5G_name_replace() */
typedef enum {
@@ -158,6 +164,7 @@ H5_DLL herr_t H5G_close(H5G_t *grp);
H5_DLL herr_t H5G_free_grp_name(H5G_t *grp);
H5_DLL herr_t H5G_get_shared_count(H5G_t *grp);
H5_DLL herr_t H5G_mount(H5G_t *grp);
+H5_DLL hbool_t H5G_mounted(H5G_t *grp);
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);