diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-06 13:32:07 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-06 13:32:07 (GMT) |
commit | 5b2226efc3156536e262a2b24c78386eacdf0b73 (patch) | |
tree | 95bf9ac2d46009fe1a981af1e0e3d9004010483b /src/H5AC.c | |
parent | 93170b425a30c328c3db0183d8870c6e535c9d7c (diff) | |
download | hdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.zip hdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.tar.gz hdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.tar.bz2 |
[svn-r18721] Description:
Bring r18720 from metadata journaling merging branch to trunk:
Bring changes from metadata journaling branch to 'merging' branch:
Rename H5[A]C_mark_pinned_or_protected_entry_dirty() to
H5[A]C_mark_entry_dirty() and get rid of H5[A]C_mark_pinned_entry_dirty().
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/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5AC.c')
-rw-r--r-- | src/H5AC.c | 90 |
1 files changed, 5 insertions, 85 deletions
@@ -1243,91 +1243,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5AC_mark_pinned_entry_dirty - * - * Purpose: Mark a pinned entry as dirty. The target entry MUST be - * be pinned, and MUST be unprotected. - * - * If the entry has changed size, the function updates - * data structures for the size change. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 4/11/06 - * - *------------------------------------------------------------------------- - */ -herr_t -H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size) -{ -#if H5AC__TRACE_FILE_ENABLED - char trace[128] = ""; - FILE * trace_file_ptr = NULL; -#endif /* H5AC__TRACE_FILE_ENABLED */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5AC_mark_pinned_entry_dirty, FAIL) - - /* Sanity check */ - HDassert(thing); - -#if H5AC__TRACE_FILE_ENABLED - /* For the mark pinned entry dirty call, only the addr, size_changed, - * and new_size are really necessary in the trace file. Write the result - * to catch occult errors. - */ - if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) && - (NULL != trace_file_ptr)) - sprintf(trace, "%s 0x%lx %d %d", FUNC, - (unsigned long)(((H5C_cache_entry_t *)thing)->addr), - (int)size_changed, - (int)new_size); -#endif /* H5AC__TRACE_FILE_ENABLED */ - -#ifdef H5_HAVE_PARALLEL -{ - H5AC_info_t *entry_ptr = (H5AC_info_t *)thing; - H5C_t *cache_ptr = entry_ptr->cache_ptr; - - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - - if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) { - /* Check for usage errors */ - if(!entry_ptr->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??") - if(entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??") - - if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, size_changed, new_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry") - } /* end if */ -} -#endif /* H5_HAVE_PARALLEL */ - - if(H5C_mark_pinned_entry_dirty(thing, size_changed, new_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned entry dirty") - -done: -#if H5AC__TRACE_FILE_ENABLED - if(trace_file_ptr) - HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value); -#endif /* H5AC__TRACE_FILE_ENABLED */ - - FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC_mark_pinned_entry_dirty() */ - - -/*------------------------------------------------------------------------- - * Function: H5AC_mark_pinned_or_protected_entry_dirty + * Function: H5AC_mark_entry_dirty * * Purpose: Mark a pinned or protected entry as dirty. The target * entry MUST be either pinned, protected, or both. * - * Unlike H5AC_mark_pinned_entry_dirty(), this function does - * not support size changes. - * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer @@ -1336,7 +1256,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5AC_mark_pinned_or_protected_entry_dirty(void *thing) +H5AC_mark_entry_dirty(void *thing) { #if H5AC__TRACE_FILE_ENABLED char trace[128] = ""; @@ -1344,7 +1264,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing) #endif /* H5AC__TRACE_FILE_ENABLED */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5AC_mark_pinned_or_protected_entry_dirty, FAIL) + FUNC_ENTER_NOAPI(H5AC_mark_entry_dirty, FAIL) /* Sanity check */ HDassert(thing); @@ -1376,7 +1296,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing) } #endif /* H5_HAVE_PARALLEL */ - if(H5C_mark_pinned_or_protected_entry_dirty(thing) < 0) + if(H5C_mark_entry_dirty(thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty") done: @@ -1386,7 +1306,7 @@ done: #endif /* H5AC__TRACE_FILE_ENABLED */ FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC_mark_pinned_or_protected_entry_dirty() */ +} /* H5AC_mark_entry_dirty() */ /*------------------------------------------------------------------------- |