summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-04-28 01:02:02 (GMT)
commit0081d8f082bd9fa8c424439b8fb561101dbec78e (patch)
tree503459c0b8fd32f67ed0da1cc062143998601b25 /src/H5FDcore.c
parentde925f4b385044e2873cf07c3179ce80f56c8c80 (diff)
parent0ef7cabc633e303f61305362e07b86375aa0753f (diff)
downloadhdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.zip
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.gz
hdf5-0081d8f082bd9fa8c424439b8fb561101dbec78e.tar.bz2
[svn-r20658] Description:
Bring code contribution from John Biddiscombe into trunk, according to IP assignment #002 (on file). Checkin message from John is: This patch includes the changes necessary to compile a Virtual File Driver outside of the main hdf5 build and still have it link against the hdf5 core and work correctly at run-time. Certain MPI-IO related VFD checks were hard-coded in the hdf5 source and so it was not possible to extend the functionality to new drivers. Removed IS_H5FD_MPI macros and replaced with H5F_HAS_FEATURE calls with new keys, H5FD_FEAT_HAS_MPI and H5FD_FEAT_ALLOCATE_EARLY. Change H5FD cleanup (term_interface) so that file drivers call terminate when their class types are deleted instead of explicitly being called from the finalization code. Move the terminate call out of H5I and put it into the FD class_free call. Remove the now obsolete check of handles after cleaning types at termination time. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (ember) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 6668a8c..a978555 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -111,6 +111,7 @@ typedef struct H5FD_core_fapl_t {
(size_t)((A)+(Z))<(size_t)(A))
/* Prototypes */
+static herr_t H5FD_core_term(void);
static void *H5FD_core_fapl_get(H5FD_t *_file);
static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
@@ -132,6 +133,7 @@ static const H5FD_class_t H5FD_core_g = {
"core", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /*fc_degree */
+ H5FD_core_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
@@ -225,16 +227,14 @@ done:
*
* Purpose: Shut down the VFD
*
- * Return: <none>
+ * Returns: Non-negative on success or negative on failure
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Modification:
- *
*---------------------------------------------------------------------------
*/
-void
+static herr_t
H5FD_core_term(void)
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_core_term)
@@ -242,7 +242,7 @@ H5FD_core_term(void)
/* Reset VFL ID */
H5FD_CORE_g=0;
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_core_term() */