summaryrefslogtreecommitdiffstats
path: root/src/H5Fquery.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-05-27 17:00:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-05-27 17:00:29 (GMT)
commit29d45ed0d13493d07d7d744950e1fe1b6d5bbff1 (patch)
treeec205638688c89f80b9d1018611cdbe503131e8d /src/H5Fquery.c
parente5d055581558413f5257edf27fbfab5650c02896 (diff)
downloadhdf5-29d45ed0d13493d07d7d744950e1fe1b6d5bbff1.zip
hdf5-29d45ed0d13493d07d7d744950e1fe1b6d5bbff1.tar.gz
hdf5-29d45ed0d13493d07d7d744950e1fe1b6d5bbff1.tar.bz2
[svn-r16985] Description:
Interim checkin of work toward closing race condition window which can cause errors when reading a file that is used for SWMR-write access. This change introduces a chunk proxy in the metadata cache, which participates in the metadata cache's flush dependencies while representing a raw data chunk in a dataset's chunk cache. Also, the extensible array's SWMR behavior is only invoked when the file is opened for SWMR-write access, allowing more flexibility in flushing extensible array data structure pieces when SWMR-write is not enabled. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
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..d070b94 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_get_next_proxy_addr
+ *
+ * Purpose: Quick and dirty routine to retrieve the next metadata proxy
+ * address for a file.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5F_t data structure)
+ *
+ * Return: Success: Address to use for metadata cache proxy
+ * Failure: abort (should not happen)
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * May 19, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+haddr_t
+H5F_get_next_proxy_addr(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_next_proxy_addr)
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ FUNC_LEAVE_NOAPI(f->shared->next_proxy_addr--)
+} /* end H5F_get_next_proxy_addr() */
+