diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-09 21:58:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-09 21:58:27 (GMT) |
commit | d0acd2431f5151d25e32d67667cda93587dc33e4 (patch) | |
tree | c95693a891b54562f389faede5c9da847332e372 /src/H5AC2.c | |
parent | 32f3fe6586828a0a04263bb34464b6ea0057900b (diff) | |
download | hdf5-d0acd2431f5151d25e32d67667cda93587dc33e4.zip hdf5-d0acd2431f5151d25e32d67667cda93587dc33e4.tar.gz hdf5-d0acd2431f5151d25e32d67667cda93587dc33e4.tar.bz2 |
[svn-r15185] Description:
Added a pointer to the cache that an entry is contained within to the
cache entry structure. This allows us to remove the file pointer from some of
the H5AC2 calls, easing the conversion of some of the cache clients (the free
space section info and fractal heap direct blocks, and probably others).
Removed file pointer from the H5AC2_unpin_entry() call.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.2 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5AC2.c')
-rw-r--r-- | src/H5AC2.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/H5AC2.c b/src/H5AC2.c index 5967497..13d5c12 100644 --- a/src/H5AC2.c +++ b/src/H5AC2.c @@ -2454,29 +2454,29 @@ done: * Modified code in support of revised cache API needed * to permit journaling. JRM - 10/18/07 * + * Removed file pointer parameter. QAK - 6/9/08 + * *------------------------------------------------------------------------- */ herr_t -H5AC2_unpin_entry(H5F_t * f, - void * thing) +H5AC2_unpin_entry(void * thing) { - herr_t result; - herr_t ret_value = SUCCEED; /* Return value */ #if H5AC2__TRACE_FILE_ENABLED char trace[128] = ""; FILE * trace_file_ptr = NULL; #endif /* H5AC2__TRACE_FILE_ENABLED */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5AC2_unpin_entry, FAIL) + /* Sanity check */ + HDassert(thing); + #if H5AC2__TRACE_FILE_ENABLED /* For the unpin entry call, only the addr is really necessary * in the trace file. Also write the result to catch occult errors. */ - if ( ( f != NULL ) && - ( f->shared != NULL ) && - ( f->shared->cache2 != NULL ) && - ( H5C2_get_trace_file_ptr(f->shared->cache2, &trace_file_ptr) >= 0) && + if ( ( H5C2_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && ( trace_file_ptr != NULL ) ) { sprintf(trace, "H5AC2_unpin_entry 0x%lx", @@ -2484,9 +2484,7 @@ H5AC2_unpin_entry(H5F_t * f, } #endif /* H5AC2__TRACE_FILE_ENABLED */ - result = H5C2_unpin_entry(f, thing); - - if ( result < 0 ) { + if ( H5C2_unpin_entry(thing) < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "H5C2_unpin_entry() failed.") } |