diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-28 21:22:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-28 21:22:44 (GMT) |
commit | 74cf7b79a5e3950b5aa6c42c6e807760a7e94ac8 (patch) | |
tree | 6eda5c3f2d1dbc586d912808651cea526631a204 /src/H5T.c | |
parent | b230a5e44849d18ff0ef715225e0473f67179d3a (diff) | |
download | hdf5-74cf7b79a5e3950b5aa6c42c6e807760a7e94ac8.zip hdf5-74cf7b79a5e3950b5aa6c42c6e807760a7e94ac8.tar.gz hdf5-74cf7b79a5e3950b5aa6c42c6e807760a7e94ac8.tar.bz2 |
[svn-r21152] Description:
Further patches for Jira 7638, to ensure that H5D/Aget_type will
be attached to the correct top file. (This change to the library should
reverted when Jira 7638 is finally finished)
Tested on:
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
Mac OS X/32 10.6.8 (amazon) in debug mode
Mac OS X/32 10.6.8 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -5301,3 +5301,39 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_set_latest_version() */ + +/*------------------------------------------------------------------------- + * Function: H5T_patch_file + * + * Purpose: Patch the top-level file pointers contained in dt to point + * to f, if dt is a committed type. This is possible because + * the top-level file pointer can be closed out from under + * dt while dt is contained in the shared file's cache. + * + * Return: SUCCEED + * + * Programmer: Neil Fortner + * Thursday, July 14, 2011 + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_patch_file(H5T_t *dt, H5F_t *f) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(H5T_patch_file, FAIL) + + /* Sanity check */ + HDassert(dt); + HDassert(f); + + if(H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state) { + dt->oloc.file = f; + dt->sh_loc.file = f; + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5T_patch_file() */ + |