summaryrefslogtreecommitdiffstats
path: root/src/H5Fquery.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-11 20:02:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-11 20:02:05 (GMT)
commit74af8cfa9234643684e592e00f3cc2c7fce66571 (patch)
tree0d0237cd507a43cab8c65e73423af386e5cff8c8 /src/H5Fquery.c
parentcce29e56422e84ffb3a686b6823692b545b28323 (diff)
downloadhdf5-74af8cfa9234643684e592e00f3cc2c7fce66571.zip
hdf5-74af8cfa9234643684e592e00f3cc2c7fce66571.tar.gz
hdf5-74af8cfa9234643684e592e00f3cc2c7fce66571.tar.bz2
[svn-r17035] Description:
Add private macro for testing if an address is in the 'temporary' file space for a file. Tested on: FreeBSD/32 6.3 (duty) Too minor to require h5committest
Diffstat (limited to 'src/H5Fquery.c')
-rw-r--r--src/H5Fquery.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 275061d..5538d60 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -687,3 +687,32 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_fileno() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_is_tmp_addr
+ *
+ * Purpose: Quick and dirty routine to determine if an address is in
+ * the 'temporary' file space.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
+ *
+ * Return: TRUE/FALSE on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * June 11, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+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)
+
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->lf);
+
+ FUNC_LEAVE_NOAPI(H5F_addr_le(f->shared->tmp_addr, addr))
+} /* end H5F_is_tmp_addr() */
+