summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5AC.c516
-rw-r--r--src/H5ACprivate.h30
-rw-r--r--src/H5B2hdr.c9
-rw-r--r--src/H5C.c402
-rw-r--r--src/H5Cprivate.h46
-rw-r--r--src/H5Dint.c6
-rw-r--r--src/H5Dlayout.c6
-rw-r--r--src/H5EA.c18
-rw-r--r--src/H5EAcache.c16
-rw-r--r--src/H5EAhdr.c19
-rw-r--r--src/H5EAint.c11
-rw-r--r--src/H5EApkg.h4
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5FAhdr.c20
-rw-r--r--src/H5FS.c14
-rw-r--r--src/H5FScache.c2
-rw-r--r--src/H5Fsuper.c8
-rw-r--r--src/H5Gnode.c4
-rw-r--r--src/H5Gobj.c4
-rw-r--r--src/H5Groot.c2
-rw-r--r--src/H5Gstab.c22
-rw-r--r--src/H5Gtest.c2
-rw-r--r--src/H5HFhdr.c6
-rw-r--r--src/H5HFiblock.c6
-rw-r--r--src/H5HL.c32
-rw-r--r--src/H5HLcache.c14
-rw-r--r--src/H5HLdbg.c2
-rw-r--r--src/H5HLint.c4
-rw-r--r--src/H5HLpkg.h2
-rw-r--r--src/H5HLprivate.h2
-rw-r--r--src/H5O.c11
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5Oefl.c6
-rw-r--r--src/H5Omessage.c4
-rw-r--r--src/H5Oprivate.h2
-rw-r--r--src/H5Ztrans.c8
-rw-r--r--test/cache.c3222
-rw-r--r--test/cache_api.c25
-rw-r--r--test/cache_common.c833
-rw-r--r--test/cache_common.h90
-rw-r--r--test/lheap.c4
-rw-r--r--testpar/t_cache.c83
42 files changed, 2786 insertions, 2735 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index e2e0364..9d41c14 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -154,8 +154,7 @@ static herr_t H5AC_log_deleted_entry(H5AC_t * cache_ptr,
haddr_t addr,
unsigned int flags);
-static herr_t H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
- H5C_cache_entry_t * entry_ptr,
+static herr_t H5AC_log_dirtied_entry(const H5C_cache_entry_t *entry_ptr,
haddr_t addr,
hbool_t size_changed,
size_t new_size);
@@ -190,7 +189,7 @@ static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
hid_t secondary_dxpl_id,
H5AC_t * cache_ptr);
-static herr_t H5AC_log_renamed_entry(H5AC_t * cache_ptr,
+static herr_t H5AC_log_renamed_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
@@ -744,25 +743,6 @@ done:
* matzke@llnl.gov
* Jul 9 1997
*
- * Modifications:
- *
- * Complete re-design and re-write to support the re-designed
- * metadata cache.
- * JRM - 5/12/04
- *
- * Abstracted the guts of the function to H5C_dest() in H5C.c,
- * and then re-wrote the function as a wrapper for H5C_dest().
- *
- * JRM - 6/7/04
- *
- * Added code to free the auxiliary structure and its
- * associated slist if present.
- * JRM - 6/28/05
- *
- * Added code to close the trace file if it is present.
- *
- * JRM - 6/8/06
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -796,7 +776,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
#endif /* H5_HAVE_PARALLEL */
/* Destroy the cache */
- if(H5C_dest(f, dxpl_id, H5AC_noblock_dxpl_id, f->shared->cache) < 0)
+ if(H5C_dest(f, dxpl_id, H5AC_noblock_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache")
f->shared->cache = NULL;
@@ -845,7 +825,6 @@ H5AC_expunge_entry(H5F_t *f,
unsigned flags)
{
herr_t result;
- H5AC_t * cache_ptr = NULL;
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
@@ -862,11 +841,13 @@ H5AC_expunge_entry(H5F_t *f,
HDassert(type->dest);
HDassert(H5F_addr_defined(addr));
- cache_ptr = f->shared->cache;
-
#if H5AC__TRACE_FILE_ENABLED
- /* For the expunge entry call, only the addr, and type id are really
- * necessary in the trace file. Write the return value to catch occult
+{
+ H5AC_t * cache_ptr = f->shared->cache;
+
+
+ /* For the expunge entry call, only the addr, and type id are really
+ * necessary in the trace file. Write the return value to catch occult
* errors.
*/
if ( ( cache_ptr != NULL ) &&
@@ -877,12 +858,12 @@ H5AC_expunge_entry(H5F_t *f,
(unsigned long)addr,
(int)(type->id));
}
+}
#endif /* H5AC__TRACE_FILE_ENABLED */
result = H5C_expunge_entry(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- cache_ptr,
type,
addr,
flags);
@@ -960,7 +941,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id)
#endif /* H5_HAVE_PARALLEL */
/* Flush the cache */
- if(H5C_flush_cache(f, dxpl_id, H5AC_noblock_dxpl_id, f->shared->cache, H5AC__NO_FLAGS_SET) < 0)
+ if(H5C_flush_cache(f, dxpl_id, H5AC_noblock_dxpl_id, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache.")
done:
@@ -998,14 +979,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_get_entry_status(H5F_t * f,
+H5AC_get_entry_status(const H5F_t *f,
haddr_t addr,
unsigned * status_ptr)
{
H5C_t *cache_ptr = f->shared->cache;
- herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
hbool_t in_cache;
hbool_t is_dirty;
@@ -1015,6 +994,7 @@ H5AC_get_entry_status(H5F_t * f,
hbool_t is_flush_dep_parent;
size_t entry_size;
unsigned status = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_get_entry_status, FAIL)
@@ -1026,7 +1006,7 @@ H5AC_get_entry_status(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
}
- result = H5C_get_entry_status(cache_ptr, addr, &entry_size, &in_cache,
+ result = H5C_get_entry_status(f, addr, &entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned, &is_flush_dep_parent,
&is_flush_dep_child);
@@ -1135,7 +1115,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
{
herr_t result;
H5AC_info_t *info;
- H5AC_t *cache;
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
@@ -1182,7 +1161,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#endif /* H5AC__TRACE_FILE_ENABLED */
/* Get local copy of this information */
- cache = f->shared->cache;
info = (H5AC_info_t *)thing;
info->addr = addr;
@@ -1209,7 +1187,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
result = H5C_insert_entry(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- cache,
type,
addr,
thing,
@@ -1274,109 +1251,66 @@ done:
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
- * Added trace file support. JRM -- 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_entry_dirty(H5F_t * f,
- void * thing,
- hbool_t size_changed,
- size_t new_size)
+H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#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 ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_mark_pinned_entry_dirty 0x%lx %d %d",
+ 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 );
- HDassert( thing );
-
- if ( ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- H5AC_info_t * entry_ptr;
-
- HDassert( ( size_changed == TRUE ) || ( size_changed == FALSE ) );
-
- entry_ptr = (H5AC_info_t *)thing;
-
- 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??")
- }
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- entry_ptr,
- entry_ptr->addr,
- size_changed,
- new_size);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( result < 0 ) {
+ 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??")
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ 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 */
- result = H5C_mark_pinned_entry_dirty(cache_ptr,
- thing,
- size_changed,
- new_size);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5C_mark_pinned_entry_dirty() failed.")
-
- }
+ 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 != NULL ) {
-
+ 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() */
@@ -1394,92 +1328,59 @@ done:
* Programmer: John Mainzer
* 5/16/06
*
- * Modifications:
- *
- * Added trace file support. JRM -- 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_or_protected_entry_dirty(H5F_t * f,
- void * thing)
+H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
{
- H5C_t * cache_ptr = f->shared->cache;
-#ifdef H5_HAVE_PARALLEL
- H5AC_info_t * info_ptr;
-#endif /* H5_HAVE_PARALLEL */
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#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_or_protected_entry_dirty, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the mark pinned or protected entry dirty call, only the addr
* is really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_mark_pinned_or_protected_entry_dirty %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#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 );
- HDassert( thing );
-
- info_ptr = (H5AC_info_t *)thing;
-
- if ( ( info_ptr->is_dirty == FALSE ) &&
- ( ! ( info_ptr->is_protected ) ) &&
- ( info_ptr->is_pinned ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- info_ptr,
- info_ptr->addr,
- FALSE,
- 0);
-
- if ( result < 0 ) {
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ if((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) &&
+ (entry_ptr->is_pinned) && (NULL != cache_ptr->aux_ptr)) {
+ if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, FALSE, 0) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5C_mark_pinned_entry_dirty() failed.")
-
- }
+ if(H5C_mark_pinned_or_protected_entry_dirty(thing) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ 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_or_protected_entry_dirty() */
@@ -1570,16 +1471,8 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
#ifdef H5_HAVE_PARALLEL
if ( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) {
-
- result = H5AC_log_renamed_entry(f->shared->cache,
- old_addr,
- new_addr);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_log_renamed_entry() failed.")
- }
+ if(H5AC_log_renamed_entry(f, old_addr, new_addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log renamed entry")
}
#endif /* H5_HAVE_PARALLEL */
@@ -1635,60 +1528,42 @@ done:
* Programmer: John Mainzer
* 4/27/06
*
- * Modifications:
- *
- * Added trace file support. 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_pin_protected_entry(H5F_t * f,
- void * thing)
+H5AC_pin_protected_entry(void *thing)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#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_pin_protected_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the pin protected 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->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_pin_protected_entry %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
- result = H5C_pin_protected_entry(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, \
- "H5C_pin_protected_entry() failed.")
- }
+ if(H5C_pin_protected_entry(thing) < 0 )
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ 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_pin_protected_entry() */
@@ -1706,9 +1581,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_create_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing)
+H5AC_create_flush_dependency(void * parent_thing, void * child_thing)
{
- H5C_t *cache_ptr = f->shared->cache;
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
@@ -1718,13 +1592,12 @@ H5AC_create_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing)
FUNC_ENTER_NOAPI(H5AC_create_flush_dependency, FAIL)
/* Sanity check */
- HDassert(cache_ptr);
HDassert(parent_thing);
HDassert(child_thing);
#if H5AC__TRACE_FILE_ENABLED
- if ( ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
+ if((H5C_get_trace_file_ptr_from_entry(parent_thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
sprintf(trace, "%s %lx %lx",
FUNC,
(unsigned long)(((H5C_cache_entry_t *)parent_thing)->addr),
@@ -1732,7 +1605,7 @@ H5AC_create_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing)
} /* end if */
#endif /* H5AC__TRACE_FILE_ENABLED */
- if(H5C_create_flush_dependency(cache_ptr, parent_thing, child_thing) < 0)
+ if(H5C_create_flush_dependency(parent_thing, child_thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "H5C_create_flush_dependency() failed.")
done:
@@ -1891,7 +1764,6 @@ H5AC_protect(H5F_t *f,
thing = H5C_protect(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
type,
addr,
udata1,
@@ -1941,104 +1813,65 @@ done:
* Programmer: John Mainzer
* 7/5/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_resize_pinned_entry(H5F_t * f,
- void * thing,
- size_t new_size)
+H5AC_resize_pinned_entry(void *thing, size_t new_size)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#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_resize_pinned_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the resize pinned entry call, only the addr, and new_size are
* really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_resize_pinned_entry 0x%lx %d",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s 0x%lx %d", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
(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 );
- HDassert( thing );
-
- if ( ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- H5AC_info_t * entry_ptr;
-
- entry_ptr = (H5AC_info_t *)thing;
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry is protected??")
- }
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- entry_ptr,
- entry_ptr->addr,
- TRUE,
- new_size);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( result < 0 ) {
+ if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
+ /* Check for usage errors */
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry is protected??")
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, TRUE, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_resize_pinned_entry(cache_ptr,
- thing,
- new_size);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "H5C_resize_pinned_entry() failed.")
-
- }
+ if(H5C_resize_pinned_entry(thing, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ 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_resize_pinned_entry() */
@@ -2053,59 +1886,42 @@ done:
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
- * Added code supporting the trace file. JRM -- 6/7/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_unpin_entry(H5F_t * f,
- void * thing)
+H5AC_unpin_entry(void * thing)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#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_unpin_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__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->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_unpin_entry %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
- result = H5C_unpin_entry(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "H5C_unpin_entry() failed.")
- }
+ if(H5C_unpin_entry(thing) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ 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_unpin_entry() */
@@ -2122,9 +1938,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_destroy_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing)
+H5AC_destroy_flush_dependency(void * parent_thing, void * child_thing)
{
- H5C_t *cache_ptr = f->shared->cache;
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
@@ -2134,13 +1949,12 @@ H5AC_destroy_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing
FUNC_ENTER_NOAPI(H5AC_destroy_flush_dependency, FAIL)
/* Sanity check */
- HDassert(cache_ptr);
HDassert(parent_thing);
HDassert(child_thing);
#if H5AC__TRACE_FILE_ENABLED
- if ( ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
+ if((H5C_get_trace_file_ptr_from_entry(parent_thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
sprintf(trace, "%s %lx",
FUNC,
(unsigned long)(((H5C_cache_entry_t *)parent_thing)->addr),
@@ -2148,7 +1962,7 @@ H5AC_destroy_flush_dependency(H5F_t * f, void * parent_thing, void * child_thing
} /* end if */
#endif /* H5AC__TRACE_FILE_ENABLED */
- if(H5C_destroy_flush_dependency(cache_ptr, parent_thing, child_thing) < 0)
+ if(H5C_destroy_flush_dependency(parent_thing, child_thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "H5C_destroy_flush_dependency() failed.")
done:
@@ -2331,18 +2145,8 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#ifdef H5_HAVE_PARALLEL
if ( ( dirtied ) && ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) ) {
-
- result = H5AC_log_dirtied_entry(f->shared->cache,
- (H5AC_info_t *)thing,
- addr,
- size_changed,
- new_size);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
+ if(H5AC_log_dirtied_entry((H5AC_info_t *)thing, addr, size_changed, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry")
}
if ( ( (flags & H5C__DELETED_FLAG) != 0 ) &&
@@ -2365,7 +2169,6 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
result = H5C_unprotect(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
type,
addr,
thing,
@@ -2541,7 +2344,7 @@ done:
*/
herr_t
-H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
H5AC_cache_config_t *config_ptr)
{
herr_t result;
@@ -2573,7 +2376,7 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
}
- result = H5C_get_cache_auto_resize_config((H5C_t *)cache_ptr,
+ result = H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr,
&internal_config);
if ( result < 0 ) {
@@ -2582,7 +2385,7 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
"H5C_get_cache_auto_resize_config() failed.")
}
- result = H5C_get_evictions_enabled((H5C_t *)cache_ptr, &evictions_enabled);
+ result = H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled);
if ( result < 0 ) {
@@ -2818,10 +2621,9 @@ done:
*/
herr_t
-H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr)
{
- /* const char * fcn_name = "H5AC_set_cache_auto_resize_config"; */
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
H5C_auto_size_ctl_t internal_config;
@@ -2832,6 +2634,8 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
FUNC_ENTER_NOAPI(H5AC_set_cache_auto_resize_config, FAIL)
+ HDassert( cache_ptr );
+
#if H5AC__TRACE_FILE_ENABLED
/* Make note of the new configuration. Don't look up the trace file
* pointer, as that may change before we use it.
@@ -2922,30 +2726,14 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
}
}
- if ( H5AC_ext_config_2_int_config(config_ptr, &internal_config) !=
- SUCCEED ) {
+ if(H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_ext_config_2_int_config() failed.")
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_ext_config_2_int_config() failed.")
- }
+ if(H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed.")
- result = H5C_set_cache_auto_resize_config((H5C_t *)cache_ptr,
- &internal_config);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_cache_auto_resize_config() failed.")
- }
-
-
- result = H5C_set_evictions_enabled((H5C_t *)cache_ptr,
- config_ptr->evictions_enabled);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_evictions_enabled() failed.")
- }
+ if(H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed.")
#ifdef H5_HAVE_PARALLEL
if ( cache_ptr->aux_ptr != NULL ) {
@@ -3817,26 +3605,28 @@ done:
*
* Programmer: John Mainzer, 6/29/05
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr,
+H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
haddr_t addr,
hbool_t size_changed,
size_t new_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
size_t entry_size;
- H5AC_aux_t * aux_ptr = NULL;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
+ H5AC_t * cache_ptr;
+ H5AC_aux_t * aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_log_dirtied_entry, FAIL)
+ HDassert( entry_ptr != NULL );
+ HDassert( entry_ptr->addr == addr );
+ HDassert( entry_ptr->is_dirty == FALSE );
+
+ cache_ptr = entry_ptr->cache_ptr;
+
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3845,10 +3635,6 @@ H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
HDassert( aux_ptr != NULL );
HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( entry_ptr != NULL );
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->is_dirty == FALSE );
-
if ( size_changed ) {
entry_size = new_size;
@@ -3859,6 +3645,7 @@ H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
}
if ( aux_ptr->mpi_rank == 0 ) {
+ H5AC_slist_entry_t * slist_entry_ptr;
HDassert( aux_ptr->d_slist_ptr != NULL );
HDassert( aux_ptr->c_slist_ptr != NULL );
@@ -4266,10 +4053,11 @@ done:
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_renamed_entry(H5AC_t * cache_ptr,
+H5AC_log_renamed_entry(const H5F_t *f,
haddr_t old_addr,
haddr_t new_addr)
{
+ H5AC_t * cache_ptr;
herr_t ret_value = SUCCEED; /* Return value */
hbool_t entry_in_cache;
hbool_t entry_dirty;
@@ -4279,7 +4067,12 @@ H5AC_log_renamed_entry(H5AC_t * cache_ptr,
FUNC_ENTER_NOAPI(H5AC_log_renamed_entry, FAIL)
- HDassert( cache_ptr != NULL );
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = (H5AC_t *)f->shared->cache;
+
+ HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
aux_ptr = cache_ptr->aux_ptr;
@@ -4288,7 +4081,7 @@ H5AC_log_renamed_entry(H5AC_t * cache_ptr,
HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
/* get entry status, size, etc here */
- if ( H5C_get_entry_status(cache_ptr, old_addr, &entry_size, &entry_in_cache,
+ if ( H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache,
&entry_dirty, NULL, NULL, NULL, NULL) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.")
@@ -4800,7 +4593,6 @@ H5AC_flush_entries(H5F_t *f)
status = H5C_flush_cache(f,
H5AC_noblock_dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
H5AC__NO_FLAGS_SET);
aux_ptr->write_permitted = FALSE;
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index cdb547e..85ff692 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -324,33 +324,25 @@ extern hid_t H5AC_ind_dxpl_id;
H5_DLL herr_t H5AC_init(void);
H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC_get_entry_status(H5F_t * f, haddr_t addr,
+H5_DLL herr_t H5AC_get_entry_status(const H5F_t * f, haddr_t addr,
unsigned * status_ptr);
H5_DLL herr_t H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
haddr_t addr, void *thing, unsigned int flags);
-H5_DLL herr_t H5AC_pin_protected_entry(H5F_t * f, void * thing);
-H5_DLL herr_t H5AC_create_flush_dependency(H5F_t *f, void *parent_thing,
- void *child_thing);
+H5_DLL herr_t H5AC_pin_protected_entry(void *thing);
+H5_DLL herr_t H5AC_create_flush_dependency(void *parent_thing, void *child_thing);
H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
haddr_t addr, const void *udata1, void *udata2,
H5AC_protect_t rw);
-H5_DLL herr_t H5AC_resize_pinned_entry(H5F_t * f,
- void * thing,
- size_t new_size);
-H5_DLL herr_t H5AC_unpin_entry(H5F_t * f,
- void * thing);
-H5_DLL herr_t H5AC_destroy_flush_dependency(H5F_t *f, void *parent_thing,
- void *child_thing);
+H5_DLL herr_t H5AC_resize_pinned_entry(void *thing, size_t new_size);
+H5_DLL herr_t H5AC_unpin_entry(void *thing);
+H5_DLL herr_t H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing);
H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
const H5AC_class_t *type, haddr_t addr,
void *thing, unsigned flags);
H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5AC_mark_pinned_entry_dirty(H5F_t * f,
- void * thing,
- hbool_t size_changed,
- size_t new_size);
-H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(H5F_t * f,
- void * thing);
+H5_DLL herr_t H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed,
+ size_t new_size);
+H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
haddr_t old_addr, haddr_t new_addr);
@@ -364,7 +356,7 @@ H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
void (* write_done)(void));
H5_DLL herr_t H5AC_stats(const H5F_t *f);
-H5_DLL herr_t H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_get_cache_size(H5AC_t * cache_ptr,
@@ -378,7 +370,7 @@ H5_DLL herr_t H5AC_get_cache_hit_rate(H5AC_t * cache_ptr,
H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr);
-H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t * config_ptr);
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index f1d5d84..696eb89 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -350,11 +350,10 @@ H5B2_hdr_incr(H5B2_hdr_t *hdr)
/* Sanity checks */
HDassert(hdr);
- HDassert(hdr->f);
/* Mark header as un-evictable when a B-tree node is depending on it */
if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr->f, hdr) < 0)
+ if(H5AC_pin_protected_entry(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTPIN, FAIL, "unable to pin v2 B-tree header")
/* Increment reference count on B-tree header */
@@ -387,7 +386,6 @@ H5B2_hdr_decr(H5B2_hdr_t *hdr)
/* Sanity check */
HDassert(hdr);
- HDassert(hdr->f);
HDassert(hdr->rc > 0);
/* Decrement reference count on B-tree header */
@@ -395,7 +393,7 @@ H5B2_hdr_decr(H5B2_hdr_t *hdr)
/* Mark header as evictable again when no nodes depend on it */
if(hdr->rc == 0)
- if(H5AC_unpin_entry(hdr->f, hdr) < 0)
+ if(H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin v2 B-tree header")
done:
@@ -482,10 +480,9 @@ H5B2_hdr_dirty(H5B2_hdr_t *hdr)
/* Sanity check */
HDassert(hdr);
- HDassert(hdr->f);
/* Mark B-tree header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr->f, hdr) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark v2 B-tree header as dirty")
done:
diff --git a/src/H5C.c b/src/H5C.c
index d40cd62..d8688b2 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -3439,9 +3439,9 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
herr_t
H5C_dest(H5F_t * f,
hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr)
+ hid_t secondary_dxpl_id)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_dest, FAIL)
@@ -3463,7 +3463,7 @@ H5C_dest(H5F_t * f,
cache_ptr->magic = 0;
- (void)H5FL_FREE(H5C_t, cache_ptr);
+ cache_ptr = H5FL_FREE(H5C_t, cache_ptr);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3489,32 +3489,33 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_expunge_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
unsigned flags)
{
+ H5C_t * cache_ptr;
herr_t result;
hbool_t first_flush = TRUE;
- hbool_t free_file_space;
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_expunge_entry, FAIL)
- free_file_space = ( (flags & H5C__FREE_FILE_SPACE_FLAG) != 0 );
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
- HDassert( H5F_addr_defined(addr) );
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( type );
HDassert( type->clear );
HDassert( type->dest );
+ HDassert( H5F_addr_defined(addr) );
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
@@ -3548,15 +3549,12 @@ H5C_expunge_entry(H5F_t * f,
}
/* Pass along 'free file space' flag to cache client */
-
- entry_ptr->free_file_space_on_destroy = free_file_space;
-
+ entry_ptr->free_file_space_on_destroy = ( (flags & H5C__FREE_FILE_SPACE_FLAG) != 0 );
/* If we get this far, call H5C_flush_single_entry() with the
* H5C__FLUSH_INVALIDATE_FLAG and the H5C__FLUSH_CLEAR_ONLY_FLAG.
* This will clear the entry, and then delete it from the cache.
*/
-
result = H5C_flush_single_entry(f,
primary_dxpl_id,
secondary_dxpl_id,
@@ -3690,9 +3688,9 @@ herr_t
H5C_flush_cache(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
unsigned flags)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t status;
herr_t ret_value = SUCCEED;
hbool_t destroy;
@@ -4244,8 +4242,7 @@ H5C_flush_to_min_clean(H5F_t * f,
/* Flush the marked entries */
result = H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
- cache_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG |
- H5C__FLUSH_IGNORE_PROTECTED_FLAG);
+ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG);
if ( result < 0 ) {
@@ -4301,7 +4298,7 @@ done:
*/
herr_t
-H5C_get_cache_auto_resize_config(H5C_t * cache_ptr,
+H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -4483,7 +4480,7 @@ done:
*/
herr_t
-H5C_get_entry_status(H5C_t * cache_ptr,
+H5C_get_entry_status(const H5F_t *f,
haddr_t addr,
size_t * size_ptr,
hbool_t * in_cache_ptr,
@@ -4493,11 +4490,17 @@ H5C_get_entry_status(H5C_t * cache_ptr,
hbool_t * is_flush_dep_parent_ptr,
hbool_t * is_flush_dep_child_ptr)
{
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_get_entry_status, FAIL)
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( H5F_addr_defined(addr) );
@@ -4581,7 +4584,7 @@ done:
*/
herr_t
-H5C_get_evictions_enabled(H5C_t * cache_ptr,
+H5C_get_evictions_enabled(const H5C_t * cache_ptr,
hbool_t * evictions_enabled_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -4622,38 +4625,55 @@ done:
* Programmer: John Mainzer
* 1/20/06
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_get_trace_file_ptr(H5C_t * cache_ptr,
- FILE ** trace_file_ptr_ptr)
+H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr)
- FUNC_ENTER_NOAPI(H5C_get_trace_file_ptr, FAIL)
-
- /* This would normally be an assert, but we need to use an HGOTO_ERROR
- * call to shut up the compiler.
- */
- if ( ( ! cache_ptr ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ /* Sanity checks */
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(trace_file_ptr_ptr);
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr")
- }
+ *trace_file_ptr_ptr = cache_ptr->trace_file_ptr;
- if ( trace_file_ptr_ptr == NULL ) {
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5C_get_trace_file_ptr() */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL trace_file_ptr_ptr")
- }
+
+/*-------------------------------------------------------------------------
+ * Function: H5C_get_trace_file_ptr_from_entry
+ *
+ * Purpose: Get the trace_file_ptr field from the cache, via an entry.
+ *
+ * This field will either be NULL (which indicates that trace
+ * file logging is turned off), or contain a pointer to the
+ * open file to which trace file data is to be written.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 6/9/08
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
+ FILE **trace_file_ptr_ptr)
+{
+ FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr_from_entry)
- *trace_file_ptr_ptr = cache_ptr->trace_file_ptr;
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->cache_ptr);
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ /* Go get the trace file pointer for the cache */
+ H5C_get_trace_file_ptr(entry_ptr->cache_ptr, trace_file_ptr_ptr);
-} /* H5C_get_trace_file_ptr() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5C_get_trace_file_ptr_from_entry() */
/*-------------------------------------------------------------------------
@@ -4768,12 +4788,12 @@ herr_t
H5C_insert_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
unsigned int flags)
{
+ H5C_t * cache_ptr;
herr_t result;
hbool_t first_flush = TRUE;
hbool_t insert_pinned;
@@ -4787,6 +4807,11 @@ H5C_insert_entry(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_insert_entry, FAIL)
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -4839,6 +4864,7 @@ H5C_insert_entry(H5F_t * f,
#ifndef NDEBUG
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = cache_ptr;
entry_ptr->addr = addr;
entry_ptr->type = type;
@@ -5372,59 +5398,31 @@ done:
* Programmer: John Mainzer
* 3/22/06
*
- * Modifications:
- *
- * Added code to do a flash cache size increase if
- * appropriate.
- * JRM -- 1/11/08
- *
- *
- * Added code to update the clean_index_size and
- * dirty_index_size fields of H5C_t in cases where the
- * the entry was clean on protect, was marked dirty in
- * this call, and did not change its size. Do this via
- * a call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY().
- *
- * If the size changed, this case is already dealt with by
- * by the pre-existing call to
- * H5C__UPDATE_INDEX_FOR_SIZE_CHANGE().
- *
- * JRM -- 11/5/08
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
- void * thing,
- hbool_t size_changed,
- size_t new_size)
+H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
- herr_t result;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
hbool_t was_clean;
size_t size_increase;
- H5C_cache_entry_t * entry_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_mark_pinned_entry_dirty, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
- HDassert( ( size_changed == TRUE ) || ( size_changed == FALSE ) );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry is protected??")
- }
+ /* 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??")
/* make note of whether the entry was dirty to begin with */
was_clean = ! ( entry_ptr->is_dirty );
@@ -5443,17 +5441,9 @@ H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
size_increase = new_size - entry_ptr->size;
if ( size_increase >=
- cache_ptr->flash_size_increase_threshold ) {
-
- result = H5C__flash_increase_cache_size(cache_ptr,
- entry_ptr->size,
- new_size);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5C__flash_increase_cache_size failed.")
- }
+ cache_ptr->flash_size_increase_threshold ) {
+ if(H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
}
}
}
@@ -5494,9 +5484,7 @@ H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_mark_pinned_entry_dirty() */
@@ -5521,16 +5509,6 @@ done:
* Programmer: John Mainzer
* 5/15/06
*
- * Modifications:
- *
- * JRM -- 3/29/07
- * Added sanity check to verify that the pinned entry
- * is not protected read only.
- *
- * This sanity check is commented out for now -- uncomment
- * it once we deal with the problem of entries being protected
- * read only, and then dirtied.
- *
* JRM -- 11/5/08
* Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
* update the new clean_index_size and dirty_index_size
@@ -5540,20 +5518,20 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- void * thing)
+H5C_mark_pinned_or_protected_entry_dirty(void *thing)
{
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- hbool_t was_pinned_unprotected_and_clean;
- H5C_cache_entry_t * entry_ptr;
FUNC_ENTER_NOAPI(H5C_mark_pinned_or_protected_entry_dirty, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if ( entry_ptr->is_protected ) {
#if 0 /* JRM - uncomment this when possible */
@@ -5563,6 +5541,7 @@ H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
entry_ptr->dirtied = TRUE;
} else if ( entry_ptr->is_pinned ) {
+ hbool_t was_pinned_unprotected_and_clean;
was_pinned_unprotected_and_clean = ! ( entry_ptr->is_dirty );
@@ -5588,9 +5567,7 @@ H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
}
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_mark_pinned_or_protected_entry_dirty() */
@@ -5810,64 +5787,33 @@ done:
* Programmer: John Mainzer
* 7/5/06
*
- * Modifications:
- *
- * Added code to apply a flash cache size increment if
- * appropriate.
- * JRM -- 1/11/08
- *
- * Added code to update the clean_index_size and
- * dirty_index_size fields of H5C_t in cases where the
- * the entry was clean prior to this call, was marked dirty,
- * and did not change its size. Do this via a call to
- * H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY().
- *
- * If the size changed, this case is already dealt with by
- * by the pre-existing call to
- * H5C__UPDATE_INDEX_FOR_SIZE_CHANGE().
- *
- * JRM -- 11/5/08
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_resize_pinned_entry(H5C_t * cache_ptr,
- void * thing,
- size_t new_size)
+H5C_resize_pinned_entry(void *thing, size_t new_size)
{
- /* const char * fcn_name = "H5C_resize_pinned_entry()"; */
- herr_t ret_value = SUCCEED; /* Return value */
- herr_t result;
- hbool_t was_clean;
- H5C_cache_entry_t * entry_ptr;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
size_t size_increase;
+ hbool_t was_clean;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_resize_pinned_entry, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
-
- if ( new_size <= 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "New size is non-positive.")
- }
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry is protected??")
- }
+ /* Check for usage errors */
+ if(new_size <= 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "New size is non-positive.")
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry is protected??")
/* make note of whether the entry was clean to begin with */
was_clean = ! ( entry_ptr->is_dirty );
@@ -5890,15 +5836,11 @@ H5C_resize_pinned_entry(H5C_t * cache_ptr,
if ( size_increase >=
cache_ptr->flash_size_increase_threshold ) {
- result = H5C__flash_increase_cache_size(cache_ptr,
- entry_ptr->size,
- new_size);
-
- if ( result < 0 ) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5C__flash_increase_cache_size failed.")
- }
+ if(H5C__flash_increase_cache_size(cache_ptr,
+ entry_ptr->size,
+ new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
}
}
}
@@ -5940,9 +5882,7 @@ H5C_resize_pinned_entry(H5C_t * cache_ptr,
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_resize_pinned_entry() */
@@ -6007,38 +5947,23 @@ done:
* Programmer: John Mainzer
* 4/26/06
*
- * Modifications:
- *
- * JRM -- 4/26/06
- * Modified routine to allow it to operate on protected
- * entries.
- *
- * JRM -- 2/16/07
- * Added conditional compile to avoid unused parameter
- * warning in production compile.
- *
- * JRM -- 4/4/07
- * Fixed typo -- canged macro call to
- * H5C__UPDATE_STATS_FOR_UNPIN to call to
- * H5C__UPDATE_STATS_FOR_PIN.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_pin_protected_entry(H5C_t * cache_ptr,
- void * thing)
+H5C_pin_protected_entry(void *thing)
{
- H5C_cache_entry_t * entry_ptr; /* Pointer to entry to pin */
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing; /* Pointer to entry to pin */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_pin_protected_entry, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
- entry_ptr = (H5C_cache_entry_t *)thing;
- HDassert( entry_ptr );
- HDassert( H5F_addr_defined(entry_ptr->addr) );
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Only protected entries can be pinned */
if(!entry_ptr->is_protected)
@@ -6160,7 +6085,6 @@ void *
H5C_protect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
const void * udata1,
@@ -6168,6 +6092,7 @@ H5C_protect(H5F_t * f,
unsigned flags)
{
/* const char * fcn_name = "H5C_protect()"; */
+ H5C_t * cache_ptr;
hbool_t hit;
hbool_t first_flush;
hbool_t have_write_permitted = FALSE;
@@ -6182,6 +6107,9 @@ H5C_protect(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_protect, NULL)
/* check args */
+ HDassert( f );
+ HDassert( f->shared );
+ cache_ptr = f->shared->cache;
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -6609,14 +6537,13 @@ done:
*/
herr_t
-H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
+H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
- /* const char *fcn_name = "H5C_set_cache_auto_resize_config()"; */
- herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
size_t new_max_cache_size;
size_t new_min_clean_size;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_set_cache_auto_resize_config, FAIL)
@@ -6892,7 +6819,7 @@ done:
*/
herr_t
-H5C_set_evictions_enabled(H5C_t * cache_ptr,
+H5C_set_evictions_enabled(H5C_t *cache_ptr,
hbool_t evictions_enabled)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -7756,20 +7683,19 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_unpin_entry(H5C_t * cache_ptr,
- void * thing)
+H5C_unpin_entry(void *thing)
{
- H5C_cache_entry_t * entry_ptr; /* Pointer to entry to unpin */
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing; /* Pointer to entry to unpin */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_unpin_entry, FAIL)
- /* Sanity checking */
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
- entry_ptr = (H5C_cache_entry_t *)thing;
- HDassert( entry_ptr );
+ /* Sanity check */
+ HDassert(entry_ptr);
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
/* Unpin the entry */
if(H5C_unpin_entry_from_client(cache_ptr, entry_ptr, TRUE) < 0)
@@ -7900,13 +7826,13 @@ herr_t
H5C_unprotect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
unsigned int flags,
size_t new_size)
{
+ H5C_t * cache_ptr;
hbool_t deleted;
hbool_t dirtied;
hbool_t set_flush_marker;
@@ -7942,6 +7868,11 @@ H5C_unprotect(H5F_t * f,
dirtied |= size_changed;
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -8665,16 +8596,10 @@ H5C_adjust_flush_dependency_rc(H5C_cache_entry_t * cache_entry,
*
*-------------------------------------------------------------------------
*/
-#ifndef NDEBUG
-herr_t
-H5C_create_flush_dependency(H5C_t * cache_ptr, void * parent_thing,
- void * child_thing)
-#else
herr_t
-H5C_create_flush_dependency(H5C_t UNUSED * cache_ptr, void * parent_thing,
- void * child_thing)
-#endif
+H5C_create_flush_dependency(void * parent_thing, void * child_thing)
{
+ H5C_t * cache_ptr;
H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */
#ifndef NDEBUG
@@ -8685,8 +8610,6 @@ H5C_create_flush_dependency(H5C_t UNUSED * cache_ptr, void * parent_thing,
FUNC_ENTER_NOAPI(H5C_create_flush_dependency, FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(parent_entry);
HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(parent_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
@@ -8695,6 +8618,10 @@ H5C_create_flush_dependency(H5C_t UNUSED * cache_ptr, void * parent_thing,
HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(H5F_addr_defined(child_entry->addr));
HDassert(child_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
+ cache_ptr = parent_entry->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr == child_entry->cache_ptr);
/* More sanity checks */
if(child_entry == parent_entry)
@@ -8783,9 +8710,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_destroy_flush_dependency(H5C_t * cache_ptr, void *parent_thing,
- void * child_thing)
+H5C_destroy_flush_dependency(void *parent_thing, void * child_thing)
{
+ H5C_t * cache_ptr;
H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
#ifndef NDEBUG
@@ -8796,8 +8723,6 @@ H5C_destroy_flush_dependency(H5C_t * cache_ptr, void *parent_thing,
FUNC_ENTER_NOAPI(H5C_destroy_flush_dependency, FAIL)
/* Sanity checks */
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(parent_entry);
HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(H5F_addr_defined(parent_entry->addr));
@@ -8806,6 +8731,10 @@ H5C_destroy_flush_dependency(H5C_t * cache_ptr, void *parent_thing,
HDassert(child_entry->flush_dep_parent != child_entry);
HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(H5F_addr_defined(child_entry->addr));
+ cache_ptr = parent_entry->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr == child_entry->cache_ptr);
/* Usage checks */
if(!parent_entry->is_pinned)
@@ -11170,17 +11099,18 @@ H5C_flush_single_entry(H5F_t * f,
/* Clear the dirty flag only, if requested */
if ( clear_only ) {
-#ifndef NDEBUG
if ( destroy ) {
- /* we are about to call the clear callback with the
+#ifndef NDEBUG
+ /* we are about to call the clear callback with the
* destroy flag set -- this will result in *entry_ptr
* being freed. Set the magic field to bad magic
* so we can detect a freed cache entry if we see
* one.
*/
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
- }
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = NULL;
+ }
/* Call the callback routine to clear all dirty flags for object */
if ( (entry_ptr->type->clear)(f, entry_ptr, destroy_entry) < 0 ) {
@@ -11198,17 +11128,18 @@ H5C_flush_single_entry(H5F_t * f,
}
#endif /* H5C_DO_SANITY_CHECKS */
-#ifndef NDEBUG
if ( destroy ) {
- /* we are about to call the flush callback with the
+#ifndef NDEBUG
+ /* we are about to call the flush callback with the
* destroy flag set -- this will result in *entry_ptr
* being freed. Set the magic field to bad magic
* so we can detect a freed cache entry if we see
* one.
*/
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
- }
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = NULL;
+ }
/* Only block for all the processes on the first piece of metadata
*/
@@ -11491,6 +11422,7 @@ H5C_load_entry(H5F_t * f,
#ifndef NDEBUG
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = f->shared->cache;
entry_ptr->addr = addr;
entry_ptr->type = type;
entry_ptr->is_protected = FALSE;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 5c7fe9f..dc8d7b1 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -535,6 +535,7 @@ typedef struct H5C_cache_entry_t
#ifndef NDEBUG
uint32_t magic;
#endif /* NDEBUG */
+ H5C_t * cache_ptr;
haddr_t addr;
size_t size;
const H5C_class_t * type;
@@ -1023,13 +1024,11 @@ H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
H5_DLL herr_t H5C_dest(H5F_t * f,
hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr);
+ hid_t secondary_dxpl_id);
H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
unsigned flags);
@@ -1037,7 +1036,6 @@ H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
H5_DLL herr_t H5C_flush_cache(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
unsigned flags);
H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
@@ -1045,7 +1043,7 @@ H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
hid_t secondary_dxpl_id,
H5C_t * cache_ptr);
-H5_DLL herr_t H5C_get_cache_auto_resize_config(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
@@ -1057,7 +1055,7 @@ H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
H5_DLL herr_t H5C_get_cache_hit_rate(H5C_t * cache_ptr,
double * hit_rate_ptr);
-H5_DLL herr_t H5C_get_entry_status(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_get_entry_status(const H5F_t *f,
haddr_t addr,
size_t * size_ptr,
hbool_t * in_cache_ptr,
@@ -1067,16 +1065,17 @@ H5_DLL herr_t H5C_get_entry_status(H5C_t * cache_ptr,
hbool_t * is_flush_dep_parent_ptr,
hbool_t * is_flush_dep_child_ptr);
-H5_DLL herr_t H5C_get_evictions_enabled(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t * cache_ptr,
hbool_t * evictions_enabled_ptr);
-H5_DLL herr_t H5C_get_trace_file_ptr(H5C_t * cache_ptr,
- FILE ** trace_file_ptr_ptr);
+H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr,
+ FILE **trace_file_ptr_ptr);
+H5_DLL herr_t H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
+ FILE **trace_file_ptr_ptr);
H5_DLL herr_t H5C_insert_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
@@ -1089,29 +1088,24 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t * f,
int32_t ce_array_len,
haddr_t * ce_array_ptr);
-H5_DLL herr_t H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
- void * thing,
+H5_DLL herr_t H5C_mark_pinned_entry_dirty(void * thing,
hbool_t size_changed,
size_t new_size);
-H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- void * thing);
+H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5C_rename_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t old_addr,
haddr_t new_addr);
-H5_DLL herr_t H5C_pin_protected_entry(H5C_t * cache_ptr,
- void * thing);
+H5_DLL herr_t H5C_pin_protected_entry(void *thing);
-H5_DLL herr_t H5C_create_flush_dependency(H5C_t *cache_ptr, void *parent_thing,
- void *child_thing);
+H5_DLL herr_t H5C_create_flush_dependency(void *parent_thing, void *child_thing);
H5_DLL void * H5C_protect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
const void * udata1,
@@ -1120,14 +1114,12 @@ H5_DLL void * H5C_protect(H5F_t * f,
H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_resize_pinned_entry(H5C_t * cache_ptr,
- void * thing,
- size_t new_size);
+H5_DLL herr_t H5C_resize_pinned_entry(void *thing, size_t new_size);
-H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
hbool_t evictions_enabled);
H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix);
@@ -1145,15 +1137,13 @@ H5_DLL herr_t H5C_stats(H5C_t * cache_ptr,
H5_DLL void H5C_stats__reset(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_unpin_entry(H5C_t * cache_ptr, void * thing);
+H5_DLL herr_t H5C_unpin_entry(void *thing);
-H5_DLL herr_t H5C_destroy_flush_dependency(H5C_t *cache_ptr, void *parent_thing,
- void *child_thing);
+H5_DLL herr_t H5C_destroy_flush_dependency(void *parent_thing, void *child_thing);
H5_DLL herr_t H5C_unprotect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 85f093d..9f65642 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -862,8 +862,8 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
done:
/* Release pointer to object header itself */
- if(oloc != NULL && oh != NULL)
- if(H5O_unpin(oloc, oh) < 0)
+ if(oh != NULL)
+ if(H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
/* Error cleanup */
@@ -2284,7 +2284,7 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id)
done:
/* Release pointer to object header */
if(oh != NULL)
- if(H5O_unpin(&(dataset->oloc), oh) < 0)
+ if(H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 5a5a9f6..d2ad2ac 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -254,7 +254,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
/* Insert "empty" name first */
if((size_t)(-1) == H5HL_insert(file, dxpl_id, heap, (size_t)1, "")) {
- H5HL_unprotect(file, heap);
+ H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
@@ -264,7 +264,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
/* Insert file name into heap */
if((size_t)(-1) == (offset = H5HL_insert(file, dxpl_id, heap,
HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name))) {
- H5HL_unprotect(file, heap);
+ H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
@@ -274,7 +274,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
} /* end for */
/* Release the heap */
- if(H5HL_unprotect(file, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect EFL file name heap")
heap = NULL;
diff --git a/src/H5EA.c b/src/H5EA.c
index 169c93f..181912d 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -821,7 +821,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
hdr->f = ea->f;
/* Set up flush dependency between child_entry and metadata array 'thing' */
- if(H5EA__create_flush_depend(hdr, parent_entry, (H5AC_info_t *)hdr) < 0)
+ if(H5EA__create_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency on file metadata")
CATCH
@@ -864,7 +864,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
hdr->f = ea->f;
/* Remove flush dependency between child_entry and metadata array 'thing' */
- if(H5EA__destroy_flush_depend(hdr, parent_entry, (H5AC_info_t *)hdr) < 0)
+ if(H5EA__destroy_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency on file metadata")
CATCH
@@ -891,7 +891,6 @@ herr_t, SUCCEED, FAIL,
H5EA_support(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry))
/* Local variables */
- H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */
void *thing = NULL; /* Pointer to the array metadata containing the array index we are interested in */
uint8_t *thing_elmt_buf; /* Pointer to the element buffer for the array metadata */
hsize_t thing_elmt_idx; /* Index of the element in the element buffer for the array metadata */
@@ -906,10 +905,6 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
* Check arguments.
*/
HDassert(ea);
- HDassert(hdr);
-
- /* Set the shared array header's file context for this operation */
- hdr->f = ea->f;
/* Look up the array metadata containing the element we want to set */
if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_WRITE, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0)
@@ -921,7 +916,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
HDassert(thing_unprot_func);
/* Set up flush dependency between child_entry and metadata array 'thing' */
- if(H5EA__create_flush_depend(hdr, (H5AC_info_t *)thing, child_entry) < 0)
+ if(H5EA__create_flush_depend((H5AC_info_t *)thing, child_entry) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency on array metadata")
CATCH
@@ -951,7 +946,6 @@ herr_t, SUCCEED, FAIL,
H5EA_unsupport(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry))
/* Local variables */
- H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */
void *thing = NULL; /* Pointer to the array metadata containing the array index we are interested in */
uint8_t *thing_elmt_buf; /* Pointer to the element buffer for the array metadata */
hsize_t thing_elmt_idx; /* Index of the element in the element buffer for the array metadata */
@@ -966,10 +960,6 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
* Check arguments.
*/
HDassert(ea);
- HDassert(hdr);
-
- /* Set the shared array header's file context for this operation */
- hdr->f = ea->f;
/* Look up the array metadata containing the element we want to set */
if(H5EA__lookup_elmt(ea, dxpl_id, idx, H5AC_READ, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0)
@@ -981,7 +971,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
HDassert(thing_unprot_func);
/* Remove flush dependency between child_entry and metadata array 'thing' */
- if(H5EA__destroy_flush_depend(hdr, (H5AC_info_t *)thing, child_entry) < 0)
+ if(H5EA__destroy_flush_depend((H5AC_info_t *)thing, child_entry) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency on array metadata")
CATCH
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 5138ae4..44b5668 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -863,13 +863,13 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, H5EA_iblock_t *iblock))
switch(action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
/* Create flush dependency on extensible array header */
- if(H5EA__create_flush_depend(iblock->hdr, (H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0)
+ if(H5EA__create_flush_depend((H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between index block and header, address = %llu", (unsigned long long)iblock->addr)
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Destroy flush dependency on extensible array header */
- if(H5EA__destroy_flush_depend(iblock->hdr, (H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0)
+ if(H5EA__destroy_flush_depend((H5AC_info_t *)iblock->hdr, (H5AC_info_t *)iblock) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between index block and header, address = %llu", (unsigned long long)iblock->addr)
break;
@@ -1294,13 +1294,13 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, H5EA_sblock_t *sblock))
switch(action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
/* Create flush dependency on index block */
- if(H5EA__create_flush_depend(sblock->hdr, (H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0)
+ if(H5EA__create_flush_depend((H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between super block and index block, address = %llu", (unsigned long long)sblock->addr)
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Destroy flush dependency on index block */
- if(H5EA__destroy_flush_depend(sblock->hdr, (H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0)
+ if(H5EA__destroy_flush_depend((H5AC_info_t *)sblock->parent, (H5AC_info_t *)sblock) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between super block and index block, address = %llu", (unsigned long long)sblock->addr)
break;
@@ -1659,13 +1659,13 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, H5EA_dblock_t *dblock))
switch(action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
/* Create flush dependency on parent */
- if(H5EA__create_flush_depend(dblock->hdr, (H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0)
+ if(H5EA__create_flush_depend((H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block and parent, address = %llu", (unsigned long long)dblock->addr)
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Destroy flush dependency on parent */
- if(H5EA__destroy_flush_depend(dblock->hdr, (H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0)
+ if(H5EA__destroy_flush_depend((H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between data block and parent, address = %llu", (unsigned long long)dblock->addr)
break;
@@ -2013,13 +2013,13 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, H5EA_dblk_page_t *dblk
switch(action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
/* Create flush dependency on parent */
- if(H5EA__create_flush_depend(dblk_page->hdr, (H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0)
+ if(H5EA__create_flush_depend((H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block page and parent, address = %llu", (unsigned long long)dblk_page->addr)
break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Destroy flush dependency on parent */
- if(H5EA__destroy_flush_depend(dblk_page->hdr, (H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0)
+ if(H5EA__destroy_flush_depend((H5AC_info_t *)dblk_page->parent, (H5AC_info_t *)dblk_page) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between data block page and parent, address = %llu", (unsigned long long)dblk_page->addr)
break;
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index b8d3334..d3cd260 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -478,7 +478,7 @@ H5EA__hdr_incr(H5EA_hdr_t *hdr))
/* Mark header as un-evictable when something is depending on it */
if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr->f, hdr) < 0)
+ if(H5AC_pin_protected_entry(hdr) < 0)
H5E_THROW(H5E_CANTPIN, "unable to pin extensible array header")
/* Increment reference count on shared header */
@@ -516,7 +516,7 @@ H5EA__hdr_decr(H5EA_hdr_t *hdr))
/* Mark header as evictable again when nothing depend on it */
if(hdr->rc == 0) {
HDassert(hdr->file_rc == 0);
- if(H5AC_unpin_entry(hdr->f, hdr) < 0)
+ if(H5AC_unpin_entry(hdr) < 0)
H5E_THROW(H5E_CANTUNPIN, "unable to unpin extensible array header")
} /* end if */
@@ -603,7 +603,7 @@ H5EA__hdr_modified(H5EA_hdr_t *hdr))
HDassert(hdr->f);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr->f, hdr) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
H5E_THROW(H5E_CANTMARKDIRTY, "unable to mark extensible array header as dirty")
CATCH
@@ -628,6 +628,9 @@ BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
H5EA__hdr_delete(H5EA_hdr_t *hdr, hid_t dxpl_id))
+ /* Local variables */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting header */
+
/* Sanity check */
HDassert(hdr);
HDassert(!hdr->file_rc);
@@ -656,15 +659,13 @@ HDfprintf(stderr, "%s: hdr->idx_blk_addr = %a\n", FUNC, hdr->idx_blk_addr);
H5E_THROW(H5E_CANTDELETE, "unable to delete extensible array index block")
} /* end if */
- /* Finished deleting header */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
- hdr = NULL;
+ /* Set flags to finish deleting header on unprotect */
+ cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
CATCH
- /* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(hdr->f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ /* Unprotect the header, deleting it if an error hasn't occurred */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__hdr_delete() */
diff --git a/src/H5EAint.c b/src/H5EAint.c
index 5ce88fc..12a9cda 100644
--- a/src/H5EAint.c
+++ b/src/H5EAint.c
@@ -95,16 +95,14 @@
*/
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__create_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry,
- H5AC_info_t *child_entry))
+H5EA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry))
/* Sanity check */
- HDassert(hdr);
HDassert(parent_entry);
HDassert(child_entry);
/* Create a flush dependency between parent and child entry */
- if(H5AC_create_flush_dependency(hdr->f, parent_entry, child_entry) < 0)
+ if(H5AC_create_flush_dependency(parent_entry, child_entry) < 0)
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency")
CATCH
@@ -127,15 +125,14 @@ END_FUNC(PKG) /* end H5EA__create_flush_depend() */
*/
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__destroy_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry, H5AC_info_t *child_entry))
+H5EA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry))
/* Sanity check */
- HDassert(hdr);
HDassert(parent_entry);
HDassert(child_entry);
/* Destroy a flush dependency between parent and child entry */
- if(H5AC_destroy_flush_dependency(hdr->f, parent_entry, child_entry) < 0)
+ if(H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0)
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency")
CATCH
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 6e86a34..9b6b368 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -362,9 +362,9 @@ extern const H5EA_class_t *const H5EA_client_class_g[];
/******************************/
/* Generic routines */
-H5_DLL herr_t H5EA__create_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry,
+H5_DLL herr_t H5EA__create_flush_depend(H5AC_info_t *parent_entry,
H5AC_info_t *child_entry);
-H5_DLL herr_t H5EA__destroy_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry,
+H5_DLL herr_t H5EA__destroy_flush_depend(H5AC_info_t *parent_entry,
H5AC_info_t *child_entry);
/* Header routines */
diff --git a/src/H5F.c b/src/H5F.c
index 0f63a59..5751bc1 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1003,7 +1003,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
} /* end if */
/* Unpin the superblock, since we're about to destroy the cache */
- if(H5AC_unpin_entry(f, f->shared->sblock) < 0)
+ if(H5AC_unpin_entry(f->shared->sblock) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
f->shared->sblock = NULL;
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 94fb7b2..372caf8 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -264,7 +264,7 @@ H5FA__hdr_incr(H5FA_hdr_t *hdr))
/* Mark header as un-evictable when something is depending on it */
if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr->f, hdr) < 0)
+ if(H5AC_pin_protected_entry(hdr) < 0)
H5E_THROW(H5E_CANTPIN, "unable to pin fixed array header")
/* Increment reference count on shared header */
@@ -301,7 +301,7 @@ H5FA__hdr_decr(H5FA_hdr_t *hdr))
/* Mark header as evictable again when nothing depend on it */
if(hdr->rc == 0) {
HDassert(hdr->file_rc == 0);
- if(H5AC_unpin_entry(hdr->f, hdr) < 0)
+ if(H5AC_unpin_entry(hdr) < 0)
H5E_THROW(H5E_CANTUNPIN, "unable to unpin fixed array header")
} /* end if */
@@ -382,10 +382,9 @@ H5FA__hdr_modified(H5FA_hdr_t *hdr))
/* Sanity check */
HDassert(hdr);
- HDassert(hdr->f);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr->f, hdr) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
H5E_THROW(H5E_CANTMARKDIRTY, "unable to mark fixed array header as dirty")
CATCH
@@ -409,6 +408,9 @@ BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
H5FA__hdr_delete(H5FA_hdr_t *hdr, hid_t dxpl_id))
+ /* Local variables */
+ unsigned cache_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting header */
+
/* Sanity check */
HDassert(hdr);
HDassert(!hdr->file_rc);
@@ -438,15 +440,13 @@ HDfprintf(stderr, "%s: hdr->dblk_addr = %a\n", FUNC, hdr->dblk_addr);
H5E_THROW(H5E_CANTDELETE, "unable to delete fixed array data block")
} /* end if */
- /* Finished deleting header */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
- hdr = NULL;
+ /* Set flags to finish deleting header on unprotect */
+ cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
CATCH
- /* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(hdr->f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ /* Unprotect the header, deleting it if an error hasn't occurred */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PKG) /* end H5FA__hdr_delete() */
diff --git a/src/H5FS.c b/src/H5FS.c
index 015c485..8ee6db4 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -382,7 +382,7 @@ HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end if */
} /* end if */
@@ -439,7 +439,7 @@ HDfprintf(stderr, "%s: Section info went 'go away'\n", FUNC);
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end else */
} /* end if */
@@ -455,7 +455,7 @@ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
/* Free previous serialized sections disk space */
@@ -633,7 +633,7 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
/* Check if we should pin the header in the cache */
if(fspace->rc == 0 && H5F_addr_defined(fspace->addr))
- if(H5AC_pin_protected_entry(f, fspace) < 0)
+ if(H5AC_pin_protected_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin free space header")
/* Increment reference count on header */
@@ -679,7 +679,7 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
/* Check if we should unpin the header in the cache */
if(fspace->rc == 0) {
if(H5F_addr_defined(fspace->addr)) {
- if(H5AC_unpin_entry(f, fspace) < 0)
+ if(H5AC_unpin_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
} /* end if */
else {
@@ -723,7 +723,7 @@ HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
/* Check if the free space manager is persistant */
if(H5F_addr_defined(fspace->addr))
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
done:
@@ -884,7 +884,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
if(hdr_status & H5AC_ES__IN_CACHE) {
/* Unpin the free-space manager header */
- if(H5AC_unpin_entry(f, fspace) < 0)
+ if(H5AC_unpin_entry(fspace) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
/* Load the free-space manager header */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 8a345fe..1761adf 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -1012,7 +1012,7 @@ H5FS_sinfo_free_node_cb(void *item, void UNUSED *key, void *op_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo)
+H5FS_cache_sinfo_dest(H5F_t UNUSED *f, H5FS_sinfo_t *sinfo)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index f80bf50..eb739dc 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -327,7 +327,7 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
sblock_flags |= H5AC__DIRTIED_FLAG;
/* Pin the superblock in the cache */
- if(H5AC_pin_protected_entry(f, sblock) < 0)
+ if(H5AC_pin_protected_entry(sblock) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin superblock")
/* Set the pointer to the pinned superblock */
@@ -609,7 +609,7 @@ done:
/* Check if we've cached it already */
if(sblock_in_cache) {
/* Unpin superblock in cache */
- if(H5AC_unpin_entry(f, sblock) < 0)
+ if(H5AC_unpin_entry(sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
/* Evict the superblock from the cache */
@@ -655,7 +655,7 @@ H5F_super_dirty(H5F_t *f)
HDassert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, f->shared->sblock) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
done:
@@ -788,7 +788,7 @@ H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, void *mesg, unsigned id, hbool_
done:
/* Mark superblock dirty in cache, if necessary */
if(sblock_dirty)
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, f->shared->sblock) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index ca6cb6c..18125df 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1328,7 +1328,7 @@ H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
} /* end of for (i=0; i<sn->nsyms; i++) */
done:
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to unprotect symbol name")
if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
@@ -1527,7 +1527,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
done:
if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node")
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 271501f..7766280 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -921,7 +921,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
for(u = 0; u < linfo->nlinks; u++)
if(H5O_msg_append_oh(oloc->file, dxpl_id, oh, H5O_LINK_ID, 0, H5O_UPDATE_TIME, &(ltable.lnks[u])) < 0) {
/* Release object header */
- if(H5O_unpin(oloc, oh) < 0)
+ if(H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
@@ -933,7 +933,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
} /* end if */
/* Release object header */
- if(H5O_unpin(oloc, oh) < 0)
+ if(H5O_unpin(oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
/* Free link table information */
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 7dc98d1..e4cdc46 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -261,7 +261,7 @@ done:
/* Mark superblock dirty in cache, if necessary */
if(sblock_dirty)
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, f->shared->sblock) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 7dfb5ae..cba725f 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -136,7 +136,7 @@ H5G_stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t d
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -250,7 +250,7 @@ H5G_stab_insert_real(H5F_t *f, H5O_stab_t *stab, const char *name,
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -343,7 +343,7 @@ H5G_stab_remove(H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
done:
/* Release resources */
- if(heap && H5HL_unprotect(loc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -401,7 +401,7 @@ H5G_stab_remove_by_idx(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Reset the link information, if we have a copy */
@@ -453,7 +453,7 @@ H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table B-tree")
/* Release resources */
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
heap = NULL;
@@ -463,7 +463,7 @@ H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -553,7 +553,7 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
done:
/* Release resources */
- if(heap && H5HL_unprotect(oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
@@ -760,7 +760,7 @@ H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
done:
/* Release resources */
- if(heap && H5HL_unprotect(oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Free the duplicated name */
@@ -859,7 +859,7 @@ H5G_stab_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -973,7 +973,7 @@ H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1048,7 +1048,7 @@ H5G_stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5O_stab_t *alt_stab)
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 44105cd..62c6bab 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -616,7 +616,7 @@ H5G_verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 0b4936d..8652f90 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -540,7 +540,7 @@ H5HF_hdr_incr(H5HF_hdr_t *hdr)
/* Mark header as un-evictable when a block is depending on it */
if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr->f, hdr) < 0)
+ if(H5AC_pin_protected_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header")
/* Increment reference count on shared header */
@@ -581,7 +581,7 @@ H5HF_hdr_decr(H5HF_hdr_t *hdr)
/* Mark header as evictable again when no child blocks depend on it */
if(hdr->rc == 0) {
HDassert(hdr->file_rc == 0);
- if(H5AC_unpin_entry(hdr->f, hdr) < 0)
+ if(H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
} /* end if */
@@ -671,7 +671,7 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr->f, hdr) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty")
done:
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index c75a28a..809a720 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -116,7 +116,7 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark block as un-evictable */
- if(H5AC_pin_protected_entry(iblock->hdr->f, iblock) < 0)
+ if(H5AC_pin_protected_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block")
/* If this indirect block has a parent, update it's child iblock pointer */
@@ -200,7 +200,7 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
} /* end if */
/* Mark block as evictable again */
- if(H5AC_unpin_entry(iblock->hdr->f, iblock) < 0)
+ if(H5AC_unpin_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block")
done:
@@ -332,7 +332,7 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark indirect block as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(iblock->hdr->f, iblock) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty")
done:
diff --git a/src/H5HL.c b/src/H5HL.c
index aa187ad..f7c1f22 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -238,7 +238,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(heap->prfx);
/* Resize the heap prefix in the cache */
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end if */
else {
@@ -247,7 +247,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(heap->dblk);
/* Resize the heap data block in the cache */
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_heap_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end else */
} /* end if */
@@ -260,7 +260,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
/* Resize current heap prefix */
heap->prfx_size = H5HL_SIZEOF_HDR(f);
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)heap->prfx_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)heap->prfx_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap prefix in cache")
/* Insert data block into cache (pinned) */
@@ -276,7 +276,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
/* (ignore [unlikely] case where heap data block ends up
* contiguous w/heap prefix again.
*/
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_heap_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap data block in cache")
/* Relocate the heap data block in the cache */
@@ -557,14 +557,13 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_unprotect(H5F_t *f, H5HL_t *heap)
+H5HL_unprotect(H5HL_t *heap)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(H5HL_unprotect, FAIL)
/* check arguments */
- HDassert(f);
HDassert(heap);
/* Decrement # of times heap is protected */
@@ -575,7 +574,7 @@ H5HL_unprotect(H5F_t *f, H5HL_t *heap)
/* Check for separate heap data block */
if(heap->single_cache_obj) {
/* Mark local heap prefix as evictable again */
- if(H5AC_unpin_entry(f, heap->prfx) < 0)
+ if(H5AC_unpin_entry(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end if */
else {
@@ -584,7 +583,7 @@ H5HL_unprotect(H5F_t *f, H5HL_t *heap)
/* Mark local heap data block as evictable again */
/* (data block still pins prefix) */
- if(H5AC_unpin_entry(f, heap->dblk) < 0)
+ if(H5AC_unpin_entry(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end else */
} /* end if */
@@ -640,14 +639,13 @@ H5HL_remove_free(H5HL_t *heap, H5HL_free_t *fl)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_dirty(H5F_t *f, H5HL_t *heap)
+H5HL_dirty(H5HL_t *heap)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HL_dirty)
/* check arguments */
- HDassert(f);
HDassert(heap);
HDassert(heap->prfx);
@@ -656,12 +654,12 @@ H5HL_dirty(H5F_t *f, H5HL_t *heap)
/* Sanity check */
HDassert(heap->dblk);
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, heap->dblk) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty")
} /* end if */
/* Mark heap prefix as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, heap->prfx) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap prefix as dirty")
done:
@@ -706,7 +704,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(f, heap) < 0)
+ if(H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, UFAIL, "unable to mark heap as dirty")
/*
@@ -785,12 +783,12 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
/* Check for prefix & data block contiguous */
if(heap->single_cache_obj) {
/* Resize prefix+data block */
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap prefix in cache")
} /* end if */
else {
/* Resize 'standalone' data block */
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_dblk_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_dblk_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap data block in cache")
} /* end else */
@@ -927,7 +925,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(f, heap) < 0)
+ if(H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap as dirty")
/*
@@ -1095,7 +1093,7 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
/* Pin the prefix, if the data block was loaded from file */
if(dblk_udata.loaded) {
- if(H5AC_pin_protected_entry(f, prfx) < 0)
+ if(H5AC_pin_protected_entry(prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin local heap prefix")
} /* end if */
} /* end if */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index a26477a..6e725ac 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -650,7 +650,7 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *udata1,
done:
/* Release the [possibly partially initialized] local heap on errors */
if(!ret_value && dblk)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -702,7 +702,7 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* Should we destroy the memory version? */
if(destroy)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
@@ -724,7 +724,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_datablock_dest(H5F_t *f, void *_thing)
+H5HL_datablock_dest(H5F_t UNUSED *f, void *_thing)
{
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -732,7 +732,6 @@ H5HL_datablock_dest(H5F_t *f, void *_thing)
FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_dest)
/* check arguments */
- HDassert(f);
HDassert(dblk);
HDassert(dblk->heap);
HDassert(!dblk->heap->single_cache_obj);
@@ -753,7 +752,7 @@ H5HL_datablock_dest(H5F_t *f, void *_thing)
} /* end if */
/* Destroy local heap data block */
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap data block")
done:
@@ -775,7 +774,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
+H5HL_datablock_clear(H5F_t UNUSED *f, void *_thing, hbool_t destroy)
{
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -783,14 +782,13 @@ H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_clear)
/* check arguments */
- HDassert(f);
HDassert(dblk);
/* Mark local heap data block as clean */
dblk->cache_info.is_dirty = FALSE;
if(destroy)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 8107164..b8a8d35 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -125,7 +125,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
done:
- if(h && H5HL_unprotect(f, h) < 0)
+ if(h && H5HL_unprotect(h) < 0)
HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
H5MM_xfree(marker);
diff --git a/src/H5HLint.c b/src/H5HLint.c
index 23ffe00..c6d6839 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -382,7 +382,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk)
+H5HL_dblk_dest(H5HL_dblk_t *dblk)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -397,7 +397,7 @@ H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk)
dblk->heap->dblk = NULL;
/* Unpin the local heap prefix */
- if(H5AC_unpin_entry(f, dblk->heap->prfx) < 0)
+ if(H5AC_unpin_entry(dblk->heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "can't unpin local heap prefix")
/* Decrement ref. count on heap data structure */
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index 8052eb1..926ecd3 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -155,7 +155,7 @@ H5_DLL herr_t H5HL_prfx_dest(H5HL_prfx_t *prfx);
/* Heap data block routines */
H5_DLL H5HL_dblk_t *H5HL_dblk_new(H5HL_t *heap);
-H5_DLL herr_t H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk);
+H5_DLL herr_t H5HL_dblk_dest(H5HL_dblk_t *dblk);
#endif /* _H5HLpkg_H */
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index df2ec62..8679bee 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -65,7 +65,7 @@ H5_DLL H5HL_t *H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_
H5_DLL void *H5HL_offset_into(const H5HL_t *heap, size_t offset);
H5_DLL herr_t H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset,
size_t size);
-H5_DLL herr_t H5HL_unprotect(H5F_t *f, H5HL_t *heap);
+H5_DLL herr_t H5HL_unprotect(H5HL_t *heap);
H5_DLL size_t H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t size,
const void *buf);
H5_DLL herr_t H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
diff --git a/src/H5O.c b/src/H5O.c
index 9a42223..2131cdd 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1599,7 +1599,7 @@ H5O_pin(H5O_loc_t *loc, hid_t dxpl_id)
/* Check if the object header needs to be pinned */
if(0 == oh->npins) {
/* Mark object header as un-evictable */
- if(H5AC_pin_protected_entry(loc->file, oh) < 0)
+ if(H5AC_pin_protected_entry(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header")
} /* end if */
@@ -1634,22 +1634,19 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_unpin(H5O_loc_t *loc, H5O_t *oh)
+H5O_unpin(H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_unpin, FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
HDassert(oh);
/* Check if this is the last unpin operation */
if(1 == oh->npins) {
/* Mark object header as evictable again */
- if(H5AC_unpin_entry(loc->file, oh) < 0)
+ if(H5AC_unpin_entry(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
} /* end if */
@@ -1735,7 +1732,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
} /* end else */
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 13a8337..087c3d3 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -1075,7 +1075,7 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, UFAIL, "can't split null message")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, UFAIL, "unable to mark object header as dirty")
/* Set return value */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index b16f415..0eb4ba2 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -130,7 +130,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh,
HDassert(s && !*s);
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
#endif
@@ -159,7 +159,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh,
HDassert(mesg->slot[u].size > 0);
} /* end for */
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
@@ -482,7 +482,7 @@ H5O_efl_copy_file(H5F_t UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
done:
/* Release resources */
- if(heap && H5HL_unprotect(file_dst, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to unprotect EFL file name heap")
if(!ret_value)
if(efl_dst)
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 28be283..fc6146a 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1336,7 +1336,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
@@ -1993,7 +1993,7 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
done:
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 5636243..da8c059 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -622,7 +622,7 @@ H5_DLL herr_t H5O_close(H5O_loc_t *loc);
H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id);
H5_DLL int H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, unsigned *oh_flags);
H5_DLL H5O_t *H5O_pin(H5O_loc_t *loc, hid_t dxpl_id);
-H5_DLL herr_t H5O_unpin(H5O_loc_t *loc, H5O_t *oh);
+H5_DLL herr_t H5O_unpin(H5O_t *oh);
H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id);
H5_DLL herr_t H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
hbool_t force);
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 6ea5b27..762b316 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -62,7 +62,7 @@ typedef struct H5Z_node {
struct H5Z_data_xform_t {
char* xform_exp;
- struct H5Z_node* parse_root;
+ H5Z_node* parse_root;
H5Z_datval_ptrs* dat_val_pointers;
};
@@ -354,7 +354,7 @@ H5Z_unget_token(H5Z_token *current)
static H5Z_token *
H5Z_get_token(H5Z_token *current)
{
- void *ret_value = current;
+ H5Z_token *ret_value = current;
FUNC_ENTER_NOAPI(H5Z_get_token, NULL)
@@ -464,7 +464,7 @@ H5Z_get_token(H5Z_token *current)
current->tok_type = H5Z_XFORM_END;
/* Set return value */
- ret_value = (void *)current;
+ ret_value = current;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1369,7 +1369,7 @@ H5Z_xform_create(const char *expr)
data_xform_prop->dat_val_pointers->num_ptrs = 0;
/* we generate the parse tree right here and store a poitner to its root in the property. */
- if((data_xform_prop->parse_root = H5Z_xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
+ if((data_xform_prop->parse_root = (H5Z_node *)H5Z_xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to generate parse tree from expression")
/* Sanity check
diff --git a/test/cache.c b/test/cache.c
index 7828725..74900ec 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -19,6 +19,7 @@
* This file contains tests for the cache implemented in
* H5C.c
*/
+#include "H5private.h" /* Put this first, so H5open() isn't invoked in public macros */
#include "h5test.h"
#include "H5Iprivate.h"
#include "H5ACprivate.h"
@@ -40,20 +41,20 @@ static unsigned smoke_check_10(void);
static unsigned write_permitted_check(void);
static unsigned check_insert_entry(void);
static unsigned check_flush_cache(void);
-static void check_flush_cache__empty_cache(H5C_t * cache_ptr);
-static void check_flush_cache__multi_entry(H5C_t * cache_ptr);
-static void check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__empty_cache(H5F_t * file_ptr);
+static void check_flush_cache__multi_entry(H5F_t * file_ptr);
+static void check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct flush_cache_test_spec spec[]);
-static void check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct pe_flush_cache_test_spec spec[]);
-static void check_flush_cache__single_entry(H5C_t * cache_ptr);
-static void check_flush_cache__single_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__single_entry(H5F_t * file_ptr);
+static void check_flush_cache__single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -65,7 +66,7 @@ static void check_flush_cache__single_entry_test(H5C_t * cache_ptr,
hbool_t expected_cleared,
hbool_t expected_flushed,
hbool_t expected_destroyed);
-static void check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -79,8 +80,8 @@ static void check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
hbool_t expected_cleared,
hbool_t expected_flushed,
hbool_t expected_destroyed);
-static void check_flush_cache__flush_ops(H5C_t * cache_ptr);
-static void check_flush_cache__flush_op_test(H5C_t * cache_ptr,
+static void check_flush_cache__flush_ops(H5F_t * file_ptr);
+static void check_flush_cache__flush_op_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
@@ -91,13 +92,13 @@ static void check_flush_cache__flush_op_test(H5C_t * cache_ptr,
size_t expected_index_size,
int check_size,
struct fo_flush_entry_check check[]);
-static void check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr);
+static void check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr);
static unsigned check_flush_protected_err(void);
static unsigned check_get_entry_status(void);
static unsigned check_expunge_entry(void);
static unsigned check_multiple_read_protect(void);
static unsigned check_rename_entry(void);
-static void check_rename_entry__run_test(H5C_t * cache_ptr, int test_num,
+static void check_rename_entry__run_test(H5F_t * file_ptr, int test_num,
struct rename_entry_test_spec * spec_ptr);
static unsigned check_pin_protected_entry(void);
static unsigned check_resize_entry(void);
@@ -167,7 +168,7 @@ smoke_check_1(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache");
@@ -189,14 +190,14 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -215,7 +216,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -234,7 +235,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -255,7 +256,7 @@ smoke_check_1(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -264,7 +265,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -280,7 +281,7 @@ smoke_check_1(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -289,7 +290,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -303,7 +304,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -358,7 +359,7 @@ smoke_check_2(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache");
@@ -380,14 +381,14 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -406,7 +407,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -425,7 +426,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -446,7 +447,7 @@ smoke_check_2(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -455,7 +456,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -471,7 +472,7 @@ smoke_check_2(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -480,7 +481,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -494,7 +495,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -548,7 +549,7 @@ smoke_check_3(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache");
@@ -570,14 +571,14 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -596,7 +597,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -615,7 +616,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -636,7 +637,7 @@ smoke_check_3(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -645,7 +646,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -661,7 +662,7 @@ smoke_check_3(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -670,7 +671,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -684,7 +685,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -739,7 +740,7 @@ smoke_check_4(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache");
@@ -761,14 +762,14 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -787,7 +788,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -806,7 +807,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -827,7 +828,7 @@ smoke_check_4(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -836,7 +837,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -852,7 +853,7 @@ smoke_check_4(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -861,7 +862,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -875,7 +876,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -930,6 +931,7 @@ smoke_check_5(void)
hbool_t display_stats = FALSE;
int32_t max_index = 1024;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1008,8 +1010,9 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1026,7 +1029,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1039,7 +1042,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1052,7 +1055,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1067,7 +1070,7 @@ smoke_check_5(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1076,7 +1079,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1092,7 +1095,7 @@ smoke_check_5(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1101,7 +1104,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1115,7 +1118,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1170,6 +1173,7 @@ smoke_check_6(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1245,8 +1249,9 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1263,7 +1268,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1276,7 +1281,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1289,7 +1294,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1304,7 +1309,7 @@ smoke_check_6(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1313,7 +1318,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1329,7 +1334,7 @@ smoke_check_6(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1338,7 +1343,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1352,7 +1357,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1407,6 +1412,7 @@ smoke_check_7(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1483,8 +1489,9 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1501,7 +1508,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1514,7 +1521,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1527,7 +1534,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1542,7 +1549,7 @@ smoke_check_7(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1551,7 +1558,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1567,7 +1574,7 @@ smoke_check_7(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1576,7 +1583,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1590,7 +1597,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1645,6 +1652,7 @@ smoke_check_8(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1721,8 +1729,8 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
- (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1739,7 +1747,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1752,7 +1760,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1765,7 +1773,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1780,7 +1788,7 @@ smoke_check_8(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1789,7 +1797,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1805,7 +1813,7 @@ smoke_check_8(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1814,7 +1822,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1828,7 +1836,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1886,6 +1894,7 @@ smoke_check_9(void)
hbool_t display_detailed_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked");
@@ -1908,8 +1917,9 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
/* disable evictions */
@@ -1932,7 +1942,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1968,7 +1978,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2002,7 +2012,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2038,7 +2048,7 @@ smoke_check_9(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2062,7 +2072,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2078,7 +2088,7 @@ smoke_check_9(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2102,7 +2112,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2132,7 +2142,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2190,6 +2200,7 @@ smoke_check_10(void)
hbool_t display_detailed_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked");
@@ -2212,14 +2223,15 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2253,7 +2265,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2287,7 +2299,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2323,7 +2335,7 @@ smoke_check_10(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2347,7 +2359,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2378,7 +2390,7 @@ smoke_check_10(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2402,7 +2414,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2431,7 +2443,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2483,7 +2495,7 @@ write_permitted_check(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -2503,14 +2515,14 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(1 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)(0));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2531,7 +2543,7 @@ write_permitted_check(void)
write_permitted = FALSE;
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2552,7 +2564,7 @@ write_permitted_check(void)
write_permitted = TRUE;
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2573,7 +2585,7 @@ write_permitted_check(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2582,7 +2594,7 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2598,7 +2610,7 @@ write_permitted_check(void)
write_permitted = FALSE;
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2614,7 +2626,7 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2677,6 +2689,7 @@ check_insert_entry(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -2701,18 +2714,17 @@ check_insert_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- insert_entry(cache_ptr, entry_type, 0, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, entry_type, 1, TRUE,
- H5C__SET_FLUSH_MARKER_FLAG);
- insert_entry(cache_ptr, entry_type, 2, TRUE, H5C__PIN_ENTRY_FLAG);
- insert_entry(cache_ptr, entry_type, 3, TRUE,
- (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG));
+ insert_entry(file_ptr, entry_type, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, 1, TRUE, H5C__SET_FLUSH_MARKER_FLAG);
+ insert_entry(file_ptr, entry_type, 2, TRUE, H5C__PIN_ENTRY_FLAG);
+ insert_entry(file_ptr, entry_type, 3, TRUE, (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG));
}
@@ -2726,14 +2738,14 @@ check_insert_entry(void)
/* Start by checking everything we can via H5C_get_entry_status() */
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5AC_get_entry_status() reports failure.";
+ failure_mssg = "H5C_get_entry_status() reports failure.";
}
if ( pass ) {
@@ -2769,7 +2781,7 @@ check_insert_entry(void)
}
}
- /* Thats all we can get from H5AC_get_entry_status().
+ /* Thats all we can get from H5C_get_entry_status().
* Now start looking at the cache data structures directly.
*/
@@ -2924,13 +2936,13 @@ check_insert_entry(void)
if ( pass ) {
- unpin_entry(cache_ptr, entry_type, 2);
- unpin_entry(cache_ptr, entry_type, 3);
+ unpin_entry(entry_type, 2);
+ unpin_entry(entry_type, 3);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -2967,7 +2979,7 @@ check_flush_cache(void)
{
const char * fcn_name = "check_flush_cache";
hbool_t show_progress = FALSE;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("H5C_flush_cache() functionality");
@@ -2987,7 +2999,7 @@ check_flush_cache(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
@@ -3003,7 +3015,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__empty_cache(cache_ptr);
+ check_flush_cache__empty_cache(file_ptr);
}
/* now do a series of similar tests with a cache with a single entry.
@@ -3018,7 +3030,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__single_entry(cache_ptr);
+ check_flush_cache__single_entry(file_ptr);
}
if ( pass ) {
@@ -3029,7 +3041,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__multi_entry(cache_ptr);
+ check_flush_cache__multi_entry(file_ptr);
}
if ( pass ) {
@@ -3040,7 +3052,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__flush_ops(cache_ptr);
+ check_flush_cache__flush_ops(file_ptr);
}
if ( pass ) {
@@ -3051,7 +3063,7 @@ check_flush_cache(void)
fcn_name);
}
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -3084,9 +3096,10 @@ check_flush_cache(void)
*/
static void
-check_flush_cache__empty_cache(H5C_t * cache_ptr)
+check_flush_cache__empty_cache(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__empty_cache"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
herr_t result;
if ( cache_ptr == NULL ) {
@@ -3108,7 +3121,8 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -3119,7 +3133,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -3131,7 +3145,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_CLEAR_ONLY_FLAG);
if ( result < 0 ) {
@@ -3144,7 +3158,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_MARKED_ENTRIES_FLAG);
if ( result < 0 ) {
@@ -3177,9 +3191,10 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__multi_entry(H5C_t * cache_ptr)
+check_flush_cache__multi_entry(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__multi_entry"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -3298,7 +3313,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3408,7 +3423,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3518,7 +3533,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3628,7 +3643,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3739,7 +3754,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3850,7 +3865,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3961,7 +3976,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4073,7 +4088,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4187,7 +4202,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4354,7 +4369,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4500,7 +4515,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4637,7 +4652,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4783,7 +4798,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4926,7 +4941,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4951,13 +4966,14 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
+check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__multi_entry_test"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -5022,14 +5038,14 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].dirty_flag, spec[i].flags);
} else {
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- unprotect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
(int)(spec[i].dirty_flag), spec[i].flags);
}
@@ -5040,7 +5056,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags);
if ( result < 0 ) {
@@ -5117,7 +5133,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5175,13 +5191,14 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
+check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct pe_flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__pe_multi_entry_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -5249,14 +5266,14 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].dirty_flag, spec[i].flags);
} else {
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- unprotect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
(int)(spec[i].dirty_flag), spec[i].flags);
}
@@ -5264,7 +5281,7 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
for ( j = 0; j < spec[i].num_pins; j++ )
{
- create_pinned_entry_dependency(cache_ptr,
+ create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
spec[i].entry_index,
spec[i].pin_type[j],
@@ -5276,7 +5293,8 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -5353,7 +5371,7 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5417,9 +5435,10 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__flush_ops(H5C_t * cache_ptr)
+check_flush_cache__flush_ops(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__flush_ops"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -5525,7 +5544,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5633,7 +5652,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5710,7 +5729,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5789,7 +5808,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5869,7 +5888,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5897,7 +5916,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
test_num = 6;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5981,7 +6000,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6014,7 +6033,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
spec[0].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6095,7 +6114,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6123,7 +6142,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
test_num = 10;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6207,7 +6226,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6240,7 +6259,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6337,7 +6356,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6435,7 +6454,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6532,7 +6551,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6629,7 +6648,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6726,7 +6745,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6754,7 +6773,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
checks[0].at_main_addr = TRUE;
checks[1].at_main_addr = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6855,7 +6874,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6891,7 +6910,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
checks[1].in_cache = FALSE;
checks[1].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7110,7 +7129,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7381,7 +7400,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7651,7 +7670,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7788,7 +7807,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7922,7 +7941,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8353,7 +8372,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8790,7 +8809,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8981,7 +9000,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -9174,7 +9193,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -9190,7 +9209,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
/* finally finish up with the flush ops eviction test */
- check_flush_cache__flush_op_eviction_test(cache_ptr);
+ check_flush_cache__flush_op_eviction_test(file_ptr);
return;
@@ -9214,7 +9233,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__flush_op_test(H5C_t * cache_ptr,
+check_flush_cache__flush_op_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
@@ -9227,6 +9246,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
struct fo_flush_entry_check check[])
{
const char * fcn_name = "check_flush_cache__flush_op_test";
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t show_progress = FALSE;
hbool_t verbose = FALSE;
@@ -9366,7 +9386,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
(unsigned)spec[i].flags);
}
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
TRUE, spec[i].flags);
} else {
@@ -9380,7 +9400,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
(int)(spec[i].entry_index));
}
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
if ( show_progress ) {
@@ -9393,14 +9413,14 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
(int)(spec[i].new_size));
}
- unprotect_entry_with_size_change(cache_ptr, spec[i].entry_type,
+ unprotect_entry_with_size_change(file_ptr, spec[i].entry_type,
spec[i].entry_index,
spec[i].flags, spec[i].new_size);
}
for ( j = 0; j < spec[i].num_pins; j++ )
{
- create_pinned_entry_dependency(cache_ptr,
+ create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
spec[i].entry_index,
spec[i].pin_type[j],
@@ -9443,7 +9463,8 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -9665,7 +9686,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -9773,7 +9794,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
+check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__flush_op_eviction_test"; */
int i;
@@ -9781,6 +9802,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
int num_monster_entries = 31;
int num_large_entries = 0;
herr_t result;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
test_entry_t * entry_ptr;
test_entry_t * base_addr;
struct expected_entry_status expected[8 + 31 + 14] =
@@ -9899,40 +9921,40 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
* Start by just loading the entries.
*/
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 0);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 2,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 4,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 5);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 5,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 6);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 6,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 7);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 7,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7,
H5C__NO_FLAGS_SET, (size_t)0);
if ( ( cache_ptr->index_len != 8 ) ||
@@ -9951,15 +9973,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
* Briefly, (VET, 0) is pinned by (VET, 1), (VET, 2), and (VET, 3)
* (VET, 7) is pinned by (VET, 3), and (VET, 5)
*/
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 1,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 1,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 2,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 2,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3,
VARIABLE_ENTRY_TYPE, 7);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 5,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 5,
VARIABLE_ENTRY_TYPE, 7);
/* Next, set up the flush operations:
@@ -10034,15 +10056,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
/* Now fill up the cache with other, unrelated entries */
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 1; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10109,8 +10131,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 2;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10175,8 +10197,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 3;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 2,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10248,12 +10270,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 5;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 3,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG, (size_t)0);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 4,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 4);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG, (size_t)0);
/* verify cache size */
@@ -10289,15 +10311,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 5; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10356,8 +10378,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 5; i < 8; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10418,8 +10440,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 8; i < 9; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10484,8 +10506,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 9; i < 10; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10520,15 +10542,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 10; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10631,8 +10653,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 10; i < 12; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10664,15 +10686,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < num_monster_entries; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < num_large_entries; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10758,8 +10780,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 12; i < 14; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10789,8 +10811,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
- H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -10926,10 +10948,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__single_entry(H5C_t * cache_ptr)
+check_flush_cache__single_entry(H5F_t * file_ptr)
{
const char * fcn_name = "check_flush_cache__single_entry";
hbool_t show_progress = FALSE;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -10951,7 +10974,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 1,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10978,7 +11001,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 2,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11005,7 +11028,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 3,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11032,7 +11055,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 4,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11059,7 +11082,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 5,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11086,7 +11109,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 6,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11113,7 +11136,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 7,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11140,7 +11163,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 8,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11167,7 +11190,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 9,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11195,7 +11218,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 10,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11223,7 +11246,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 11,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11251,7 +11274,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 12,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11279,7 +11302,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 13,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11307,7 +11330,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 14,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11335,7 +11358,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 15,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11364,7 +11387,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 16,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11393,7 +11416,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 17,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11420,7 +11443,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 18,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11447,7 +11470,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 19,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11474,7 +11497,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 20,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11501,7 +11524,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 21,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11528,7 +11551,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 22,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11555,7 +11578,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 23,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11582,7 +11605,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 24,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11609,7 +11632,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 25,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11637,7 +11660,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 26,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11665,7 +11688,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 27,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11693,7 +11716,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 28,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11721,7 +11744,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 29,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11749,7 +11772,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 30,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11777,7 +11800,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 31,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11806,7 +11829,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 32,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11835,7 +11858,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 33,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11862,7 +11885,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 34,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11889,7 +11912,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 35,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11916,7 +11939,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 36,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11943,7 +11966,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 37,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11970,7 +11993,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 38,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11997,7 +12020,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 39,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12024,7 +12047,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 40,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12051,7 +12074,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 41,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12079,7 +12102,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 42,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12107,7 +12130,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 43,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12135,7 +12158,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 44,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12163,7 +12186,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 45,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12191,7 +12214,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 46,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12219,7 +12242,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 47,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12248,7 +12271,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 48,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12277,7 +12300,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 49,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12304,7 +12327,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 50,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12331,7 +12354,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 51,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12358,7 +12381,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 52,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12385,7 +12408,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 53,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12412,7 +12435,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 54,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12439,7 +12462,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 55,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12466,7 +12489,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 56,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12493,7 +12516,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 57,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12521,7 +12544,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 58,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12549,7 +12572,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 59,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12577,7 +12600,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 60,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12605,7 +12628,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 61,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12633,7 +12656,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 62,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12661,7 +12684,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 63,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12690,7 +12713,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 64,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -13064,7 +13087,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__pinned_single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ spec[i].test_num,
/* entry_type */ spec[i].entry_type,
/* entry_idx */ spec[i].entry_idx,
@@ -13104,7 +13127,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__single_entry_test(H5C_t * cache_ptr,
+check_flush_cache__single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -13118,6 +13141,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
hbool_t expected_destroyed)
{
/* const char * fcn_name = "check_flush_cache__single_entry_test"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
test_entry_t * base_addr;
@@ -13157,20 +13181,20 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
if ( insert_flag ) {
- insert_entry(cache_ptr, entry_type, entry_idx, dirty_flag, flags);
+ insert_entry(file_ptr, entry_type, entry_idx, dirty_flag, flags);
} else {
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, flags);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags);
if ( result < 0 ) {
@@ -13233,7 +13257,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -13291,7 +13315,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
+check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -13307,6 +13331,7 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
hbool_t expected_destroyed)
{
/* const char *fcn_name = "check_flush_cache__pinned_single_entry_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t expected_loaded = TRUE;
herr_t result;
@@ -13345,35 +13370,33 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
base_addr = entries[entry_type];
entry_ptr = &(base_addr[entry_idx]);
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
if ( pop_mark_dirty_prot ) {
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- entry_type,
+ mark_pinned_or_protected_entry_dirty(entry_type,
entry_idx);
}
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, (flags | H5C__PIN_ENTRY_FLAG));
if ( mark_dirty ) {
- mark_pinned_entry_dirty(cache_ptr, entry_type, entry_idx,
- FALSE, (size_t)0);
+ mark_pinned_entry_dirty(entry_type, entry_idx, FALSE, (size_t)0);
}
if ( pop_mark_dirty_pinned ) {
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- entry_type,
+ mark_pinned_or_protected_entry_dirty(entry_type,
entry_idx);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -13436,21 +13459,21 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
if ( unprotect_unpin ) {
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, H5C__UNPIN_ENTRY_FLAG);
} else {
- unpin_entry(cache_ptr, entry_type, entry_idx);
+ unpin_entry(entry_type, entry_idx);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -13510,7 +13533,7 @@ check_get_entry_status(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -13522,7 +13545,7 @@ check_get_entry_status(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
base_addr = entries[0];
@@ -13535,14 +13558,14 @@ check_get_entry_status(void)
* the call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 1.");
+ "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -13553,20 +13576,20 @@ check_get_entry_status(void)
}
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 2.");
+ "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
@@ -13577,18 +13600,18 @@ check_get_entry_status(void)
}
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 3.");
+ "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
@@ -13599,18 +13622,18 @@ check_get_entry_status(void)
}
}
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 4.");
+ "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || is_protected || !is_pinned ) {
@@ -13621,18 +13644,18 @@ check_get_entry_status(void)
}
}
- mark_pinned_entry_dirty(cache_ptr, 0, 0, FALSE, (size_t)0);
+ mark_pinned_entry_dirty(0, 0, FALSE, (size_t)0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 5.");
+ "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || !is_pinned ) {
@@ -13643,18 +13666,18 @@ check_get_entry_status(void)
}
}
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 6.");
+ "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
@@ -13667,7 +13690,7 @@ check_get_entry_status(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -13711,7 +13734,7 @@ check_expunge_entry(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -13723,7 +13746,7 @@ check_expunge_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
base_addr = entries[0];
@@ -13736,7 +13759,7 @@ check_expunge_entry(void)
* the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -13744,7 +13767,7 @@ check_expunge_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 1.");
+ "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -13771,22 +13794,22 @@ check_expunge_entry(void)
if ( pass ) {
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 2.");
+ "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
@@ -13813,7 +13836,7 @@ check_expunge_entry(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, 0, 0);
+ expunge_entry(file_ptr, 0, 0);
}
@@ -13823,14 +13846,14 @@ check_expunge_entry(void)
* by the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 3.");
+ "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -13864,7 +13887,7 @@ check_expunge_entry(void)
* the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -13872,7 +13895,7 @@ check_expunge_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 4.");
+ "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -13899,15 +13922,15 @@ check_expunge_entry(void)
if ( pass ) {
- protect_entry(cache_ptr, 0, 1);
+ protect_entry(file_ptr, 0, 1);
- unprotect_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -13915,7 +13938,7 @@ check_expunge_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 5.");
+ "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
@@ -13942,7 +13965,7 @@ check_expunge_entry(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, 0, 1);
+ expunge_entry(file_ptr, 0, 1);
}
@@ -13952,7 +13975,7 @@ check_expunge_entry(void)
* by the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -13960,7 +13983,7 @@ check_expunge_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 6.");
+ "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -13983,7 +14006,7 @@ check_expunge_entry(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -14016,12 +14039,11 @@ check_expunge_entry(void)
*
*-------------------------------------------------------------------------
*/
-
-
static unsigned
check_multiple_read_protect(void)
{
const char * fcn_name = "check_multiple_read_protect()";
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * entry_ptr;
@@ -14054,8 +14076,9 @@ check_multiple_read_protect(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
entry_ptr = &((entries[0])[0]);
@@ -14080,7 +14103,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14103,7 +14126,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14126,7 +14149,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14149,7 +14172,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14172,7 +14195,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14195,7 +14218,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14218,7 +14241,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -14241,7 +14264,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( entry_ptr->header.is_protected ) ||
( entry_ptr->header.is_read_only ) ||
@@ -14269,7 +14292,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( entry_ptr->header.is_read_only ) ||
@@ -14292,7 +14315,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( entry_ptr->header.is_protected ) ||
( entry_ptr->header.is_read_only ) ||
@@ -14324,36 +14347,36 @@ check_multiple_read_protect(void)
if ( pass ) {
- protect_entry(cache_ptr, 0, 2); /* (0,2) write */
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (1) */
- protect_entry(cache_ptr, 0, 6); /* (0,6) write */
+ protect_entry(file_ptr, 0, 2); /* (0,2) write */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (1) */
+ protect_entry(file_ptr, 0, 6); /* (0,6) write */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) unprotect */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) unprotect */
H5C__NO_FLAGS_SET);
- protect_entry_ro(cache_ptr, 0, 2); /* (0,2) read only (1) */
- protect_entry(cache_ptr, 0, 1); /* (0,1) write */
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (2) */
- protect_entry(cache_ptr, 0, 0); /* (0,0) write */
- protect_entry_ro(cache_ptr, 0, 2); /* (0,2) read only (2) */
+ protect_entry_ro(file_ptr, 0, 2); /* (0,2) read only (1) */
+ protect_entry(file_ptr, 0, 1); /* (0,1) write */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (2) */
+ protect_entry(file_ptr, 0, 0); /* (0,0) write */
+ protect_entry_ro(file_ptr, 0, 2); /* (0,2) read only (2) */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) read only (1) pin */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) read only (1) pin */
H5C__PIN_ENTRY_FLAG);
- unprotect_entry(cache_ptr, 0, 6, FALSE, /* (0,6) unprotect */
+ unprotect_entry(file_ptr, 0, 6, FALSE, /* (0,6) unprotect */
H5C__NO_FLAGS_SET);
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (3) */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (3) */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) unprotect */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) unprotect */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 1, FALSE, /* (0,1) unprotect */
+ unprotect_entry(file_ptr, 0, 1, FALSE, /* (0,1) unprotect */
H5C__NO_FLAGS_SET);
if ( pass ) {
entry_ptr = &((entries[0])[4]);
- if ( H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr) < 0 ) {
+ if ( H5C_pin_protected_entry((void *)entry_ptr) < 0 ) {
pass = FALSE;
failure_mssg = "H5C_pin_protected_entry() failed.\n";
@@ -14371,9 +14394,9 @@ check_multiple_read_protect(void)
}
}
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) read only (2) */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) read only (2) */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) read only (1) */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) read only (1) */
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) && ( entry_ptr->header.is_pinned ) ) {
@@ -14383,12 +14406,12 @@ check_multiple_read_protect(void)
}
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) unprotect */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) unprotect */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 0, FALSE, /* (0,0) unprotect */
+ unprotect_entry(file_ptr, 0, 0, FALSE, /* (0,0) unprotect */
H5C__NO_FLAGS_SET);
- unpin_entry(cache_ptr, 0, 2);
+ unpin_entry(0, 2);
}
#if H5C_COLLECT_CACHE_STATS
@@ -14404,7 +14427,7 @@ check_multiple_read_protect(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -14442,7 +14465,7 @@ check_rename_entry(void)
{
const char * fcn_name = "check_rename_entry";
int i;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
struct rename_entry_test_spec test_specs[4] =
{
{
@@ -14504,20 +14527,20 @@ check_rename_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
i = 0;
while ( ( pass ) && ( i < 4 ) )
{
- check_rename_entry__run_test(cache_ptr, i, &(test_specs[i]));
+ check_rename_entry__run_test(file_ptr, i, &(test_specs[i]));
i++;
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -14553,11 +14576,12 @@ check_rename_entry(void)
*/
static void
-check_rename_entry__run_test(H5C_t * cache_ptr,
+check_rename_entry__run_test(H5F_t * file_ptr,
int test_num,
struct rename_entry_test_spec * spec_ptr)
{
/* const char * fcn_name = "check_rename_entry__run_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
unsigned int flags = H5C__NO_FLAGS_SET;
test_entry_t * base_addr;
@@ -14592,9 +14616,9 @@ check_rename_entry__run_test(H5C_t * cache_ptr,
if ( pass ) {
- protect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
+ protect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
- unprotect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index,
+ unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index,
(int)(spec_ptr->is_dirty), flags);
rename_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE);
@@ -14639,7 +14663,7 @@ check_rename_entry__run_test(H5C_t * cache_ptr,
}
}
- unpin_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
+ unpin_entry(spec_ptr->entry_type, spec_ptr->entry_index);
} else {
@@ -14693,7 +14717,7 @@ check_pin_protected_entry(void)
const char * fcn_name = "check_pin_protected_entry";
static char msg[128];
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -14710,18 +14734,18 @@ check_pin_protected_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -14742,11 +14766,11 @@ check_pin_protected_entry(void)
}
}
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -14792,6 +14816,7 @@ check_resize_entry(void)
hbool_t is_pinned;
size_t entry_size;
size_t reported_entry_size;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -14835,8 +14860,9 @@ check_resize_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[LARGE_ENTRY_TYPE];
entry_ptr = &(base_addr[0]);
@@ -14857,7 +14883,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
if ( pass ) {
@@ -14876,15 +14902,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 1.");
+ "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
@@ -14907,11 +14934,9 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG,
- (LARGE_ENTRY_SIZE / 2));
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -14946,15 +14971,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 2.");
+ "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
@@ -14976,15 +15002,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG),
- LARGE_ENTRY_SIZE);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15019,15 +15043,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 3.");
+ "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
@@ -15049,14 +15074,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
@@ -15084,15 +15108,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 4.");
+ "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
@@ -15116,8 +15141,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- LARGE_ENTRY_SIZE);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15145,15 +15169,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 5.");
+ "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
@@ -15175,14 +15200,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -15190,7 +15215,7 @@ check_resize_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 6.");
+ "H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -15245,14 +15270,14 @@ check_resize_entry(void)
entry_size = LARGE_ENTRY_SIZE;
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET);
if ( pass ) {
@@ -15269,7 +15294,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
if ( pass ) {
@@ -15288,15 +15313,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 7.");
+ "H5C_get_entry_status() reports failure 7.");
failure_mssg = msg;
} else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
@@ -15319,11 +15345,9 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG,
- (LARGE_ENTRY_SIZE / 2));
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -15360,15 +15384,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 8.");
+ "H5C_get_entry_status() reports failure 8.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
@@ -15390,15 +15415,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG),
- LARGE_ENTRY_SIZE);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15433,15 +15456,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 9.");
+ "H5C_get_entry_status() reports failure 9.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
@@ -15463,14 +15487,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
@@ -15500,15 +15523,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 10.");
+ "H5C_get_entry_status() reports failure 10.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
@@ -15532,8 +15556,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- LARGE_ENTRY_SIZE);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -15561,15 +15584,16 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
- &is_dirty, &is_protected, &is_pinned, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
+ &is_dirty, &is_protected, &is_pinned,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 11.");
+ "H5C_get_entry_status() reports failure 11.");
failure_mssg = msg;
} else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
@@ -15591,14 +15615,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
@@ -15606,7 +15630,7 @@ check_resize_entry(void)
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 12.");
+ "H5C_get_entry_status() reports failure 12.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -15641,14 +15665,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG);
if ( pass ) {
@@ -15667,7 +15691,7 @@ check_resize_entry(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -15712,6 +15736,7 @@ check_evictions_enabled(void)
hbool_t in_cache;
int i;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -15764,8 +15789,9 @@ check_evictions_enabled(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(1 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)( 512 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[MONSTER_ENTRY_TYPE];
}
@@ -15814,8 +15840,8 @@ check_evictions_enabled(void)
/* fill the cache */
for ( i = 0; i < 16 ; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
FALSE, H5C__NO_FLAGS_SET);
}
@@ -15845,8 +15871,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect another entry */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 7 */
@@ -15877,14 +15903,15 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[0]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ NULL, &in_cache, NULL, NULL, NULL,
+ NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 1.");
+ "H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -15910,7 +15937,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert an entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -15940,14 +15967,14 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[1]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 2.");
+ "H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -16010,8 +16037,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect another entry */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 15 */
@@ -16039,7 +16066,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert another entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 17 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -16083,8 +16110,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect an entry that is in the cache */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 20 */
@@ -16112,8 +16139,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect an entry that isn't in the cache */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 22 */
@@ -16147,14 +16174,14 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[2]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 3.");
+ "H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -16183,14 +16210,14 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[3]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 4.");
+ "H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -16235,8 +16262,8 @@ check_evictions_enabled(void)
/* protect and unprotect an entry that isn't in the cache, forcing
* the cache to grow.
*/
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21,
FALSE, H5C__NO_FLAGS_SET);
@@ -16282,7 +16309,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert an entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 30 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -16312,14 +16339,14 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[4]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5AC_get_entry_status() reports failure 5.");
+ "H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
} else if ( in_cache ) {
@@ -16363,7 +16390,7 @@ check_evictions_enabled(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) /* 34 */
@@ -16403,7 +16430,7 @@ static unsigned
check_flush_protected_err(void)
{
const char * fcn_name = "check_flush_protected_err";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("flush cache with protected entry error");
@@ -16418,30 +16445,30 @@ check_flush_protected_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
- >= 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET) >= 0 ) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
- < 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET) < 0 ) {
pass = FALSE;
failure_mssg = "flush failed after unprotect.\n";
} else {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
}
}
@@ -16476,11 +16503,13 @@ check_flush_protected_err(void)
*-------------------------------------------------------------------------
*/
+extern H5C_t * saved_cache;
+
static unsigned
check_destroy_pinned_err(void)
{
const char * fcn_name = "check_destroy_pinned_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("destroy cache with permanently pinned entry error");
@@ -16495,28 +16524,44 @@ check_destroy_pinned_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ protect_entry(file_ptr, 0, 0);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) < 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unpin.\n";
- }
+ } else {
+ file_ptr->shared->cache = NULL;
+ }
+ }
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+
}
+
+ /* call takedown_cache() with a NULL file_ptr parameter.
+ * This causes the function to close and delete the file,
+ * while skipping the call to H5C_dest().
+ */
+ takedown_cache(NULL, FALSE, FALSE);
+
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16552,7 +16597,7 @@ static unsigned
check_destroy_protected_err(void)
{
const char * fcn_name = "check_destroy_protected_err";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("destroy cache with protected entry error");
@@ -16567,27 +16612,42 @@ check_destroy_protected_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) < 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
- }
+ } else {
+ file_ptr->shared->cache = NULL;
+ }
}
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+
+ }
+
+ /* call takedown_cache() with a NULL file_ptr parameter.
+ * This causes the function to close and delete the file,
+ * while skipping the call to H5C_dest().
+ */
+ takedown_cache(NULL, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16624,7 +16684,7 @@ check_duplicate_insert_err(void)
{
const char * fcn_name = "check_duplicate_insert_err";
herr_t result = -1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -16641,19 +16701,18 @@ check_duplicate_insert_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_insert_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
if ( result >= 0 ) {
@@ -16662,9 +16721,9 @@ check_duplicate_insert_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
}
}
@@ -16703,6 +16762,7 @@ check_rename_err(void)
{
const char * fcn_name = "check_rename_err()";
herr_t result;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * entry_0_0_ptr;
test_entry_t * entry_0_1_ptr;
@@ -16721,12 +16781,13 @@ check_rename_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
- insert_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, 1, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 1, 0, TRUE, H5C__NO_FLAGS_SET);
entry_0_0_ptr = &((entries[0])[0]);
entry_0_1_ptr = &((entries[0])[1]);
@@ -16759,7 +16820,7 @@ check_rename_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16798,7 +16859,7 @@ check_double_pin_err(void)
{
const char * fcn_name = "check_double_pin_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("pin a pinned entry error");
@@ -16815,23 +16876,23 @@ check_double_pin_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__PIN_ENTRY_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__PIN_ENTRY_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -16841,13 +16902,13 @@ check_double_pin_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16886,7 +16947,7 @@ check_double_unpin_err(void)
{
const char * fcn_name = "check_double_unpin_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unpin an unpinned entry error");
@@ -16905,19 +16966,19 @@ check_double_unpin_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__UNPIN_ENTRY_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__UNPIN_ENTRY_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -16927,13 +16988,13 @@ check_double_unpin_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
}
if ( pass ) {
- result = H5C_unpin_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_unpin_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -16946,7 +17007,7 @@ check_double_unpin_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16985,7 +17046,7 @@ check_pin_entry_errs(void)
{
const char * fcn_name = "check_pin_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("pin entry related errors");
@@ -17008,19 +17069,19 @@ check_pin_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -17030,17 +17091,17 @@ check_pin_entry_errs(void)
} else {
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
}
if ( pass ) {
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -17050,14 +17111,14 @@ check_pin_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17098,7 +17159,7 @@ static unsigned
check_double_protect_err(void)
{
const char * fcn_name = "check_double_protect_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
@@ -17115,19 +17176,18 @@ check_double_protect_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, NULL, NULL,
- H5C__NO_FLAGS_SET);
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( cache_entry_ptr != NULL ) {
@@ -17138,12 +17198,12 @@ check_double_protect_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17188,7 +17248,7 @@ check_double_unprotect_err(void)
{
const char * fcn_name = "check_double_unprotect_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unprotect an unprotected entry error");
@@ -17204,21 +17264,21 @@ check_double_unprotect_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__NO_FLAGS_SET, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__NO_FLAGS_SET, (size_t)0);
if ( result > 0 ) {
@@ -17230,7 +17290,7 @@ check_double_unprotect_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17278,7 +17338,7 @@ check_mark_entry_dirty_errs(void)
{
const char * fcn_name = "check_mark_entry_dirty_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("mark entry dirty related errors");
@@ -17301,22 +17361,21 @@ check_mark_entry_dirty_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr,
- FALSE, (size_t)0);
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
if ( result > 0 ) {
@@ -17326,14 +17385,13 @@ check_mark_entry_dirty_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr,
- FALSE, (size_t)0);
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
if ( result > 0 ) {
@@ -17346,8 +17404,7 @@ check_mark_entry_dirty_errs(void)
if ( pass ) {
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr,
- (void *)entry_ptr);
+ result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( result > 0 ) {
@@ -17360,7 +17417,7 @@ check_mark_entry_dirty_errs(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17399,7 +17456,7 @@ check_expunge_entry_errs(void)
{
const char * fcn_name = "check_expunge_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("expunge entry related errors");
@@ -17422,19 +17479,19 @@ check_expunge_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
entry_ptr = &((entries[0])[0]);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr, H5AC__NO_FLAGS_SET);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -17444,15 +17501,15 @@ check_expunge_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr, H5AC__NO_FLAGS_SET);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -17462,15 +17519,15 @@ check_expunge_entry_errs(void)
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
}
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr, H5AC__NO_FLAGS_SET);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -17484,7 +17541,7 @@ check_expunge_entry_errs(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17523,7 +17580,7 @@ check_resize_entry_errs(void)
{
const char * fcn_name = "check_resize_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("resize entry related errors");
@@ -17545,18 +17602,18 @@ check_resize_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
entry_ptr = &((entries[0])[0]);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)1);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)1);
if ( result > 0 ) {
@@ -17566,14 +17623,14 @@ check_resize_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)0);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)0);
if ( result > 0 ) {
@@ -17583,14 +17640,14 @@ check_resize_entry_errs(void)
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17629,7 +17686,7 @@ check_unprotect_ro_dirty_err(void)
{
const char * fcn_name = "check_unprotect_ro_dirty_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unprotect a read only entry dirty error");
@@ -17645,19 +17702,19 @@ check_unprotect_ro_dirty_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__DIRTIED_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__DIRTIED_FLAG, (size_t)0);
if ( result >= 0 ) {
@@ -17669,13 +17726,13 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
/* allocate a another cache, protect an entry read only twice, and
@@ -17688,20 +17745,20 @@ check_unprotect_ro_dirty_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__DIRTIED_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__DIRTIED_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -17713,14 +17770,14 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17758,7 +17815,7 @@ static unsigned
check_protect_ro_rw_err(void)
{
const char * fcn_name = "check_protect_ro_rw_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
void * thing_ptr = NULL;
@@ -17776,18 +17833,18 @@ check_protect_ro_rw_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- thing_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( thing_ptr != NULL ) {
@@ -17798,12 +17855,12 @@ check_protect_ro_rw_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17843,6 +17900,7 @@ check_check_evictions_enabled_err(void)
const char * fcn_name = "check_evictions_enabled_err()";
herr_t result;
hbool_t evictions_enabled;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("get/set evictions enabled errors");
@@ -17866,8 +17924,9 @@ check_check_evictions_enabled_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -17913,7 +17972,7 @@ check_check_evictions_enabled_err(void)
if ( result == SUCCEED ) {
pass = FALSE;
- failure_mssg = "H5C_set_evictions_enabled succeeded() 1.\n";
+ failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
} else if ( cache_ptr->evictions_enabled == TRUE ) {
@@ -17931,7 +17990,7 @@ check_check_evictions_enabled_err(void)
if ( result == SUCCEED ) {
pass = FALSE;
- failure_mssg = "H5C_set_evictions_enabled succeeded() 2.\n";
+ failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
@@ -17940,7 +17999,7 @@ check_check_evictions_enabled_err(void)
if ( cache_ptr ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -18002,6 +18061,7 @@ check_auto_cache_resize(void)
herr_t result;
int32_t i;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -18064,8 +18124,9 @@ check_auto_cache_resize(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -18100,10 +18161,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18130,10 +18191,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18160,10 +18221,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18190,10 +18251,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18220,10 +18281,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18250,10 +18311,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18281,10 +18342,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18311,10 +18372,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18341,10 +18402,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18372,10 +18433,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18472,10 +18533,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18503,10 +18564,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18534,10 +18595,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18565,10 +18626,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18595,10 +18656,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18625,10 +18686,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18655,10 +18716,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 900 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18666,10 +18727,10 @@ check_auto_cache_resize(void)
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18696,10 +18757,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18726,10 +18787,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18826,10 +18887,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18856,10 +18917,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18886,10 +18947,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18916,10 +18977,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19023,10 +19084,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19050,10 +19111,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19077,10 +19138,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19108,10 +19169,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19138,10 +19199,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19167,10 +19228,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19196,10 +19257,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19226,10 +19287,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19257,10 +19318,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19284,10 +19345,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19311,10 +19372,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19341,10 +19402,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19450,10 +19511,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19477,10 +19538,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19504,10 +19565,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19535,10 +19596,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19565,10 +19626,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19594,10 +19655,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19623,10 +19684,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19652,10 +19713,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19681,10 +19742,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19710,10 +19771,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19739,10 +19800,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19769,10 +19830,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19800,10 +19861,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19827,10 +19888,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19856,10 +19917,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19886,10 +19947,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19994,10 +20055,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20021,10 +20082,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20048,10 +20109,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20079,10 +20140,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20109,10 +20170,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20138,10 +20199,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20167,10 +20228,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20197,10 +20258,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20228,10 +20289,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20255,10 +20316,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20282,10 +20343,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20312,10 +20373,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20419,10 +20480,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20446,10 +20507,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20473,10 +20534,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20501,10 +20562,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20529,10 +20590,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20557,10 +20618,10 @@ check_auto_cache_resize(void)
i = 1002;
while ( ( pass ) && ( i < 2002 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20586,10 +20647,10 @@ check_auto_cache_resize(void)
i = 1003;
while ( ( pass ) && ( i < 2003 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20688,10 +20749,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20715,10 +20776,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20750,10 +20811,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20781,10 +20842,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20812,10 +20873,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20844,10 +20905,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20874,10 +20935,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20905,10 +20966,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20937,10 +20998,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20969,10 +21030,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21001,10 +21062,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21031,10 +21092,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21061,10 +21122,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21091,10 +21152,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21121,10 +21182,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21151,10 +21212,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21175,7 +21236,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
/* now test the flash cache size increment code. At least at present,
@@ -21200,8 +21261,9 @@ check_auto_cache_resize(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -21281,10 +21343,10 @@ check_auto_cache_resize(void)
/* Load a huge entry into the cache */
if ( pass ) {
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
@@ -21309,10 +21371,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
@@ -21338,9 +21400,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21363,9 +21425,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21387,13 +21449,12 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1);
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21423,14 +21484,13 @@ check_auto_cache_resize(void)
/* insert a huge entry into the cache */
if ( pass ) {
- insert_entry(cache_ptr, HUGE_ENTRY_TYPE, 1, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, HUGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
/* protect and unprotect a couple times to increment cache_accesses */
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21454,8 +21514,7 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 4, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 4, TRUE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (80 * 1024) ) ||
@@ -21476,8 +21535,7 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
@@ -21499,9 +21557,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21525,33 +21583,32 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5);
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 5);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 13,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 13,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21577,20 +21634,20 @@ check_auto_cache_resize(void)
/* Now load the variable entries into the cache */
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21612,8 +21669,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 3 * 1024);
@@ -21637,8 +21694,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21661,8 +21718,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21685,8 +21742,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21710,21 +21767,20 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21751,10 +21807,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
@@ -21772,7 +21828,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
@@ -21790,10 +21846,10 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -21811,10 +21867,10 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -21835,16 +21891,16 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -21867,21 +21923,20 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21904,8 +21959,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024);
@@ -21943,8 +21998,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024);
@@ -21964,8 +22019,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024);
@@ -21988,16 +22043,16 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -22017,10 +22072,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -22117,8 +22172,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22144,8 +22199,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22170,11 +22225,11 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22201,10 +22256,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, TINY_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, TINY_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, TINY_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, TINY_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22227,8 +22282,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -22255,10 +22310,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 500 ) )
{
- protect_entry(cache_ptr, TINY_ENTRY_TYPE, i);
+ protect_entry(file_ptr, TINY_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, TINY_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, TINY_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22279,7 +22334,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -22325,6 +22380,7 @@ check_auto_cache_resize_disable(void)
herr_t result;
int32_t i;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -22387,8 +22443,9 @@ check_auto_cache_resize_disable(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -22496,10 +22553,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22527,10 +22584,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22557,10 +22614,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22657,10 +22714,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22688,10 +22745,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22718,10 +22775,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22818,10 +22875,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22849,10 +22906,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22879,10 +22936,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22980,10 +23037,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23009,10 +23066,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23039,10 +23096,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23138,10 +23195,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23168,10 +23225,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23198,10 +23255,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23297,10 +23354,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23327,10 +23384,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23357,10 +23414,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23450,7 +23507,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23463,10 +23520,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23493,10 +23550,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23525,10 +23582,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23555,10 +23612,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23587,10 +23644,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23678,7 +23735,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23691,10 +23748,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23721,10 +23778,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23753,10 +23810,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23783,10 +23840,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23815,10 +23872,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23913,7 +23970,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23926,10 +23983,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23956,10 +24013,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23990,10 +24047,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24022,10 +24079,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24056,10 +24113,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24160,10 +24217,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24192,10 +24249,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24289,10 +24346,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24321,10 +24378,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24418,10 +24475,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24450,10 +24507,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24547,10 +24604,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24579,10 +24636,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24677,10 +24734,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24709,10 +24766,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24807,10 +24864,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24839,10 +24896,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24962,8 +25019,8 @@ check_auto_cache_resize_disable(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -25002,8 +25059,8 @@ check_auto_cache_resize_disable(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -25033,7 +25090,7 @@ check_auto_cache_resize_disable(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -25076,6 +25133,7 @@ check_auto_cache_resize_epoch_markers(void)
int32_t i;
int32_t j;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -25133,8 +25191,9 @@ check_auto_cache_resize_epoch_markers(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -25248,10 +25307,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25281,10 +25340,10 @@ check_auto_cache_resize_epoch_markers(void)
i = (j - 2) * 1000;
while ( ( pass ) && ( i < (j - 1) * 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25313,10 +25372,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 9000;
while ( ( pass ) && ( i < 10000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25427,10 +25486,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 9000;
while ( ( pass ) && ( i < 10000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25619,10 +25678,10 @@ check_auto_cache_resize_epoch_markers(void)
i = (j - 1) * 1000;
while ( ( pass ) && ( i < j * 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25741,7 +25800,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -25844,6 +25903,7 @@ check_auto_cache_resize_input_errs(void)
{
const char * fcn_name = "check_auto_cache_resize_input_errs()";
herr_t result;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t ref_auto_size_ctl =
{
@@ -25908,14 +25968,14 @@ check_auto_cache_resize_input_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &ref_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &ref_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -25996,8 +26056,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(NULL,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26072,8 +26131,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26149,8 +26207,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26223,8 +26280,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26299,8 +26355,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26372,8 +26427,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26449,8 +26503,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26522,8 +26575,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26595,8 +26647,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26671,8 +26722,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26744,8 +26794,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26821,8 +26870,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26895,8 +26943,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26971,8 +27018,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27044,8 +27090,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27117,8 +27162,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27194,8 +27238,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27271,8 +27314,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27347,8 +27389,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27421,8 +27462,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27497,8 +27537,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27571,8 +27610,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27647,8 +27685,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27721,8 +27758,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27797,8 +27833,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27870,8 +27905,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27946,8 +27980,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -28019,8 +28052,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -28094,8 +28126,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -28167,8 +28198,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -28214,7 +28244,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config((H5C_t *)&test_auto_size_ctl,
+ result = H5C_get_cache_auto_resize_config((const H5C_t *)&test_auto_size_ctl,
&test_auto_size_ctl);
if ( result != FAIL ) {
@@ -28239,7 +28269,7 @@ check_auto_cache_resize_input_errs(void)
if ( cache_ptr ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -28282,6 +28312,7 @@ check_auto_cache_resize_aux_fcns(void)
const char * fcn_name = "check_auto_cache_resize_aux_fcns()";
herr_t result;
int32_t i;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
double hit_rate;
size_t max_size;
@@ -28349,14 +28380,14 @@ check_auto_cache_resize_aux_fcns(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -28412,11 +28443,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -28458,11 +28489,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -28541,11 +28572,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -28646,11 +28677,11 @@ check_auto_cache_resize_aux_fcns(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
}
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -28781,7 +28812,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( cache_ptr ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -28831,6 +28862,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
const char * fcn_name = "check_metadata_blizzard_absence";
int entry_type = HUGE_ENTRY_TYPE;
size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
hbool_t show_progress = FALSE;
int32_t checkpoint = 0;
@@ -29023,14 +29055,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* The max_cache_size should have room for 50 entries.
* The min_clean_size is half of that, or 25 entries.
*/
- cache_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */
+ file_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */
(size_t)(25 * entry_size)); /* min_clean_size */
- if ( cache_ptr == NULL) {
+ if ( file_ptr == NULL) {
pass = FALSE;
failure_mssg = "bad return from cache intialization.\n";
- }
+
+ }
+ else
+ cache_ptr = file_ptr->shared->cache;
}
if ( show_progress) /* 1 */
@@ -29067,18 +29102,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = 0; entry_idx < 26; entry_idx++) {
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29090,7 +29125,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
*/
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
- expected[entry_idx].loaded = loaded;
+ expected[entry_idx].loaded = (unsigned char)loaded;
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
entry_idx, /* int tag */
@@ -29128,17 +29163,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* constraint.
*/
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29162,7 +29197,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* entry w/ index 26 is now in the cache and dirty. */
expected[26].in_cache = TRUE;
expected[26].is_dirty = TRUE;
- expected[26].loaded = loaded;
+ expected[26].loaded = (unsigned char)loaded;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29184,17 +29219,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* satisfy the min_clean_size constraint.
*/
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29218,7 +29253,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* entry w/ index 27 is now in the cache and dirty. */
expected[27].in_cache = TRUE;
expected[27].is_dirty = TRUE;
- expected[27].loaded = loaded;
+ expected[27].loaded = (unsigned char)loaded;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29238,17 +29273,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) {
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29265,7 +29300,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
- expected[entry_idx].loaded = loaded;
+ expected[entry_idx].loaded = (unsigned char)loaded;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29312,17 +29347,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* have to evict in order to make room for the new entry.
*/
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29350,7 +29385,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* entry w/ index 50 is now in the cache and dirty */
expected[50].in_cache = TRUE;
expected[50].is_dirty = TRUE;
- expected[50].loaded = loaded;
+ expected[50].loaded = (unsigned char)loaded;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29377,17 +29412,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) {
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29397,7 +29432,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* This past inserted entry is now in the cache and dirty */
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
- expected[entry_idx].loaded = loaded;
+ expected[entry_idx].loaded = (unsigned char)loaded;
/* The entry inserted 50 insertions ago has been evicted */
expected[entry_idx - 50].in_cache = FALSE;
@@ -29467,7 +29502,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* to an empty cache.
*/
- flush_cache(cache_ptr, /* H5C_t * cache_ptr */
+ flush_cache(file_ptr, /* H5F_t * file_ptr */
FALSE, /* hbool_t destory_entries */
FALSE, /* hbool_t dump_stats */
FALSE); /* hbool_t dump_detailed_stats */
@@ -29509,18 +29544,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = 100; entry_idx < 126; entry_idx++) {
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29530,7 +29565,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* This past inserted entry is now in the cache and dirty */
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
- expected[entry_idx].loaded = loaded;
+ expected[entry_idx].loaded = (unsigned char)loaded;
/* The entry with ID minus 50 will have been evicted */
expected[entry_idx - 50].in_cache = FALSE;
@@ -29552,17 +29587,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* Insert the 127th entry (index = 126) into the cache. */
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29588,7 +29623,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* entry w/ index 26 is now in the cache and dirty. */
expected[126].in_cache = TRUE;
expected[126].is_dirty = TRUE;
- expected[126].loaded = loaded;
+ expected[126].loaded = (unsigned char)loaded;
/* verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
@@ -29607,18 +29642,18 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = 127; entry_idx < 150; entry_idx++) {
if (fill_via_insertion) {
- insert_entry(cache_ptr, /* H5C_t * cache_ptr */
+ insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* hbool_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
} else {
- protect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ protect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx); /* int32-t idx */
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
TRUE, /* int32_t dirty */
@@ -29628,7 +29663,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/* This past inserted entry is now in the cache and dirty */
expected[entry_idx].in_cache = TRUE;
expected[entry_idx].is_dirty = TRUE;
- expected[entry_idx].loaded = loaded;
+ expected[entry_idx].loaded = (unsigned char)loaded;
/* The entry with ID minus 50 will have been evicted */
expected[entry_idx - 50].in_cache = FALSE;
@@ -29654,7 +29689,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
if ( pass ) {
/* We're done with testing. We can take down the cache. */
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
reset_entries();
}
@@ -29685,10 +29720,10 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
static unsigned
check_flush_deps(void)
{
+ H5F_t * file_ptr = NULL; /* File for this test */
H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
test_entry_t *base_addr; /* Base address of entries for test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
- size_t entry_size = PICO_ENTRY_SIZE; /* 1 byte */
unsigned u; /* Local index variable */
struct expected_entry_status expected[5] =
{
@@ -29710,14 +29745,15 @@ check_flush_deps(void)
*/
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[entry_type];
if ( !pass ) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
- insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
if ( !pass ) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
@@ -29741,12 +29777,12 @@ check_flush_deps(void)
hbool_t in_cache, is_flush_dep_parent, is_flush_dep_child;
test_entry_t * entry_ptr;
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
/* Check the parent's entry status */
entry_ptr = &(base_addr[1]);
- if(H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache,
+ if(H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache,
NULL, NULL, NULL, &is_flush_dep_parent, &is_flush_dep_child) < 0)
CACHE_ERROR("H5C_get_entry_status() failed")
if(!in_cache || is_flush_dep_parent || is_flush_dep_child)
@@ -29754,18 +29790,18 @@ check_flush_deps(void)
/* Check the child's entry status */
entry_ptr = &(base_addr[0]);
- if(H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache,
+ if(H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache,
NULL, NULL, NULL, &is_flush_dep_parent, &is_flush_dep_child) < 0)
CACHE_ERROR("H5C_get_entry_status() failed")
if(!in_cache || is_flush_dep_parent || is_flush_dep_child)
CACHE_ERROR("invalid entry status")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Check the parent's entry status */
entry_ptr = &(base_addr[1]);
- if(H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache,
+ if(H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache,
NULL, NULL, NULL, &is_flush_dep_parent, &is_flush_dep_child) < 0)
CACHE_ERROR("H5C_get_entry_status() failed")
if(!in_cache || !is_flush_dep_parent || is_flush_dep_child)
@@ -29773,7 +29809,7 @@ check_flush_deps(void)
/* Check the child's entry status */
entry_ptr = &(base_addr[0]);
- if(H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache,
+ if(H5C_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache,
NULL, NULL, NULL, &is_flush_dep_parent, &is_flush_dep_child) < 0)
CACHE_ERROR("H5C_get_entry_status() failed")
if(!in_cache || is_flush_dep_parent || !is_flush_dep_child)
@@ -29799,10 +29835,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -29831,13 +29867,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0, 1 (children) & 2 (parent) */
{
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ create_flush_dependency(entry_type, 2, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -29862,13 +29898,13 @@ check_flush_deps(void)
/* Destroy flush dependency between entries 0, 1 (children) & 2 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ destroy_flush_dependency(entry_type, 2, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -29901,10 +29937,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -29924,10 +29960,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -29947,10 +29983,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ create_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -29973,10 +30009,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, from the "top down" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ destroy_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30000,10 +30036,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30027,10 +30063,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30061,10 +30097,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30084,10 +30120,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30107,10 +30143,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ create_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30133,10 +30169,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, from the "bottom up" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30166,10 +30202,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30196,10 +30232,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ destroy_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30230,10 +30266,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ create_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30253,10 +30289,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30279,10 +30315,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30311,10 +30347,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, from the "top down" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ destroy_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30338,10 +30374,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30365,10 +30401,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30399,10 +30435,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ create_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30422,10 +30458,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30448,10 +30484,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30480,10 +30516,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, from the "bottom up" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30513,10 +30549,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30543,10 +30579,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ destroy_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30575,11 +30611,11 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
for(u = 0; u < 4; u++) {
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ create_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30604,7 +30640,7 @@ check_flush_deps(void)
/* Destroy flush dependency between entries */
{
for(u = 0; u < 4; u++) {
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30616,7 +30652,7 @@ check_flush_deps(void)
/* Check for destroying flush dependency on last entry */
if(3 == u) {
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30648,10 +30684,10 @@ check_flush_deps(void)
* then add entry 4 as a child of 0
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30671,10 +30707,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30694,10 +30730,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ create_flush_dependency(entry_type, 0, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30724,10 +30760,10 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, detaching 3->4 from 0 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ destroy_flush_dependency(entry_type, 0, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30754,10 +30790,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30781,10 +30817,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30817,10 +30853,10 @@ check_flush_deps(void)
* then add entry 4 as a child of 1
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30834,16 +30870,16 @@ check_flush_deps(void)
expected[1].flush_dep_height = 1;
/* Verify the status */
- verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ verify_entry_status(cache_ptr, /* H5F_t * cache_ptr */
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30863,10 +30899,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30886,7 +30922,7 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ create_flush_dependency(entry_type, 1, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30911,7 +30947,7 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, detaching 3->4 from 1 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ destroy_flush_dependency(entry_type, 1, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -30932,10 +30968,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30959,10 +30995,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -30986,10 +31022,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31022,10 +31058,10 @@ check_flush_deps(void)
* then add entry 4 as a child of 2
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31045,10 +31081,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31068,10 +31104,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31091,7 +31127,7 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ create_flush_dependency(entry_type, 2, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31112,7 +31148,7 @@ check_flush_deps(void)
/* Destroy flush dependency between entries, detaching 3->4 from 2 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ destroy_flush_dependency(entry_type, 2, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31129,10 +31165,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31156,10 +31192,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31183,10 +31219,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31217,13 +31253,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- pin_entry(cache_ptr, entry_type, 1);
+ pin_entry(entry_type, 1);
if ( !pass ) CACHE_ERROR("pin_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31246,13 +31282,13 @@ check_flush_deps(void)
/* Unpin entry & destroy flush dependency between entries 0 (child) & 1 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unpin_entry(cache_ptr, entry_type, 1);
+ unpin_entry(entry_type, 1);
if ( !pass ) CACHE_ERROR("unpin_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31283,13 +31319,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- pin_entry(cache_ptr, entry_type, 1);
+ pin_entry(entry_type, 1);
if ( !pass ) CACHE_ERROR("pin_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31312,7 +31348,7 @@ check_flush_deps(void)
/* Unpin entry & destroy flush dependency between entries 0 (child) & 1 (parent) */
{
- unpin_entry(cache_ptr, entry_type, 1);
+ unpin_entry(entry_type, 1);
if ( !pass ) CACHE_ERROR("unpin_entry failed")
/* Verify the status */
@@ -31322,10 +31358,10 @@ check_flush_deps(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31352,8 +31388,8 @@ check_flush_deps(void)
done:
- if(cache_ptr)
- takedown_cache(cache_ptr, FALSE, FALSE);
+ if(file_ptr)
+ takedown_cache(file_ptr, FALSE, FALSE);
if ( pass )
PASSED()
@@ -31382,7 +31418,7 @@ done:
static unsigned
check_flush_deps_err(void)
{
- H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
+ H5F_t * file_ptr = NULL; /* File for this test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
unsigned test_count; /* Test iteration variable */
@@ -31399,12 +31435,12 @@ check_flush_deps_err(void)
/* Allocate a cache */
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
if ( !pass ) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 10; u++) {
- insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
if ( !pass ) CACHE_ERROR("insert_entry failed")
} /* end for */
@@ -31412,19 +31448,19 @@ check_flush_deps_err(void)
switch(test_count) {
/* Verify that parent entry in flush dependency must be protected */
case 0:
- result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ result = H5C_create_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
if( result != FAIL ) CACHE_ERROR("Creating flush dependency with unprotected entry succeeded")
break;
/* Verify that entry can't have flush dependency on itself */
case 1:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[0]));
+ result = H5C_create_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[0]));
if( result != FAIL ) CACHE_ERROR("Creating flush dependency with parent == child")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31434,29 +31470,29 @@ check_flush_deps_err(void)
/* Verify that a child entry can only have one flush dependency parent */
case 2:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ create_flush_dependency(entry_type, 0, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[1]), &((entries[entry_type])[2]));
+ result = H5C_create_flush_dependency(&((entries[entry_type])[1]), &((entries[entry_type])[2]));
if( result != FAIL ) CACHE_ERROR("Creating second flush dependency for child")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ destroy_flush_dependency(entry_type, 0, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31466,122 +31502,122 @@ check_flush_deps_err(void)
/* Verify that a flush dependency chain can't be higher than (H5C__NUM_FLUSH_DEP_HEIGHTS - 1) */
case 3:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ create_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ create_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ create_flush_dependency(entry_type, 3, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 5);
+ create_flush_dependency(entry_type, 4, entry_type, 5);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 5);
+ protect_entry(file_ptr, entry_type, 5);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 5, entry_type, 6);
+ create_flush_dependency(entry_type, 5, entry_type, 6);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 6);
+ protect_entry(file_ptr, entry_type, 6);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[6]), &((entries[entry_type])[7]));
+ result = H5C_create_flush_dependency(&((entries[entry_type])[6]), &((entries[entry_type])[7]));
if( result != FAIL ) CACHE_ERROR("Creating flush dependency that's too tall")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
6, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- protect_entry(cache_ptr, entry_type, 7);
+ protect_entry(file_ptr, entry_type, 7);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[7]), &((entries[entry_type])[0]));
+ result = H5C_create_flush_dependency(&((entries[entry_type])[7]), &((entries[entry_type])[0]));
if( result != FAIL ) CACHE_ERROR("Creating flush dependency that's too tall")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
7, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ destroy_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ destroy_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ destroy_flush_dependency(entry_type, 3, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 5);
+ destroy_flush_dependency(entry_type, 4, entry_type, 5);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 5, entry_type, 6);
+ destroy_flush_dependency(entry_type, 5, entry_type, 6);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
5, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31591,19 +31627,19 @@ check_flush_deps_err(void)
/* Verify that parent entry must be protected */
case 4:
- result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
if( result != FAIL ) CACHE_ERROR("Destroying [non-existant] dependency when parent isn't protected")
break;
/* Verify that parent entry has flush dependency */
case 5:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent isn't in relationship")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31613,19 +31649,19 @@ check_flush_deps_err(void)
/* Verify that child entry is in flush dependency relationship */
case 6:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[2]));
+ result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[2]));
if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31635,51 +31671,51 @@ check_flush_deps_err(void)
/* Verify that parent has child entries at this height */
case 7:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ create_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ create_flush_dependency(entry_type, 3, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[4]));
+ result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[4]));
if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent has no children at child's height")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ destroy_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ destroy_flush_dependency(entry_type, 3, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31690,35 +31726,35 @@ check_flush_deps_err(void)
/* Verify that child entry is child of parent */
case 8:
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ create_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[3]));
+ result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[3]));
if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ destroy_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31730,15 +31766,15 @@ check_flush_deps_err(void)
CACHE_ERROR("Unknown test case!")
} /* end switch */
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
if ( !pass ) CACHE_ERROR("takedown_cache failed")
- cache_ptr = NULL;
+ file_ptr = NULL;
} /* end for */
done:
- if(cache_ptr)
- takedown_cache(cache_ptr, FALSE, FALSE);
+ if(file_ptr)
+ takedown_cache(file_ptr, FALSE, FALSE);
if ( pass )
PASSED()
@@ -31768,9 +31804,9 @@ done:
static unsigned
check_flush_deps_order(void)
{
+ H5F_t * file_ptr = NULL; /* File for this test */
H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
- size_t entry_size = PICO_ENTRY_SIZE; /* 1 byte */
unsigned u; /* Local index variable */
struct expected_entry_status expected[5] =
{
@@ -31793,13 +31829,14 @@ check_flush_deps_order(void)
*/
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( !pass ) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
- insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
if ( !pass ) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
@@ -31820,10 +31857,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31853,7 +31890,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 1, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31863,7 +31900,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31893,7 +31930,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31917,10 +31954,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -31950,7 +31987,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 1, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -31958,8 +31995,8 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, TRUE);
- dirty_entry(cache_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, TRUE);
+ dirty_entry(file_ptr, entry_type, 1, FALSE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -31971,7 +32008,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31995,7 +32032,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32021,13 +32058,13 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0, 1 (children) & 2 (parent) */
{
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ create_flush_dependency(entry_type, 2, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32061,7 +32098,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 2, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32069,9 +32106,9 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, FALSE);
- dirty_entry(cache_ptr, entry_type, 1, FALSE);
- dirty_entry(cache_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, FALSE);
+ dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 2, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32085,7 +32122,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32112,10 +32149,10 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries 0, 1 (children) & 2 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ destroy_flush_dependency(entry_type, 2, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32143,13 +32180,13 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 1, 2 (children) & 0 (parent) */
{
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ create_flush_dependency(entry_type, 0, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32183,7 +32220,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 2, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32191,9 +32228,9 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, TRUE);
- dirty_entry(cache_ptr, entry_type, 1, FALSE);
- dirty_entry(cache_ptr, entry_type, 2, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, TRUE);
+ dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 2, FALSE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32207,7 +32244,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32234,10 +32271,10 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries 1, 2 (children) & 0 (parent) */
{
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ destroy_flush_dependency(entry_type, 0, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32265,10 +32302,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32288,10 +32325,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32311,10 +32348,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 3);
+ protect_entry(file_ptr, entry_type, 3);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ create_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32348,21 +32385,21 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 3, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32370,10 +32407,10 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, FALSE);
- dirty_entry(cache_ptr, entry_type, 1, TRUE);
- dirty_entry(cache_ptr, entry_type, 2, TRUE);
- dirty_entry(cache_ptr, entry_type, 3, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, FALSE);
+ dirty_entry(file_ptr, entry_type, 1, TRUE);
+ dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 3, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32389,7 +32426,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32420,7 +32457,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries, from the "top down" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ destroy_flush_dependency(entry_type, 3, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32439,7 +32476,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32458,7 +32495,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32484,10 +32521,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ create_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32507,10 +32544,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ create_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32533,10 +32570,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ create_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32576,21 +32613,21 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 3, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32598,10 +32635,10 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, TRUE);
- dirty_entry(cache_ptr, entry_type, 1, TRUE);
- dirty_entry(cache_ptr, entry_type, 2, TRUE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, TRUE);
+ dirty_entry(file_ptr, entry_type, 1, TRUE);
+ dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32617,7 +32654,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32649,7 +32686,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries, from the "bottom up" */
{
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ destroy_flush_dependency(entry_type, 2, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32674,7 +32711,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ destroy_flush_dependency(entry_type, 1, entry_type, 2);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32696,7 +32733,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ destroy_flush_dependency(entry_type, 0, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32720,11 +32757,11 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
for(u = 0; u < 4; u++) {
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ create_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32761,7 +32798,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 4, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32769,11 +32806,11 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, FALSE);
- dirty_entry(cache_ptr, entry_type, 1, FALSE);
- dirty_entry(cache_ptr, entry_type, 2, FALSE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
- dirty_entry(cache_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, FALSE);
+ dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 2, FALSE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 4, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32791,7 +32828,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32825,7 +32862,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries */
{
for(u = 0; u < 4; u++) {
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32857,11 +32894,11 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
for(u = 1; u < 5; u++) {
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, (int32_t)u);
+ create_flush_dependency(entry_type, 0, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32898,7 +32935,7 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 4, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -32906,11 +32943,11 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, TRUE);
- dirty_entry(cache_ptr, entry_type, 1, FALSE);
- dirty_entry(cache_ptr, entry_type, 2, FALSE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
- dirty_entry(cache_ptr, entry_type, 4, FALSE);
+ dirty_entry(file_ptr, entry_type, 0, TRUE);
+ dirty_entry(file_ptr, entry_type, 1, FALSE);
+ dirty_entry(file_ptr, entry_type, 2, FALSE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 4, FALSE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -32928,7 +32965,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32962,7 +32999,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries */
{
for(u = 1; u < 5; u++) {
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, (int32_t)u);
+ destroy_flush_dependency(entry_type, 0, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -32998,10 +33035,10 @@ check_flush_deps_order(void)
* then add entry 4 as a child of 0
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33021,10 +33058,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33044,10 +33081,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 0);
+ protect_entry(file_ptr, entry_type, 0);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ create_flush_dependency(entry_type, 0, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33086,21 +33123,21 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 4, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -33108,10 +33145,10 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1, 3 & 4 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, TRUE);
- dirty_entry(cache_ptr, entry_type, 1, TRUE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
- dirty_entry(cache_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, TRUE);
+ dirty_entry(file_ptr, entry_type, 1, TRUE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 4, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -33129,7 +33166,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33163,7 +33200,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries, detaching 3->4 from 0 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ destroy_flush_dependency(entry_type, 0, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33185,7 +33222,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33204,7 +33241,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33232,10 +33269,10 @@ check_flush_deps_order(void)
* then add entry 4 as a child of 1
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33255,10 +33292,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33278,10 +33315,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33301,7 +33338,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ create_flush_dependency(entry_type, 1, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33339,21 +33376,21 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 4, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -33361,11 +33398,11 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, FALSE);
- dirty_entry(cache_ptr, entry_type, 1, TRUE);
- dirty_entry(cache_ptr, entry_type, 2, TRUE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
- dirty_entry(cache_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, FALSE);
+ dirty_entry(file_ptr, entry_type, 1, TRUE);
+ dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 4, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -33383,7 +33420,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33419,7 +33456,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries, detaching 3->4 from 1 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ destroy_flush_dependency(entry_type, 1, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33440,7 +33477,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33459,7 +33496,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33478,7 +33515,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33506,10 +33543,10 @@ check_flush_deps_order(void)
* then add entry 4 as a child of 2
*/
{
- protect_entry(cache_ptr, entry_type, 1);
+ protect_entry(file_ptr, entry_type, 1);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ create_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33529,10 +33566,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 2);
+ protect_entry(file_ptr, entry_type, 2);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ create_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33552,10 +33589,10 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- protect_entry(cache_ptr, entry_type, 4);
+ protect_entry(file_ptr, entry_type, 4);
if ( !pass ) CACHE_ERROR("protect_entry failed")
- create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ create_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33575,7 +33612,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ create_flush_dependency(entry_type, 2, entry_type, 4);
if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33609,21 +33646,21 @@ check_flush_deps_order(void)
add_flush_op(entry_type, 4, FLUSH_OP__ORDER,
entry_type, 0, FALSE, (size_t)0, &flush_order);
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
FALSE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
- unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
FALSE, /* int32_t dirty */
@@ -33631,11 +33668,11 @@ check_flush_deps_order(void)
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
- dirty_entry(cache_ptr, entry_type, 0, FALSE);
- dirty_entry(cache_ptr, entry_type, 1, TRUE);
- dirty_entry(cache_ptr, entry_type, 2, TRUE);
- dirty_entry(cache_ptr, entry_type, 3, FALSE);
- dirty_entry(cache_ptr, entry_type, 4, TRUE);
+ dirty_entry(file_ptr, entry_type, 0, FALSE);
+ dirty_entry(file_ptr, entry_type, 1, TRUE);
+ dirty_entry(file_ptr, entry_type, 2, TRUE);
+ dirty_entry(file_ptr, entry_type, 3, FALSE);
+ dirty_entry(file_ptr, entry_type, 4, TRUE);
if ( !pass ) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
@@ -33653,7 +33690,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33689,7 +33726,7 @@ check_flush_deps_order(void)
/* Destroy flush dependency between entries, detaching 3->4 from 2 first */
{
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ destroy_flush_dependency(entry_type, 2, entry_type, 4);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33706,7 +33743,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ destroy_flush_dependency(entry_type, 4, entry_type, 3);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33725,7 +33762,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ destroy_flush_dependency(entry_type, 2, entry_type, 1);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33744,7 +33781,7 @@ check_flush_deps_order(void)
expected); /* struct expected_entry_staus[] */
if ( !pass ) CACHE_ERROR("verify_entry_status failed")
- destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ destroy_flush_dependency(entry_type, 1, entry_type, 0);
if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
@@ -33766,8 +33803,8 @@ check_flush_deps_order(void)
done:
- if(cache_ptr)
- takedown_cache(cache_ptr, FALSE, FALSE);
+ if(file_ptr)
+ takedown_cache(file_ptr, FALSE, FALSE);
if ( pass )
PASSED()
@@ -33796,11 +33833,11 @@ done:
static unsigned
check_notify_cb(void)
{
+ H5F_t * file_ptr = NULL; /* File for this test */
H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
test_entry_t *base_addr; /* Base address of entries for test */
test_entry_t * entry_ptr; /* Cache entry to examine/manipulate */
int entry_type = NOTIFY_ENTRY_TYPE; /* Use entry w/notify callback (size of entries doesn't matter) */
- size_t entry_size = NOTIFY_ENTRY_SIZE; /* 1 byte */
unsigned u; /* Local index variable */
struct expected_entry_status expected[5] =
{
@@ -33822,14 +33859,15 @@ check_notify_cb(void)
*/
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[entry_type];
if ( !pass ) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
- insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
if ( !pass ) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
@@ -33855,7 +33893,7 @@ check_notify_cb(void)
/* Remove entries from the cache */
for(u = 0; u < 5; u++) {
- expunge_entry(cache_ptr, entry_type, (int32_t)u);
+ expunge_entry(file_ptr, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("expunge_entry failed")
/* Change expected values, and verify the status of the entries
@@ -33883,7 +33921,7 @@ check_notify_cb(void)
/* Protect entries to bring them into the cache */
for(u = 0; u < 5; u++) {
- protect_entry(cache_ptr, entry_type, (int32_t)u);
+ protect_entry(file_ptr, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("protect_entry failed")
/* Change expected values, and verify the status of the entries
@@ -33911,7 +33949,7 @@ check_notify_cb(void)
/* Unprotect entries, evicting them from the cache */
for(u = 0; u < 5; u++) {
- unprotect_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
if ( !pass ) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
@@ -33938,7 +33976,7 @@ check_notify_cb(void)
/* Remove entries from the cache */
for(u = 0; u < 5; u++) {
- expunge_entry(cache_ptr, entry_type, (int32_t)u);
+ expunge_entry(file_ptr, entry_type, (int32_t)u);
if ( !pass ) CACHE_ERROR("expunge_entry failed")
/* Change expected values, and verify the status of the entries
@@ -33965,8 +34003,8 @@ check_notify_cb(void)
} /* end for */
done:
- if(cache_ptr)
- takedown_cache(cache_ptr, FALSE, FALSE);
+ if(file_ptr)
+ takedown_cache(file_ptr, FALSE, FALSE);
if ( pass )
PASSED()
diff --git a/test/cache_api.c b/test/cache_api.c
index ee17037..796e303 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -27,11 +27,6 @@
/* global variable declarations: */
-const char *FILENAME[] = {
- "cache_api",
- NULL
-};
-
/* macro definitions */
#define RESIZE_CONFIGS_ARE_EQUAL(a, b, compare_init) \
@@ -331,7 +326,7 @@ check_fapl_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -354,7 +349,7 @@ check_fapl_mdc_api_calls(void)
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -480,7 +475,7 @@ check_fapl_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -503,7 +498,7 @@ check_fapl_mdc_api_calls(void)
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -651,7 +646,7 @@ validate_mdc_config(hid_t file_id,
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -919,7 +914,7 @@ check_file_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -1123,7 +1118,7 @@ check_and_validate_cache_hit_rate(hid_t file_id,
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -1262,7 +1257,7 @@ check_and_validate_cache_size(hid_t file_id,
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -1525,7 +1520,7 @@ mdc_api_call_smoke_check(int express_test)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -3609,7 +3604,7 @@ check_file_mdc_api_errs(void)
HDfprintf(stdout, "%s: calling h5_fixname().\n", fcn_name);
}
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
diff --git a/test/cache_common.c b/test/cache_common.c
index c4e4fe9..335704d 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -19,18 +19,49 @@
* This file contains common code for tests of the cache
* implemented in H5C.c
*/
+#include "H5private.h" /* Put this first, so H5open() isn't invoked in public macros */
#include "h5test.h"
+#include "H5Cprivate.h"
#include "H5Iprivate.h"
-#include "H5ACprivate.h"
+#include "H5MFprivate.h"
#include "cache_common.h"
/* global variable declarations: */
+const char *FILENAME[] = {
+ "cache_test",
+ "cache_api_test",
+ NULL
+};
+
+hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between
+ * cache setup and takedown. Note
+ * that if saved_fapl_id == H5P_DEFAULT,
+ * we assume that there is no fapl to
+ * close.
+ */
+
+hid_t saved_fid = -1; /* store the file id here between cache setup
+ * and takedown.
+ */
+
+H5C_t * saved_cache = NULL; /* store the pointer to the instance of
+ * of H5C_t created by H5Fcreate()
+ * here between test cache setup and
+ * shutdown.
+ */
+
+haddr_t saved_actual_base_addr = HADDR_UNDEF; /* Store the address of the
+ space allocated for cache items in the file between
+ cache setup & takedown */
+
hbool_t write_permitted = TRUE;
hbool_t pass = TRUE; /* set to false on error */
hbool_t skip_long_tests = TRUE;
hbool_t run_full_test = TRUE;
+hbool_t try_core_file_driver = FALSE;
+hbool_t core_file_driver_failed = FALSE;
const char *failure_mssg = NULL;
test_entry_t pico_entries[NUM_PICO_ENTRIES], orig_pico_entries[NUM_PICO_ENTRIES];
@@ -266,6 +297,9 @@ static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
static herr_t size(H5F_t * f, void * thing, size_t * size_ptr);
static herr_t notify(H5C_notify_action_t action, void *thing);
+static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
+ struct flush_op *op_ptr, unsigned *flags_ptr);
+
@@ -647,8 +681,7 @@ destroy(H5F_t UNUSED * f,
if ( pinned_entry_ptr->pinning_ref_count <= 0 ) {
- unpin_entry(pinned_entry_ptr->cache_ptr,
- pinned_entry_ptr->type,
+ unpin_entry(pinned_entry_ptr->type,
pinned_entry_ptr->index);
}
@@ -806,7 +839,7 @@ flush(H5F_t *f,
for ( i = 0; i < entry_ptr->num_flush_ops; i++ )
{
- execute_flush_op(entry_ptr->cache_ptr,
+ execute_flush_op(f,
entry_ptr,
&((entry_ptr->flush_ops)[i]),
flags_ptr);
@@ -1363,7 +1396,7 @@ add_flush_op(int target_type,
*/
void
-create_pinned_entry_dependency(H5C_t * cache_ptr,
+create_pinned_entry_dependency(H5F_t * file_ptr,
int pinning_type,
int pinning_idx,
int pinned_type,
@@ -1407,8 +1440,8 @@ create_pinned_entry_dependency(H5C_t * cache_ptr,
if ( pinned_entry_ptr->pinning_ref_count == 0 ) {
- protect_entry(cache_ptr, pinned_type, pinned_idx);
- unprotect_entry(cache_ptr, pinned_type, pinned_idx, FALSE,
+ protect_entry(file_ptr, pinned_type, pinned_idx);
+ unprotect_entry(file_ptr, pinned_type, pinned_idx, FALSE,
H5C__PIN_ENTRY_FLAG);
}
@@ -1446,7 +1479,7 @@ create_pinned_entry_dependency(H5C_t * cache_ptr,
*/
void
-dirty_entry(H5C_t * cache_ptr,
+dirty_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty_pin)
@@ -1454,13 +1487,16 @@ dirty_entry(H5C_t * cache_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr;
- HDassert( cache_ptr );
+ HDassert( file_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
if ( pass ) {
if ( dirty_pin ) {
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+
+ HDassert(cache_ptr);
if ( ! entry_in_cache(cache_ptr, type, idx) ) {
@@ -1483,14 +1519,14 @@ dirty_entry(H5C_t * cache_ptr,
} else {
- mark_pinned_entry_dirty(cache_ptr, type, idx, FALSE, (size_t)0);
+ mark_pinned_entry_dirty(type, idx, FALSE, (size_t)0);
}
}
} else {
- protect_entry(cache_ptr, type, idx);
- unprotect_entry(cache_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, type, idx);
+ unprotect_entry(file_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET);
}
}
@@ -1520,11 +1556,15 @@ dirty_entry(H5C_t * cache_ptr,
*/
void
-execute_flush_op(H5C_t * cache_ptr,
+execute_flush_op(H5F_t * file_ptr,
struct test_entry_t * entry_ptr,
struct flush_op * op_ptr,
unsigned * flags_ptr)
{
+ H5C_t * cache_ptr;
+
+ HDassert( file_ptr ) ;
+ cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( entry_ptr != NULL );
@@ -1555,7 +1595,7 @@ execute_flush_op(H5C_t * cache_ptr,
HDassert( ( entry_ptr->type != op_ptr->type ) ||
( entry_ptr->index != op_ptr->idx ) );
- dirty_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
+ dirty_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
break;
case FLUSH_OP__RESIZE:
@@ -1586,7 +1626,7 @@ execute_flush_op(H5C_t * cache_ptr,
/* change the size of some other entry */
- resize_entry(cache_ptr, op_ptr->type, op_ptr->idx,
+ resize_entry(file_ptr, op_ptr->type, op_ptr->idx,
op_ptr->size, op_ptr->flag);
}
break;
@@ -1697,22 +1737,22 @@ reset_entries(void)
{
int i;
+ int32_t max_index;
+ test_entry_t * base_addr;
+ test_entry_t * orig_base_addr;
if( !orig_entry_arrays_init)
{
- haddr_t addr = 0;
+ haddr_t addr = PICO_BASE_ADDR;
haddr_t alt_addr = PICO_ALT_BASE_ADDR;
+ size_t entry_size;
for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
{
- int32_t max_index;
- size_t entry_size;
- test_entry_t * base_addr;
- test_entry_t * orig_base_addr;
int j;
- entry_size = entry_sizes[i];
max_index = max_indices[i];
+ entry_size = entry_sizes[i];
base_addr = entries[i];
orig_base_addr = orig_entries[i];
@@ -1809,9 +1849,9 @@ reset_entries(void)
else {
for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
{
- int32_t max_index = max_indices[i];
- test_entry_t * base_addr = entries[i];
- test_entry_t * orig_base_addr = orig_entries[i];
+ max_index = max_indices[i];
+ base_addr = entries[i];
+ orig_base_addr = orig_entries[i];
/* Make copy of entries in base_addr for later */
HDmemcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof( *base_addr ));
@@ -1851,7 +1891,7 @@ reset_entries(void)
*/
void
-resize_entry(H5C_t * cache_ptr,
+resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
@@ -1860,7 +1900,6 @@ resize_entry(H5C_t * cache_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr;
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( type == VARIABLE_ENTRY_TYPE );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -1876,6 +1915,9 @@ resize_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
if ( resize_pin ) {
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr );
if ( ! entry_in_cache(cache_ptr, type, idx) ) {
@@ -1891,14 +1933,13 @@ resize_entry(H5C_t * cache_ptr,
} else {
- mark_pinned_entry_dirty(cache_ptr, type, idx,
- TRUE, new_size);
+ mark_pinned_entry_dirty(type, idx, TRUE, new_size);
}
}
} else {
- protect_entry(cache_ptr, type, idx);
- unprotect_entry_with_size_change(cache_ptr, type, idx,
+ protect_entry(file_ptr, type, idx);
+ unprotect_entry_with_size_change(file_ptr, type, idx,
H5C__SIZE_CHANGED_FLAG, new_size);
}
}
@@ -1970,8 +2011,7 @@ resize_pinned_entry(H5C_t * cache_ptr,
entry_ptr->size = new_size;
- result = H5C_resize_pinned_entry(cache_ptr,
- (void *)entry_ptr,
+ result = H5C_resize_pinned_entry((void *)entry_ptr,
new_size);
if ( result != SUCCEED ) {
@@ -2488,38 +2528,267 @@ verify_unprotected(void)
* Programmer: John Mainzer
* 6/11/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-H5C_t *
+H5F_t *
setup_cache(size_t max_cache_size,
size_t min_clean_size)
{
+ const char * fcn_name = "setup_cache()";
+ char filename[512];
+ hbool_t show_progress = FALSE;
+ hbool_t verbose = TRUE;
+ int mile_stone = 1;
+ hid_t fid = -1;
+ haddr_t actual_base_addr;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
+ H5F_t * ret_val = NULL;
+ hid_t fapl_id = H5P_DEFAULT;
- cache_ptr = H5C_create(max_cache_size,
- min_clean_size,
- (NUMBER_OF_ENTRY_TYPES - 1),
- (const char **)entry_type_names,
- check_write_permitted,
- TRUE,
- NULL,
- NULL);
+ if ( show_progress ) /* 1 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
- if ( cache_ptr == NULL ) {
+ saved_fid = -1;
- pass = FALSE;
- failure_mssg = "H5C_create() returned NULL.";
+ /* setup the file name */
+ if ( pass ) {
- } else {
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
+ }
+
+ if ( show_progress ) /* 2 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( ( pass ) && ( try_core_file_driver ) ) {
+
+ if ( (fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
+ }
+ else if ( H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0 ) {
+
+ H5Pclose(fapl_id);
+ fapl_id = H5P_DEFAULT;
+ pass = FALSE;
+ failure_mssg = "H5P_set_fapl_core() failed.\n";
+ }
+ else if ( (fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id))
+ < 0 ) {
+
+ core_file_driver_failed = TRUE;
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", fcn_name);
+ }
+
+ } else {
+
+ saved_fapl_id = fapl_id;
+ }
+ }
+
+ if ( show_progress ) /* 3 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ /* if we either aren't using the core file driver, or a create
+ * with the core file driver failed, try again with a regular file.
+ * If this fails, we are cooked.
+ */
+ if ( ( pass ) && ( fid < 0 ) ) {
+
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+
+ saved_fid = fid;
+
+ if ( fid < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fcreate() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fcreate() failed.\n", fcn_name);
+ }
+ }
+ }
+
+ if ( show_progress ) /* 4 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ HDassert( fid >= 0 );
+
+ saved_fid = fid;
+
+ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fflush() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
+ }
+
+ } else {
+
+ file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
+
+ if ( file_ptr == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "Can't get file_ptr.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
+ }
+ }
+ }
+ }
+
+ if ( show_progress ) /* 5 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ /* A bit of fancy footwork here:
+ *
+ * The call to H5Fcreate() allocates an instance of H5C_t,
+ * initializes it, and stores its address in f->shared->cache.
+ *
+ * We don't want to use this cache, as it has a bunch of extra
+ * initialization that may change over time, and in any case
+ * it will not in general be configured the way we want it.
+ *
+ * We used to deal with this problem by storing the file pointer
+ * in another instance of H5C_t, and then ignoring the original
+ * version. However, this strategy doesn't work any more, as
+ * we can't store the file pointer in the instance of H5C_t,
+ * and we have modified many cache routines to use a file
+ * pointer to look up the target cache.
+ *
+ * Thus we now make note of the address of the instance of
+ * H5C_t created by the call to H5Fcreate(), set
+ * file_ptr->shared->cache to NULL, call H5C_create()
+ * to allocate a new instance of H5C_t for test purposes,
+ * and store than new instance's address in
+ * file_ptr->shared->cache.
+ *
+ * On shut down, we call H5C_dest on our instance of H5C_t,
+ * set file_ptr->shared->cache to point to the original
+ * instance, and then close the file normally.
+ */
+
+ HDassert( saved_cache == NULL );
+
+ saved_cache = file_ptr->shared->cache;
+
+ file_ptr->shared->cache = NULL;
+
+ cache_ptr = H5C_create(max_cache_size,
+ min_clean_size,
+ (NUMBER_OF_ENTRY_TYPES - 1),
+ (const char **)entry_type_names,
+ check_write_permitted,
+ TRUE,
+ NULL,
+ NULL);
+
+ file_ptr->shared->cache = cache_ptr;
+ }
+
+ if ( show_progress ) /* 6 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ if ( cache_ptr == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "H5C_create() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5C_create() failed.\n", fcn_name);
+ }
+
+ } else if ( cache_ptr->magic != H5C__H5C_T_MAGIC ) {
+
+ pass = FALSE;
+ failure_mssg = "Bad cache_ptr magic.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", fcn_name);
+ }
+ }
+ }
+
+ if ( show_progress ) /* 7 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) { /* allocate space for test entries */
+
+ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT,
+ (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
+
+ if ( actual_base_addr == HADDR_UNDEF ) {
+
+ pass = FALSE;
+ failure_mssg = "H5MF_alloc() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", fcn_name);
+ }
+
+ } else if ( actual_base_addr > BASE_ADDR ) {
+
+ /* If this happens, must increase BASE_ADDR so that the
+ * actual_base_addr is <= BASE_ADDR. This should only happen
+ * if the size of the superblock is increase.
+ */
+ pass = FALSE;
+ failure_mssg = "actual_base_addr > BASE_ADDR";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n",
+ fcn_name);
+ }
+ }
+
+ saved_actual_base_addr = actual_base_addr;
+ }
+
+ if ( show_progress ) /* 8 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ H5C_stats__reset(cache_ptr);
H5C_set_skip_flags(cache_ptr, TRUE, TRUE);
+
+ ret_val = file_ptr;
}
- return(cache_ptr);
+ if ( show_progress ) /* 9 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+ return(ret_val);
} /* setup_cache() */
@@ -2534,26 +2803,83 @@ setup_cache(size_t max_cache_size,
* Programmer: John Mainzer
* 6/11/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
-takedown_cache(H5C_t * cache_ptr,
+takedown_cache(H5F_t * file_ptr,
hbool_t dump_stats,
hbool_t dump_detailed_stats)
{
- HDassert(cache_ptr);
+ char filename[512];
- if ( pass ) {
+ if ( file_ptr != NULL ) {
+ H5C_t * cache_ptr = file_ptr->shared->cache;
if ( dump_stats ) {
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
+
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
+
+ H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT);
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+ }
+
+ }
- H5C_dest(NULL, -1, -1, cache_ptr);
+ if ( saved_fapl_id != H5P_DEFAULT ) {
+
+ H5Pclose(saved_fapl_id);
+ saved_fapl_id = H5P_DEFAULT;
+ }
+
+ if ( saved_fid != -1 ) {
+
+ if ( H5F_addr_defined(saved_actual_base_addr) ) {
+
+ if ( NULL == file_ptr ) {
+ file_ptr = (H5F_t *)H5I_object_verify(saved_fid, H5I_FILE);
+ HDassert ( file_ptr );
+ }
+
+ H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, saved_actual_base_addr,
+ (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
+ saved_actual_base_addr = HADDR_UNDEF;
+ }
+
+ if ( H5Fclose(saved_fid) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't close test file.";
+
+ } else {
+
+ saved_fid = -1;
+
+ }
+
+ if ( ( ! try_core_file_driver ) || ( core_file_driver_failed ) ) {
+
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
+
+ if ( HDremove(filename) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't delete test file.";
+
+ }
+ }
}
return;
@@ -2581,7 +2907,7 @@ takedown_cache(H5C_t * cache_ptr,
*/
void
-expunge_entry(H5C_t * cache_ptr,
+expunge_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
@@ -2591,8 +2917,12 @@ expunge_entry(H5C_t * cache_ptr,
test_entry_t * entry_ptr;
if ( pass ) {
+#ifndef NDEBUG
+ H5C_t * cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr );
+#endif /* NDEBUG */
+
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2608,8 +2938,8 @@ expunge_entry(H5C_t * cache_ptr,
HDassert( ! ( entry_ptr->header.is_pinned ) );
HDassert( ! ( entry_ptr->is_pinned ) );
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, H5AC__NO_FLAGS_SET);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -2641,29 +2971,32 @@ expunge_entry(H5C_t * cache_ptr,
*/
void
-flush_cache(H5C_t * cache_ptr,
+flush_cache(H5F_t * file_ptr,
hbool_t destroy_entries,
hbool_t dump_stats,
hbool_t dump_detailed_stats)
{
const char * fcn_name = "flush_cache()";
+ H5C_t * cache_ptr;
herr_t result = 0;
hbool_t verbose = FALSE;
- HDassert(cache_ptr);
-
verify_unprotected();
if ( pass ) {
+ HDassert(file_ptr);
+
+ cache_ptr = file_ptr->shared->cache;
+
if ( destroy_entries ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
} else {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__NO_FLAGS_SET);
}
}
@@ -2743,12 +3076,13 @@ flush_cache(H5C_t * cache_ptr,
*/
void
-insert_entry(H5C_t * cache_ptr,
+insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t UNUSED dirty,
unsigned int flags)
{
+ H5C_t * cache_ptr;
herr_t result;
hbool_t insert_pinned;
test_entry_t * base_addr;
@@ -2756,6 +3090,8 @@ insert_entry(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2772,8 +3108,8 @@ insert_entry(H5C_t * cache_ptr,
entry_ptr->is_dirty = TRUE;
- result = H5C_insert_entry(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr, flags);
+ result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -2845,8 +3181,7 @@ insert_entry(H5C_t * cache_ptr,
*/
void
-mark_pinned_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+mark_pinned_entry_dirty(int32_t type,
int32_t idx,
hbool_t size_changed,
size_t new_size)
@@ -2858,7 +3193,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2868,7 +3202,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( ! (entry_ptr->header.is_protected) );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->is_pinned );
@@ -2881,8 +3214,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
entry_ptr->size = new_size;
}
- result = H5C_mark_pinned_entry_dirty(cache_ptr,
- (void *)entry_ptr,
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
new_size);
@@ -2943,8 +3275,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
*/
void
-mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+mark_pinned_or_protected_entry_dirty(int32_t type,
int32_t idx)
{
/* const char * fcn_name = "mark_pinned_or_protected_entry_dirty()"; */
@@ -2954,7 +3285,6 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2964,14 +3294,12 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( entry_ptr->header.is_protected ||
entry_ptr->header.is_pinned );
entry_ptr->is_dirty = TRUE;
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr,
- (void *)entry_ptr);
+ result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( ( result < 0 )
||
@@ -3137,17 +3465,20 @@ rename_entry(H5C_t * cache_ptr,
*/
void
-protect_entry(H5C_t * cache_ptr,
+protect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
/* const char * fcn_name = "protect_entry()"; */
+ H5C_t * cache_ptr;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3160,9 +3491,8 @@ protect_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, NULL, NULL,
- H5C__NO_FLAGS_SET);
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -3234,17 +3564,20 @@ protect_entry(H5C_t * cache_ptr,
*/
void
-protect_entry_ro(H5C_t * cache_ptr,
+protect_entry_ro(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
/* const char * fcn_name = "protect_entry_ro()"; */
+ H5C_t *cache_ptr;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3259,9 +3592,8 @@ protect_entry_ro(H5C_t * cache_ptr,
( ( entry_ptr->is_read_only ) &&
( entry_ptr->ro_ref_count > 0 ) ) );
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, NULL, NULL,
- H5C__READ_ONLY_FLAG);
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, NULL, NULL, H5C__READ_ONLY_FLAG);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -3309,11 +3641,9 @@ protect_entry_ro(H5C_t * cache_ptr,
*/
void
-pin_entry(H5C_t * cache_ptr,
- int32_t type,
+pin_entry(int32_t type,
int32_t idx)
{
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3331,7 +3661,7 @@ pin_entry(H5C_t * cache_ptr,
HDassert( entry_ptr->is_protected );
HDassert( !(entry_ptr->pinned_from_client) );
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -3376,8 +3706,7 @@ pin_entry(H5C_t * cache_ptr,
*/
void
-unpin_entry(H5C_t * cache_ptr,
- int32_t type,
+unpin_entry(int32_t type,
int32_t idx)
{
/* const char * fcn_name = "unpin_entry()"; */
@@ -3387,7 +3716,6 @@ unpin_entry(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3397,13 +3725,12 @@ unpin_entry(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->header.pinned_from_client );
HDassert( entry_ptr->is_pinned );
HDassert( entry_ptr->pinned_from_client );
- result = H5C_unpin_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_unpin_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.pinned_from_client ) ||
@@ -3466,13 +3793,14 @@ unpin_entry(H5C_t * cache_ptr,
*/
void
-unprotect_entry(H5C_t * cache_ptr,
+unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
int dirty,
unsigned int flags)
{
/* const char * fcn_name = "unprotect_entry()"; */
+ H5C_t *cache_ptr;
herr_t result;
hbool_t pin_flag_set;
hbool_t unpin_flag_set;
@@ -3481,6 +3809,8 @@ unprotect_entry(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3508,9 +3838,9 @@ unprotect_entry(H5C_t * cache_ptr,
entry_ptr->is_dirty = (hbool_t)(entry_ptr->is_dirty || dirty);
}
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr,
- flags, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
+ (size_t)0);
if ( ( result < 0 ) ||
( ( entry_ptr->header.is_protected ) &&
@@ -3622,13 +3952,14 @@ unprotect_entry(H5C_t * cache_ptr,
*/
void
-unprotect_entry_with_size_change(H5C_t * cache_ptr,
+unprotect_entry_with_size_change(H5F_t * file_ptr,
int32_t type,
int32_t idx,
unsigned int flags,
size_t new_size)
{
const char * fcn_name = "unprotect_entry_with_size_change()";
+ H5C_t *cache_ptr;
herr_t result;
hbool_t dirty_flag_set;
hbool_t pin_flag_set;
@@ -3639,6 +3970,8 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3674,9 +4007,9 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
entry_ptr->size = new_size;
}
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr,
- flags, new_size);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
+ new_size);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -3763,7 +4096,7 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
*/
void
-row_major_scan_forward(H5C_t * cache_ptr,
+row_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -3779,19 +4112,25 @@ row_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "row_major_scan_forward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag >= 10 );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
- H5C_stats__reset(cache_ptr);
+ HDassert( lag >= 10 );
+
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) )
@@ -3813,7 +4152,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -3825,7 +4164,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1));
- protect_entry(cache_ptr, type, (idx + lag - 1));
+ protect_entry(file_ptr, type, (idx + lag - 1));
}
if ( ( pass ) && ( (idx + lag - 2) >= 0 ) &&
@@ -3835,7 +4174,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3856,7 +4195,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 3));
- protect_entry(cache_ptr, type, (idx + lag - 3));
+ protect_entry(file_ptr, type, (idx + lag - 3));
}
if ( ( pass ) && ( (idx + lag - 5) >= 0 ) &&
@@ -3866,7 +4205,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 5));
- unprotect_entry(cache_ptr, type, idx+lag-5, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3880,7 +4219,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 5));
- protect_entry_ro(cache_ptr, type, (idx + lag - 5));
+ protect_entry_ro(file_ptr, type, (idx + lag - 5));
}
if ( ( pass ) && ( (idx + lag - 6) >= 0 ) &&
@@ -3891,7 +4230,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 6));
- protect_entry_ro(cache_ptr, type, (idx + lag - 6));
+ protect_entry_ro(file_ptr, type, (idx + lag - 6));
}
if ( ( pass ) && ( (idx + lag - 7) >= 0 ) &&
@@ -3902,7 +4241,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 7));
- protect_entry_ro(cache_ptr, type, (idx + lag - 7));
+ protect_entry_ro(file_ptr, type, (idx + lag - 7));
}
if ( ( pass ) && ( (idx + lag - 7) >= 0 ) &&
@@ -3913,7 +4252,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 7));
- unprotect_entry(cache_ptr, type, (idx + lag - 7),
+ unprotect_entry(file_ptr, type, (idx + lag - 7),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3925,7 +4264,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 8));
- unprotect_entry(cache_ptr, type, (idx + lag - 8),
+ unprotect_entry(file_ptr, type, (idx + lag - 8),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3937,7 +4276,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 9));
- unprotect_entry(cache_ptr, type, (idx + lag - 9),
+ unprotect_entry(file_ptr, type, (idx + lag - 9),
FALSE, H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -3947,7 +4286,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx - lag + 2) >= 0 ) &&
@@ -3957,7 +4296,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3968,7 +4307,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1));
- protect_entry(cache_ptr, type, (idx - lag + 1));
+ protect_entry(file_ptr, type, (idx - lag + 1));
}
@@ -3980,36 +4319,36 @@ row_major_scan_forward(H5C_t * cache_ptr,
switch ( (idx - lag) %4 ) {
case 0: /* we just did an insert */
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
break;
case 1:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
} else {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
case 2: /* we just did an insrt */
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__DELETED_FLAG);
break;
case 3:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__DELETED_FLAG);
} else {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_destroys,
H5C__DELETED_FLAG);
}
@@ -4029,7 +4368,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
@@ -4075,7 +4414,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
*/
void
-hl_row_major_scan_forward(H5C_t * cache_ptr,
+hl_row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4085,7 +4424,8 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts)
{
const char * fcn_name = "hl_row_major_scan_forward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t i;
int32_t lag = 100;
@@ -4094,15 +4434,19 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 200 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 200 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) )
@@ -4121,7 +4465,7 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4134,12 +4478,12 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i, NO_CHANGE,
+ unprotect_entry(file_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
i--;
@@ -4175,17 +4519,11 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/12/04
*
- * Modifications:
- *
- * JRM -- 4/4/07
- * Added code supporting multiple read only protects.
- * Note that this increased the minimum lag to 10.
- *
*-------------------------------------------------------------------------
*/
void
-row_major_scan_backward(H5C_t * cache_ptr,
+row_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -4201,19 +4539,24 @@ row_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "row_major_scan_backward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s(): Entering.\n", fcn_name);
- HDassert( lag >= 10 );
+ if ( pass ) {
- type = NUMBER_OF_ENTRY_TYPES - 1;
+ cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr != NULL );
+ HDassert( lag >= 10 );
- if ( ( pass ) && ( reset_stats ) ) {
+ if ( reset_stats ) {
- H5C_stats__reset(cache_ptr);
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type >= 0 ) )
@@ -4230,7 +4573,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(cache_ptr, type, (idx - lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4242,7 +4585,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1));
- protect_entry(cache_ptr, type, (idx - lag + 1));
+ protect_entry(file_ptr, type, (idx - lag + 1));
}
if ( ( pass ) && ( (idx - lag + 2) >= 0 ) &&
@@ -4252,7 +4595,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -4273,7 +4616,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 3));
- protect_entry(cache_ptr, type, (idx - lag + 3));
+ protect_entry(file_ptr, type, (idx - lag + 3));
}
if ( ( pass ) && ( (idx - lag + 5) >= 0 ) &&
@@ -4283,7 +4626,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 5));
- unprotect_entry(cache_ptr, type, idx-lag+5, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -4297,7 +4640,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 5));
- protect_entry_ro(cache_ptr, type, (idx - lag + 5));
+ protect_entry_ro(file_ptr, type, (idx - lag + 5));
}
if ( ( pass ) && ( (idx - lag + 6) >= 0 ) &&
@@ -4308,7 +4651,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 6));
- protect_entry_ro(cache_ptr, type, (idx - lag + 6));
+ protect_entry_ro(file_ptr, type, (idx - lag + 6));
}
if ( ( pass ) && ( (idx - lag + 7) >= 0 ) &&
@@ -4319,7 +4662,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 7));
- protect_entry_ro(cache_ptr, type, (idx - lag + 7));
+ protect_entry_ro(file_ptr, type, (idx - lag + 7));
}
if ( ( pass ) && ( (idx - lag + 7) >= 0 ) &&
@@ -4330,7 +4673,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 7));
- unprotect_entry(cache_ptr, type, (idx - lag + 7),
+ unprotect_entry(file_ptr, type, (idx - lag + 7),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -4342,7 +4685,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 8));
- unprotect_entry(cache_ptr, type, (idx - lag + 8),
+ unprotect_entry(file_ptr, type, (idx - lag + 8),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -4354,7 +4697,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 9));
- unprotect_entry(cache_ptr, type, (idx - lag + 9),
+ unprotect_entry(file_ptr, type, (idx - lag + 9),
FALSE, H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -4364,7 +4707,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
@@ -4375,7 +4718,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -4386,7 +4729,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1));
- protect_entry(cache_ptr, type, (idx + lag - 1));
+ protect_entry(file_ptr, type, (idx + lag - 1));
}
@@ -4400,36 +4743,36 @@ row_major_scan_backward(H5C_t * cache_ptr,
case 0:
if ( (entries[type])[idx+lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
} else {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
case 1: /* we just did an insert */
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
break;
case 2:
if ( (entries[type])[idx + lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__DELETED_FLAG);
} else {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_destroys,
H5C__DELETED_FLAG);
}
break;
case 3: /* we just did an insrt */
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__DELETED_FLAG);
break;
@@ -4446,7 +4789,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
@@ -4492,7 +4835,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
*/
void
-hl_row_major_scan_backward(H5C_t * cache_ptr,
+hl_row_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4502,7 +4845,8 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts)
{
const char * fcn_name = "hl_row_major_scan_backward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
int32_t idx;
int32_t i;
int32_t lag = 100;
@@ -4511,15 +4855,19 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 200 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = NUMBER_OF_ENTRY_TYPES - 1;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 200 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type >= 0 ) )
@@ -4538,7 +4886,7 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4551,12 +4899,12 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i, NO_CHANGE,
+ unprotect_entry(file_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
i--;
@@ -4598,7 +4946,7 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
*/
void
-col_major_scan_forward(H5C_t * cache_ptr,
+col_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -4609,19 +4957,23 @@ col_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_forward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( lag > 5 );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = -lag;
@@ -4640,7 +4992,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4649,7 +5001,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx - lag) >= 0 ) &&
@@ -4658,7 +5010,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4704,7 +5056,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
*/
void
-hl_col_major_scan_forward(H5C_t * cache_ptr,
+hl_col_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4715,7 +5067,8 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_forward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t lag = 200;
int32_t i;
@@ -4724,15 +5077,19 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 500 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
+
+ cache_ptr = file_ptr->shared->cache;
- type = 0;
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 500 );
+ HDassert( max_index <= MAX_ENTRIES );
- if ( ( pass ) && ( reset_stats ) ) {
+ if ( reset_stats ) {
- H5C_stats__reset(cache_ptr);
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = 0;
@@ -4758,7 +5115,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(cache_ptr, type, i, dirty_inserts,
+ insert_entry(file_ptr, type, i, dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4767,7 +5124,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
}
if ( ( pass ) && ( i >= 0 ) &&
@@ -4776,7 +5133,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(file_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4820,7 +5177,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
*/
void
-col_major_scan_backward(H5C_t * cache_ptr,
+col_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -4831,6 +5188,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_backward()";
+ H5C_t * cache_ptr;
int mile_stone = 1;
int32_t type;
int32_t idx;
@@ -4838,11 +5196,18 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
+ if ( pass ) {
- if ( ( pass ) && ( reset_stats ) ) {
+ cache_ptr = file_ptr->shared->cache;
- H5C_stats__reset(cache_ptr);
+ HDassert( cache_ptr != NULL );
+
+ HDassert( lag > 5 );
+
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = MAX_ENTRIES + lag;
@@ -4865,7 +5230,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(cache_ptr, type, (idx - lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4874,7 +5239,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx + lag) >= 0 ) &&
@@ -4883,7 +5248,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4935,7 +5300,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
*/
void
-hl_col_major_scan_backward(H5C_t * cache_ptr,
+hl_col_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4946,7 +5311,8 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_backward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t lag = 50;
int32_t i;
@@ -4955,20 +5321,24 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 500 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 500 );
+ HDassert( max_index <= MAX_ENTRIES );
- local_max_index = MIN(max_index, MAX_ENTRIES);
+ local_max_index = MIN(max_index, MAX_ENTRIES);
- if ( ( pass ) && ( reset_stats ) ) {
+ if ( reset_stats ) {
- H5C_stats__reset(cache_ptr);
- }
+ H5C_stats__reset(cache_ptr);
+ }
- idx = local_max_index;
+ idx = local_max_index;
+ }
while ( ( pass ) && ( idx >= 0 ) )
{
@@ -4988,7 +5358,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(cache_ptr, type, i, dirty_inserts,
+ insert_entry(file_ptr, type, i, dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4997,7 +5367,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
}
if ( ( pass ) && ( i >= 0 ) &&
@@ -5006,7 +5376,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(file_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -5048,13 +5418,11 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
*/
void
-create_flush_dependency(H5C_t * cache_ptr,
- int32_t par_type,
+create_flush_dependency(int32_t par_type,
int32_t par_idx,
int32_t chd_type,
int32_t chd_idx)
{
- HDassert( cache_ptr );
HDassert( ( 0 <= par_type ) && ( par_type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= par_idx ) && ( par_idx <= max_indices[par_type] ) );
HDassert( ( 0 <= chd_type ) && ( chd_type < NUMBER_OF_ENTRY_TYPES ) );
@@ -5088,8 +5456,7 @@ create_flush_dependency(H5C_t * cache_ptr,
HDassert( chd_entry_ptr->type == chd_type );
HDassert( chd_entry_ptr == chd_entry_ptr->self );
- result = H5C_create_flush_dependency(cache_ptr, par_entry_ptr,
- chd_entry_ptr);
+ result = H5C_create_flush_dependency(par_entry_ptr, chd_entry_ptr);
if ( ( result < 0 ) ||
( !par_entry_ptr->header.is_pinned ) ||
@@ -5149,13 +5516,11 @@ create_flush_dependency(H5C_t * cache_ptr,
*/
void
-destroy_flush_dependency(H5C_t * cache_ptr,
- int32_t par_type,
+destroy_flush_dependency(int32_t par_type,
int32_t par_idx,
int32_t chd_type,
int32_t chd_idx)
{
- HDassert( cache_ptr );
HDassert( ( 0 <= par_type ) && ( par_type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= par_idx ) && ( par_idx <= max_indices[par_type] ) );
HDassert( ( 0 <= chd_type ) && ( chd_type < NUMBER_OF_ENTRY_TYPES ) );
@@ -5190,7 +5555,7 @@ destroy_flush_dependency(H5C_t * cache_ptr,
HDassert( chd_entry_ptr->flush_dep_height < par_entry_ptr->flush_dep_height );
HDassert( chd_entry_ptr == chd_entry_ptr->self );
- if ( H5C_destroy_flush_dependency(cache_ptr, par_entry_ptr, chd_entry_ptr) < 0 ) {
+ if ( H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0 ) {
pass = FALSE;
failure_mssg = "error in H5C_destroy_flush_dependency().";
} /* end if */
diff --git a/test/cache_common.h b/test/cache_common.h
index d150f2a..7f2af16 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -81,7 +81,11 @@
#define MAX_ENTRIES (10 * 1024)
-#define PICO_BASE_ADDR (haddr_t)0
+/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
+ * larger than the superblock.
+ */
+#define BASE_ADDR (haddr_t)1024
+#define PICO_BASE_ADDR BASE_ADDR
#define NANO_BASE_ADDR (haddr_t)(PICO_BASE_ADDR + \
(PICO_ENTRY_SIZE * NUM_PICO_ENTRIES))
#define MICRO_BASE_ADDR (haddr_t)(NANO_BASE_ADDR + \
@@ -125,6 +129,9 @@
(MONSTER_ENTRY_SIZE * NUM_MONSTER_ENTRIES))
#define NOTIFY_ALT_BASE_ADDR (haddr_t)(VARIABLE_ALT_BASE_ADDR + \
(VARIABLE_ENTRY_SIZE * NUM_VARIABLE_ENTRIES))
+#define MAX_ADDR (haddr_t)(NOTIFY_ALT_BASE_ADDR + \
+ (NOTIFY_ENTRY_SIZE * NUM_NOTIFY_ENTRIES))
+#define ADDR_SPACE_SIZE (haddr_t)(MAX_ADDR - BASE_ADDR)
#define MAX_PINS 8 /* Maximum number of entries that can be
* directly pinned by a single entry.
@@ -474,15 +481,15 @@ struct expected_entry_status
int entry_type;
int entry_index;
size_t size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t loaded;
- hbool_t cleared;
- hbool_t flushed;
- hbool_t destroyed;
+ unsigned char in_cache;
+ unsigned char at_main_addr;
+ unsigned char is_dirty;
+ unsigned char is_protected;
+ unsigned char is_pinned;
+ unsigned char loaded;
+ unsigned char cleared;
+ unsigned char flushed;
+ unsigned char destroyed;
int flush_dep_par_type; /* Entry type of flush dependency parent */
int flush_dep_par_idx; /* Index of flush dependency parent */
uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
@@ -644,29 +651,27 @@ haddr_t type_and_index_to_addr(int32_t type,
int32_t idx);
#endif
-void dirty_entry(H5C_t * cache_ptr,
+void dirty_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty_pin);
-void expunge_entry(H5C_t * cache_ptr,
+void expunge_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void insert_entry(H5C_t * cache_ptr,
+void insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty,
unsigned int flags);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_entry_dirty(int32_t type,
int32_t idx,
hbool_t size_changed,
size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_or_protected_entry_dirty(int32_t type,
int32_t idx);
void rename_entry(H5C_t * cache_ptr,
@@ -674,36 +679,30 @@ void rename_entry(H5C_t * cache_ptr,
int32_t idx,
hbool_t main_addr);
-void protect_entry(H5C_t * cache_ptr,
+void protect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void protect_entry_ro(H5C_t * cache_ptr,
+void protect_entry_ro(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void pin_entry(H5C_t * cache_ptr,
- int32_t type,
+void pin_entry(int32_t type,
int32_t idx);
hbool_t entry_in_cache(H5C_t * cache_ptr,
int32_t type,
int32_t idx);
-void create_pinned_entry_dependency(H5C_t * cache_ptr,
+void create_pinned_entry_dependency(H5F_t * file_ptr,
int pinning_type,
int pinning_idx,
int pinned_type,
int pinned_idx);
-void execute_flush_op(H5C_t * cache_ptr,
- struct test_entry_t * entry_ptr,
- struct flush_op * op_ptr,
- unsigned * flags_ptr);
-
void reset_entries(void);
-void resize_entry(H5C_t * cache_ptr,
+void resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
@@ -714,9 +713,9 @@ void resize_pinned_entry(H5C_t * cache_ptr,
int32_t idx,
size_t new_size);
-H5C_t * setup_cache(size_t max_cache_size, size_t min_clean_size);
+H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size);
-void row_major_scan_forward(H5C_t * cache_ptr,
+void row_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -731,7 +730,7 @@ void row_major_scan_forward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_forward(H5C_t * cache_ptr,
+void hl_row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -740,7 +739,7 @@ void hl_row_major_scan_forward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void row_major_scan_backward(H5C_t * cache_ptr,
+void row_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -755,7 +754,7 @@ void row_major_scan_backward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_backward(H5C_t * cache_ptr,
+void hl_row_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -764,7 +763,7 @@ void hl_row_major_scan_backward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void col_major_scan_forward(H5C_t * cache_ptr,
+void col_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -774,7 +773,7 @@ void col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_forward(H5C_t * cache_ptr,
+void hl_col_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -784,7 +783,7 @@ void hl_col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void col_major_scan_backward(H5C_t * cache_ptr,
+void col_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -794,7 +793,7 @@ void col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_backward(H5C_t * cache_ptr,
+void hl_col_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -804,26 +803,25 @@ void hl_col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void takedown_cache(H5C_t * cache_ptr,
+void takedown_cache(H5F_t * file_ptr,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void flush_cache(H5C_t * cache_ptr,
+void flush_cache(H5F_t * file_ptr,
hbool_t destroy_entries,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void unpin_entry(H5C_t * cache_ptr,
- int32_t type,
+void unpin_entry(int32_t type,
int32_t idx);
-void unprotect_entry(H5C_t * cache_ptr,
+void unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
int dirty,
unsigned int flags);
-void unprotect_entry_with_size_change(H5C_t * cache_ptr,
+void unprotect_entry_with_size_change(H5F_t * file_ptr,
int32_t type,
int32_t idx,
unsigned int flags,
@@ -838,14 +836,12 @@ void verify_entry_status(H5C_t * cache_ptr,
void verify_unprotected(void);
-void create_flush_dependency(H5C_t * cache_ptr,
- int32_t parent_type,
+void create_flush_dependency(int32_t parent_type,
int32_t parent_idx,
int32_t child_type,
int32_t child_idx);
-void destroy_flush_dependency(H5C_t * cache_ptr,
- int32_t parent_type,
+void destroy_flush_dependency(int32_t parent_type,
int32_t parent_idx,
int32_t child_type,
int32_t child_idx);
diff --git a/test/lheap.c b/test/lheap.c
index df41315..52af202 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -104,7 +104,7 @@ main(void)
goto error;
}
}
- if(H5HL_unprotect(f, heap) < 0) {
+ if(H5HL_unprotect(heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -151,7 +151,7 @@ main(void)
goto error;
}
- if(H5HL_unprotect(f, heap) < 0) {
+ if(H5HL_unprotect(heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 7fb7100..5b0e187 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -360,19 +360,14 @@ void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
void lock_and_unlock_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int min_idx, int max_idx);
void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t size_changed, size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx);
+void mark_pinned_entry_dirty(int32_t idx, hbool_t size_changed, size_t new_size);
+void mark_pinned_or_protected_entry_dirty(int32_t idx);
void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
hbool_t global, hbool_t dirty);
-void pin_protected_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t global);
+void pin_protected_entry(int32_t idx, hbool_t global);
void rename_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int32_t old_idx, int32_t new_idx);
-void resize_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, size_t new_size);
+void resize_entry(int32_t idx, size_t new_size);
hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr);
void setup_rand(void);
@@ -2227,7 +2222,7 @@ expunge_entry(H5C_t * cache_ptr,
HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE );
HDassert( ! ((entry_ptr->header).is_dirty) );
- result = H5C_get_entry_status(cache_ptr, entry_ptr->base_addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -2740,7 +2735,7 @@ lock_entry(H5C_t * cache_ptr,
HDassert( ! (entry_ptr->locked) );
- cache_entry_ptr = H5AC_protect(file_ptr, -1, &(types[0]),
+ cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, -1, &(types[0]),
entry_ptr->base_addr,
NULL, NULL, H5AC_WRITE);
@@ -2786,9 +2781,7 @@ lock_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+mark_pinned_entry_dirty(int32_t idx,
hbool_t size_changed,
size_t new_size)
{
@@ -2798,8 +2791,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2811,8 +2802,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_entry_dirty(file_ptr,
- (void *)entry_ptr,
+ result = H5AC_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
new_size);
@@ -2854,9 +2844,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx)
+mark_pinned_or_protected_entry_dirty(int32_t idx)
{
const char * fcn_name = "mark_pinned_or_protected_entry_dirty()";
herr_t result;
@@ -2864,8 +2852,6 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2876,8 +2862,7 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_or_protected_entry_dirty(file_ptr,
- (void *)entry_ptr);
+ result = H5AC_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( result < 0 ) {
@@ -2991,17 +2976,13 @@ pin_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-pin_protected_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+pin_protected_entry(int32_t idx,
hbool_t global)
{
const char * fcn_name = "pin_protected_entry()";
herr_t result;
struct datum * entry_ptr;
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3011,7 +2992,7 @@ pin_protected_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- result = H5AC_pin_protected_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_pin_protected_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.type != &(types[0]) ) ||
@@ -3180,9 +3161,7 @@ rename_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-resize_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+resize_entry(int32_t idx,
size_t new_size)
{
const char * fcn_name = "resize_entry()";
@@ -3191,8 +3170,6 @@ resize_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3208,8 +3185,7 @@ resize_entry(H5C_t * cache_ptr,
HDassert( new_size > 0 );
HDassert( new_size <= entry_ptr->len );
- result = H5AC_resize_pinned_entry(file_ptr, (void *)entry_ptr,
- new_size);
+ result = H5AC_resize_pinned_entry((void *)entry_ptr, new_size);
if ( result < 0 ) {
@@ -3295,7 +3271,7 @@ setup_cache_for_test(hid_t * fid_ptr,
world_mpi_rank, fcn_name);
}
} else {
- file_ptr = H5I_object_verify(fid, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
}
if ( file_ptr == NULL ) {
@@ -3778,12 +3754,11 @@ unpin_entry(H5C_t * cache_ptr,
if ( dirty ) {
- mark_pinned_entry_dirty(cache_ptr, file_ptr, idx, FALSE,
- (size_t)0);
+ mark_pinned_entry_dirty(idx, FALSE, (size_t)0);
}
- result = H5AC_unpin_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_unpin_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -5227,7 +5202,7 @@ smoke_check_5(void)
if ( i % 2 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
@@ -5259,23 +5234,21 @@ smoke_check_5(void)
{
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len / 2);
+ resize_entry(i, data[i].len / 2);
}
if ( i % 4 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
else
{
- mark_pinned_entry_dirty(cache_ptr, file_ptr, i,
- FALSE, (size_t)0);
+ mark_pinned_entry_dirty(i, FALSE, (size_t)0);
}
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len);
+ resize_entry(i, data[i].len);
}
}
@@ -5541,22 +5514,22 @@ trace_file_check(void)
insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 0);
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, 0);
+ mark_pinned_or_protected_entry_dirty(0);
unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 1);
- pin_protected_entry(cache_ptr, file_ptr, 1, TRUE);
+ pin_protected_entry(1, TRUE);
unlock_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET);
unpin_entry(cache_ptr, file_ptr, 1, TRUE, FALSE, FALSE);
expunge_entry(cache_ptr,file_ptr, 1);
lock_entry(cache_ptr, file_ptr, 2);
- pin_protected_entry(cache_ptr, file_ptr, 2, TRUE);
+ pin_protected_entry(2, TRUE);
unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
- mark_pinned_entry_dirty(cache_ptr, file_ptr, 2, FALSE, 0);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len / 2);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len);
+ mark_pinned_entry_dirty(2, FALSE, 0);
+ resize_entry(2, data[2].len / 2);
+ resize_entry(2, data[2].len);
unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE);
rename_entry(cache_ptr, file_ptr, 0, 20);