summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-27 16:33:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-27 16:33:16 (GMT)
commit581d57ba7b2a673d118facdde3adcd32d60eb4dc (patch)
tree81d5b4cb00ce1dda58976cb06a11e9dc2ec30dd4 /test
parentf5c061aa2160fb4903ba9d41ec1b050033550e10 (diff)
downloadhdf5-581d57ba7b2a673d118facdde3adcd32d60eb4dc.zip
hdf5-581d57ba7b2a673d118facdde3adcd32d60eb4dc.tar.gz
hdf5-581d57ba7b2a673d118facdde3adcd32d60eb4dc.tar.bz2
[svn-r18172] Description:
Bring r18171 from trunk to 1.8 branch (with appropriate tweaks): Bring r18169 from 'merge_metadata_journaling' branch back to trunk: Converge changes on metadata_journaling branch and trunk: - Remove H5F_t* parameter from H5HL_unprotect() - Remove H5F_t* parameter from H5HL_dirty() - Remove H5F_t* parameter from H5O_unprotect() - Bring changes to metadata caching routines back: - H5AC_pin_protected_entry() - H5AC_resize_pinned_entry() - H5AC_unpin_entry() - H5AC_mark_pinned_entry_dirty() - H5AC_mark_pinned_or_protected_entry_dirty() - Revise internal H5C routines to drop H5F_t* and/or H5C_t* as parameter where possible - Revise tests to follow internal routine changes Also, other minor changes to speedup the 'cache' test. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
Diffstat (limited to 'test')
-rw-r--r--test/cache.c2448
-rw-r--r--test/cache_api.c25
-rw-r--r--test/cache_common.c998
-rw-r--r--test/cache_common.h98
-rw-r--r--test/lheap.c4
5 files changed, 2005 insertions, 1568 deletions
diff --git a/test/cache.c b/test/cache.c
index 46936f8..6afe9e2 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);
@@ -163,7 +164,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");
@@ -185,14 +186,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,
@@ -211,7 +212,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,
@@ -230,7 +231,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,
@@ -251,7 +252,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);
@@ -260,7 +261,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,
@@ -276,7 +277,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);
@@ -285,7 +286,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,
@@ -299,7 +300,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",
@@ -354,7 +355,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");
@@ -376,14 +377,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,
@@ -402,7 +403,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,
@@ -421,7 +422,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,
@@ -442,7 +443,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);
@@ -451,7 +452,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,
@@ -467,7 +468,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);
@@ -476,7 +477,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,
@@ -490,7 +491,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",
@@ -544,7 +545,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");
@@ -566,14 +567,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,
@@ -592,7 +593,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,
@@ -611,7 +612,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,
@@ -632,7 +633,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);
@@ -641,7 +642,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,
@@ -657,7 +658,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);
@@ -666,7 +667,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,
@@ -680,7 +681,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",
@@ -735,7 +736,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");
@@ -757,14 +758,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,
@@ -783,7 +784,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,
@@ -802,7 +803,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,
@@ -823,7 +824,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);
@@ -832,7 +833,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,
@@ -848,7 +849,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);
@@ -857,7 +858,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,
@@ -871,7 +872,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",
@@ -926,6 +927,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 =
{
@@ -1004,8 +1006,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 ) {
@@ -1022,7 +1025,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,
@@ -1035,7 +1038,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,
@@ -1048,7 +1051,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,
@@ -1063,7 +1066,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);
@@ -1072,7 +1075,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,
@@ -1088,7 +1091,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);
@@ -1097,7 +1100,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,
@@ -1111,7 +1114,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",
@@ -1166,6 +1169,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 =
{
@@ -1241,8 +1245,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 ) {
@@ -1259,7 +1264,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,
@@ -1272,7 +1277,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,
@@ -1285,7 +1290,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,
@@ -1300,7 +1305,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);
@@ -1309,7 +1314,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,
@@ -1325,7 +1330,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);
@@ -1334,7 +1339,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,
@@ -1348,7 +1353,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",
@@ -1403,6 +1408,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 =
{
@@ -1479,8 +1485,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 ) {
@@ -1497,7 +1504,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,
@@ -1510,7 +1517,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,
@@ -1523,7 +1530,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,
@@ -1538,7 +1545,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);
@@ -1547,7 +1554,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,
@@ -1563,7 +1570,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);
@@ -1572,7 +1579,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,
@@ -1586,7 +1593,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",
@@ -1641,6 +1648,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 =
{
@@ -1717,8 +1725,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 ) {
@@ -1735,7 +1743,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,
@@ -1748,7 +1756,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,
@@ -1761,7 +1769,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,
@@ -1776,7 +1784,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);
@@ -1785,7 +1793,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,
@@ -1801,7 +1809,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);
@@ -1810,7 +1818,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,
@@ -1824,7 +1832,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",
@@ -1882,6 +1890,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");
@@ -1904,8 +1913,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 */
@@ -1928,7 +1938,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,
@@ -1964,7 +1974,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,
@@ -1998,7 +2008,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,
@@ -2034,7 +2044,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);
@@ -2058,7 +2068,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,
@@ -2074,7 +2084,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);
@@ -2098,7 +2108,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,
@@ -2128,7 +2138,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",
@@ -2186,6 +2196,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");
@@ -2208,14 +2219,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,
@@ -2249,7 +2261,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,
@@ -2283,7 +2295,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,
@@ -2319,7 +2331,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);
@@ -2343,7 +2355,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,
@@ -2374,7 +2386,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);
@@ -2398,7 +2410,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,
@@ -2427,7 +2439,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",
@@ -2479,7 +2491,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 */
@@ -2499,14 +2511,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,
@@ -2527,7 +2539,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,
@@ -2548,7 +2560,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,
@@ -2569,7 +2581,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);
@@ -2578,7 +2590,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,
@@ -2594,7 +2606,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,
@@ -2610,7 +2622,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",
@@ -2673,6 +2685,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;
@@ -2697,18 +2710,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));
}
@@ -2722,14 +2734,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);
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5AC_get_entry_status() reports failure.";
+ failure_mssg = "H5C_get_entry_status() reports failure.";
}
if ( pass ) {
@@ -2765,7 +2777,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.
*/
@@ -2920,13 +2932,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(); }
@@ -2963,7 +2975,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");
@@ -2983,7 +2995,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));
}
@@ -2999,7 +3011,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.
@@ -3014,7 +3026,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__single_entry(cache_ptr);
+ check_flush_cache__single_entry(file_ptr);
}
if ( pass ) {
@@ -3025,7 +3037,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__multi_entry(cache_ptr);
+ check_flush_cache__multi_entry(file_ptr);
}
if ( pass ) {
@@ -3036,7 +3048,7 @@ check_flush_cache(void)
fcn_name);
}
- check_flush_cache__flush_ops(cache_ptr);
+ check_flush_cache__flush_ops(file_ptr);
}
if ( pass ) {
@@ -3047,7 +3059,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(); }
@@ -3080,9 +3092,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 ) {
@@ -3104,7 +3117,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 ) {
@@ -3115,7 +3129,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 ) {
@@ -3127,7 +3141,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 ) {
@@ -3140,7 +3154,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 ) {
@@ -3173,9 +3187,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 ) {
@@ -3294,7 +3309,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);
}
@@ -3404,7 +3419,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);
}
@@ -3514,7 +3529,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);
}
@@ -3624,7 +3639,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);
}
@@ -3735,7 +3750,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);
}
@@ -3846,7 +3861,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);
}
@@ -3957,7 +3972,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);
}
@@ -4069,7 +4084,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);
}
@@ -4183,7 +4198,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);
}
@@ -4350,7 +4365,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);
}
@@ -4496,7 +4511,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);
}
@@ -4633,7 +4648,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);
}
@@ -4779,7 +4794,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);
}
@@ -4922,7 +4937,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);
}
@@ -4947,13 +4962,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;
@@ -5018,14 +5034,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);
}
@@ -5036,7 +5052,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 ) {
@@ -5113,7 +5129,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 ) {
@@ -5171,13 +5187,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;
@@ -5245,14 +5262,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);
}
@@ -5260,7 +5277,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],
@@ -5272,7 +5289,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 ) {
@@ -5349,7 +5367,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 ) {
@@ -5413,9 +5431,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 ) {
@@ -5521,7 +5540,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,
@@ -5629,7 +5648,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,
@@ -5706,7 +5725,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,
@@ -5785,7 +5804,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,
@@ -5865,7 +5884,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,
@@ -5893,7 +5912,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,
@@ -5977,7 +5996,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,
@@ -6010,7 +6029,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,
@@ -6091,7 +6110,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,
@@ -6119,7 +6138,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,
@@ -6203,7 +6222,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,
@@ -6236,7 +6255,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,
@@ -6333,7 +6352,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,
@@ -6431,7 +6450,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,
@@ -6528,7 +6547,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,
@@ -6625,7 +6644,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,
@@ -6722,7 +6741,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,
@@ -6750,7 +6769,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,
@@ -6851,7 +6870,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,
@@ -6887,7 +6906,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,
@@ -7106,7 +7125,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,
@@ -7377,7 +7396,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,
@@ -7647,7 +7666,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,
@@ -7784,7 +7803,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,
@@ -7918,7 +7937,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,
@@ -8349,7 +8368,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,
@@ -8786,7 +8805,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,
@@ -8977,7 +8996,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,
@@ -9170,7 +9189,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,
@@ -9186,7 +9205,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;
@@ -9210,7 +9229,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,
@@ -9223,6 +9242,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;
@@ -9362,7 +9382,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 {
@@ -9376,7 +9396,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 ) {
@@ -9389,14 +9409,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],
@@ -9438,7 +9458,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 ) {
@@ -9660,7 +9681,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 ) {
@@ -9768,7 +9789,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;
@@ -9776,6 +9797,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] =
@@ -9894,40 +9916,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 ) ||
@@ -9946,15 +9968,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:
@@ -10029,15 +10051,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);
}
@@ -10104,8 +10126,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 ) ||
@@ -10170,8 +10192,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 ) ||
@@ -10243,12 +10265,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 */
@@ -10284,15 +10306,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);
}
@@ -10351,8 +10373,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);
}
@@ -10413,8 +10435,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);
}
@@ -10479,8 +10501,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);
}
@@ -10515,15 +10537,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);
}
@@ -10626,8 +10648,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);
}
@@ -10659,15 +10681,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);
}
@@ -10753,8 +10775,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);
}
@@ -10784,8 +10806,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 ) {
@@ -10921,10 +10943,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 ) {
@@ -10946,7 +10969,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,
@@ -10973,7 +10996,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,
@@ -11000,7 +11023,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,
@@ -11027,7 +11050,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,
@@ -11054,7 +11077,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,
@@ -11081,7 +11104,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,
@@ -11108,7 +11131,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,
@@ -11135,7 +11158,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,
@@ -11162,7 +11185,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,
@@ -11190,7 +11213,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,
@@ -11218,7 +11241,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,
@@ -11246,7 +11269,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,
@@ -11274,7 +11297,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,
@@ -11302,7 +11325,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,
@@ -11330,7 +11353,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,
@@ -11359,7 +11382,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,
@@ -11388,7 +11411,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,
@@ -11415,7 +11438,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,
@@ -11442,7 +11465,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,
@@ -11469,7 +11492,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,
@@ -11496,7 +11519,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,
@@ -11523,7 +11546,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,
@@ -11550,7 +11573,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,
@@ -11577,7 +11600,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,
@@ -11604,7 +11627,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,
@@ -11632,7 +11655,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,
@@ -11660,7 +11683,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,
@@ -11688,7 +11711,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,
@@ -11716,7 +11739,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,
@@ -11744,7 +11767,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,
@@ -11772,7 +11795,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,
@@ -11801,7 +11824,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,
@@ -11830,7 +11853,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,
@@ -11857,7 +11880,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,
@@ -11884,7 +11907,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,
@@ -11911,7 +11934,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,
@@ -11938,7 +11961,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,
@@ -11965,7 +11988,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,
@@ -11992,7 +12015,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,
@@ -12019,7 +12042,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,
@@ -12046,7 +12069,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,
@@ -12074,7 +12097,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,
@@ -12102,7 +12125,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,
@@ -12130,7 +12153,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,
@@ -12158,7 +12181,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,
@@ -12186,7 +12209,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,
@@ -12214,7 +12237,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,
@@ -12243,7 +12266,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,
@@ -12272,7 +12295,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,
@@ -12299,7 +12322,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,
@@ -12326,7 +12349,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,
@@ -12353,7 +12376,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,
@@ -12380,7 +12403,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,
@@ -12407,7 +12430,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,
@@ -12434,7 +12457,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,
@@ -12461,7 +12484,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,
@@ -12488,7 +12511,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,
@@ -12516,7 +12539,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,
@@ -12544,7 +12567,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,
@@ -12572,7 +12595,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,
@@ -12600,7 +12623,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,
@@ -12628,7 +12651,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,
@@ -12656,7 +12679,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,
@@ -12685,7 +12708,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,
@@ -13059,7 +13082,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,
@@ -13099,7 +13122,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,
@@ -13113,6 +13136,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;
@@ -13152,20 +13176,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 ) {
@@ -13228,7 +13252,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 ) {
@@ -13286,7 +13310,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,
@@ -13302,6 +13326,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;
@@ -13340,35 +13365,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 ) {
@@ -13431,21 +13454,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 ) {
@@ -13505,7 +13528,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;
@@ -13517,7 +13540,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];
@@ -13530,14 +13553,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);
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 ) {
@@ -13548,20 +13571,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);
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 ) {
@@ -13572,18 +13595,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);
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 ) {
@@ -13594,18 +13617,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);
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 ) {
@@ -13616,18 +13639,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);
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 ) {
@@ -13638,18 +13661,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);
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 ) {
@@ -13662,7 +13685,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(); }
@@ -13706,7 +13729,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;
@@ -13718,7 +13741,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];
@@ -13731,7 +13754,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);
@@ -13739,7 +13762,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 ) {
@@ -13766,22 +13789,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);
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 ) {
@@ -13808,7 +13831,7 @@ check_expunge_entry(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, 0, 0);
+ expunge_entry(file_ptr, 0, 0);
}
@@ -13818,14 +13841,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);
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 ) {
@@ -13859,7 +13882,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);
@@ -13867,7 +13890,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 ) {
@@ -13894,15 +13917,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);
@@ -13910,7 +13933,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 ) {
@@ -13937,7 +13960,7 @@ check_expunge_entry(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, 0, 1);
+ expunge_entry(file_ptr, 0, 1);
}
@@ -13947,7 +13970,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);
@@ -13955,7 +13978,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 ) {
@@ -13978,7 +14001,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(); }
@@ -14011,12 +14034,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;
@@ -14049,8 +14071,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]);
@@ -14075,7 +14098,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 ) ) ||
@@ -14098,7 +14121,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 ) ) ||
@@ -14121,7 +14144,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 ) ) ||
@@ -14144,7 +14167,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 ) ) ||
@@ -14167,7 +14190,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 ) ) ||
@@ -14190,7 +14213,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 ) ) ||
@@ -14213,7 +14236,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 ) ) ||
@@ -14236,7 +14259,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 ) ||
@@ -14264,7 +14287,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 ) ||
@@ -14287,7 +14310,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 ) ||
@@ -14319,36 +14342,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";
@@ -14366,9 +14389,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 ) ) {
@@ -14378,12 +14401,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
@@ -14399,7 +14422,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(); }
@@ -14437,7 +14460,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] =
{
{
@@ -14499,20 +14522,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(); }
@@ -14548,11 +14571,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;
@@ -14587,9 +14611,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);
@@ -14634,7 +14658,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 {
@@ -14688,7 +14712,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;
@@ -14705,18 +14729,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 ) {
@@ -14737,11 +14761,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(); }
@@ -14787,6 +14811,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;
@@ -14830,8 +14855,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]);
@@ -14852,7 +14878,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
if ( pass ) {
@@ -14871,7 +14897,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14879,7 +14905,7 @@ check_resize_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 || is_dirty || !is_protected || is_pinned ) {
@@ -14902,11 +14928,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 ) {
@@ -14941,7 +14965,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14949,7 +14973,7 @@ check_resize_entry(void)
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 ||
@@ -14971,15 +14995,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 ) {
@@ -15014,7 +15036,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15022,7 +15044,7 @@ check_resize_entry(void)
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 ||
@@ -15044,14 +15066,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 ) {
@@ -15079,15 +15100,15 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
- &reported_entry_size, &in_cache,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
+ &reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
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 ||
@@ -15111,8 +15132,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 ) {
@@ -15140,7 +15160,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15148,7 +15168,7 @@ check_resize_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 ||
@@ -15170,14 +15190,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);
@@ -15185,7 +15205,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 ) {
@@ -15240,14 +15260,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 ) {
@@ -15264,7 +15284,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
if ( pass ) {
@@ -15283,7 +15303,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15291,7 +15311,7 @@ check_resize_entry(void)
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 ) {
@@ -15314,11 +15334,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 ) {
@@ -15355,7 +15373,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15363,7 +15381,7 @@ check_resize_entry(void)
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 ||
@@ -15385,15 +15403,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 ) {
@@ -15428,7 +15444,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15436,7 +15452,7 @@ check_resize_entry(void)
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 ||
@@ -15458,14 +15474,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 ) {
@@ -15495,7 +15510,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15503,7 +15518,7 @@ check_resize_entry(void)
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 ||
@@ -15527,8 +15542,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 ) {
@@ -15556,7 +15570,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -15564,7 +15578,7 @@ check_resize_entry(void)
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 ||
@@ -15586,14 +15600,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);
@@ -15601,7 +15615,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 ) {
@@ -15636,14 +15650,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 ) {
@@ -15662,7 +15676,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(); }
@@ -15707,6 +15721,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;
@@ -15759,8 +15774,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];
}
@@ -15809,8 +15825,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);
}
@@ -15840,8 +15856,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 */
@@ -15872,14 +15888,14 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[0]);
- 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);
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 ) {
@@ -15905,7 +15921,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",
@@ -15935,14 +15951,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);
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 ) {
@@ -16005,8 +16021,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 */
@@ -16034,7 +16050,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",
@@ -16078,8 +16094,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 */
@@ -16107,8 +16123,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 */
@@ -16142,14 +16158,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);
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 ) {
@@ -16178,14 +16194,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);
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 ) {
@@ -16230,8 +16246,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);
@@ -16277,7 +16293,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",
@@ -16307,14 +16323,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);
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 ) {
@@ -16358,7 +16374,7 @@ check_evictions_enabled(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) /* 34 */
@@ -16398,7 +16414,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");
@@ -16413,30 +16429,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);
}
}
}
@@ -16471,11 +16487,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");
@@ -16490,28 +16508,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(); }
@@ -16547,7 +16581,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");
@@ -16562,27 +16596,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(); }
@@ -16619,7 +16668,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;
@@ -16636,19 +16685,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 ) {
@@ -16657,9 +16705,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);
}
}
}
@@ -16698,6 +16746,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;
@@ -16716,12 +16765,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]);
@@ -16754,7 +16804,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(); }
@@ -16793,7 +16843,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");
@@ -16810,23 +16860,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 ) {
@@ -16836,13 +16886,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(); }
@@ -16881,7 +16931,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");
@@ -16900,19 +16950,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 ) {
@@ -16922,13 +16972,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 ) {
@@ -16941,7 +16991,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(); }
@@ -16980,7 +17030,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");
@@ -17003,19 +17053,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 ) {
@@ -17025,17 +17075,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 ) {
@@ -17045,14 +17095,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(); }
@@ -17093,7 +17143,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;
@@ -17110,19 +17160,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 ) {
@@ -17133,12 +17182,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(); }
@@ -17183,7 +17232,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");
@@ -17199,21 +17248,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 ) {
@@ -17225,7 +17274,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(); }
@@ -17273,7 +17322,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");
@@ -17296,22 +17345,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 ) {
@@ -17321,14 +17369,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 ) {
@@ -17341,8 +17388,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 ) {
@@ -17355,7 +17401,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(); }
@@ -17394,7 +17440,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");
@@ -17417,19 +17463,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 ) {
@@ -17439,15 +17485,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 ) {
@@ -17457,15 +17503,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 ) {
@@ -17479,7 +17525,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(); }
@@ -17518,7 +17564,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");
@@ -17540,18 +17586,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 ) {
@@ -17561,14 +17607,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 ) {
@@ -17578,14 +17624,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(); }
@@ -17624,7 +17670,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");
@@ -17640,19 +17686,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 ) {
@@ -17664,13 +17710,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
@@ -17683,20 +17729,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 ) {
@@ -17708,14 +17754,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(); }
@@ -17753,7 +17799,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;
@@ -17771,18 +17817,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 ) {
@@ -17793,12 +17839,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(); }
@@ -17838,6 +17884,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");
@@ -17861,8 +17908,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 ) {
@@ -17908,7 +17956,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 ) {
@@ -17926,7 +17974,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;
@@ -17935,7 +17983,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(); }
@@ -17997,6 +18045,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 =
{
@@ -18059,8 +18108,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 ) {
@@ -18095,10 +18145,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++;
@@ -18125,10 +18175,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++;
@@ -18155,10 +18205,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++;
@@ -18185,10 +18235,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++;
@@ -18215,10 +18265,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++;
@@ -18245,10 +18295,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++;
@@ -18276,10 +18326,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++;
@@ -18306,10 +18356,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++;
@@ -18336,10 +18386,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++;
@@ -18367,10 +18417,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++;
@@ -18467,10 +18517,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++;
@@ -18498,10 +18548,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++;
@@ -18529,10 +18579,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++;
@@ -18560,10 +18610,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++;
@@ -18590,10 +18640,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++;
@@ -18620,10 +18670,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++;
@@ -18650,10 +18700,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++;
@@ -18661,10 +18711,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++;
@@ -18691,10 +18741,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++;
@@ -18721,10 +18771,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++;
@@ -18821,10 +18871,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++;
@@ -18851,10 +18901,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++;
@@ -18881,10 +18931,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++;
@@ -18911,10 +18961,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++;
@@ -19018,10 +19068,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++;
@@ -19045,10 +19095,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++;
@@ -19072,10 +19122,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++;
@@ -19103,10 +19153,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++;
@@ -19133,10 +19183,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++;
@@ -19162,10 +19212,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++;
@@ -19191,10 +19241,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++;
@@ -19221,10 +19271,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++;
@@ -19252,10 +19302,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++;
@@ -19279,10 +19329,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++;
@@ -19306,10 +19356,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++;
@@ -19336,10 +19386,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++;
@@ -19445,10 +19495,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++;
@@ -19472,10 +19522,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++;
@@ -19499,10 +19549,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++;
@@ -19530,10 +19580,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++;
@@ -19560,10 +19610,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++;
@@ -19589,10 +19639,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++;
@@ -19618,10 +19668,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++;
@@ -19647,10 +19697,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++;
@@ -19676,10 +19726,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++;
@@ -19705,10 +19755,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++;
@@ -19734,10 +19784,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++;
@@ -19764,10 +19814,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++;
@@ -19795,10 +19845,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++;
@@ -19822,10 +19872,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++;
@@ -19851,10 +19901,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++;
@@ -19881,10 +19931,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++;
@@ -19989,10 +20039,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++;
@@ -20016,10 +20066,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++;
@@ -20043,10 +20093,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++;
@@ -20074,10 +20124,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++;
@@ -20104,10 +20154,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++;
@@ -20133,10 +20183,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++;
@@ -20162,10 +20212,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++;
@@ -20192,10 +20242,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++;
@@ -20223,10 +20273,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++;
@@ -20250,10 +20300,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++;
@@ -20277,10 +20327,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++;
@@ -20307,10 +20357,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++;
@@ -20414,10 +20464,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++;
@@ -20441,10 +20491,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++;
@@ -20468,10 +20518,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++;
@@ -20496,10 +20546,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++;
@@ -20524,10 +20574,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++;
@@ -20552,10 +20602,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++;
@@ -20581,10 +20631,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++;
@@ -20683,10 +20733,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++;
@@ -20710,10 +20760,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++;
@@ -20745,10 +20795,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++;
@@ -20776,10 +20826,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++;
@@ -20807,10 +20857,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++;
@@ -20839,10 +20889,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++;
@@ -20869,10 +20919,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++;
@@ -20900,10 +20950,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++;
@@ -20932,10 +20982,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++;
@@ -20964,10 +21014,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++;
@@ -20996,10 +21046,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++;
@@ -21026,10 +21076,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++;
@@ -21056,10 +21106,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++;
@@ -21086,10 +21136,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++;
@@ -21116,10 +21166,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++;
@@ -21146,10 +21196,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++;
@@ -21170,7 +21220,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,
@@ -21195,8 +21245,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++);
@@ -21276,10 +21327,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);
}
@@ -21304,10 +21355,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);
}
@@ -21333,9 +21384,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 ) &&
@@ -21358,9 +21409,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 ) &&
@@ -21382,13 +21433,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 ) {
@@ -21418,14 +21468,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 ) &&
@@ -21449,8 +21498,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) ) ||
@@ -21471,8 +21519,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) ) ||
@@ -21494,9 +21541,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 ) &&
@@ -21520,33 +21567,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 ) {
@@ -21572,20 +21618,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 ) &&
@@ -21607,8 +21653,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);
@@ -21632,8 +21678,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);
@@ -21656,8 +21702,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);
@@ -21680,8 +21726,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);
@@ -21705,21 +21751,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 ) {
@@ -21746,10 +21791,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) ) ||
@@ -21767,7 +21812,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) ) ||
@@ -21785,10 +21830,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) ) ||
@@ -21806,10 +21851,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) ) ||
@@ -21830,16 +21875,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 ) &&
@@ -21862,21 +21907,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 ) {
@@ -21899,8 +21943,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);
@@ -21938,8 +21982,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);
@@ -21959,8 +22003,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);
@@ -21983,16 +22027,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 ) &&
@@ -22012,10 +22056,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) ) ||
@@ -22112,8 +22156,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 ) &&
@@ -22139,8 +22183,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 ) &&
@@ -22165,11 +22209,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 ) &&
@@ -22196,10 +22240,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++;
@@ -22222,8 +22266,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 ) &&
@@ -22250,10 +22294,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++;
@@ -22274,7 +22318,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++);
@@ -22320,6 +22364,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 =
{
@@ -22382,8 +22427,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 ) {
@@ -22491,10 +22537,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++;
@@ -22522,10 +22568,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++;
@@ -22552,10 +22598,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++;
@@ -22652,10 +22698,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++;
@@ -22683,10 +22729,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++;
@@ -22713,10 +22759,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++;
@@ -22813,10 +22859,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++;
@@ -22844,10 +22890,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++;
@@ -22874,10 +22920,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++;
@@ -22975,10 +23021,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++;
@@ -23004,10 +23050,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++;
@@ -23034,10 +23080,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++;
@@ -23133,10 +23179,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++;
@@ -23163,10 +23209,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++;
@@ -23193,10 +23239,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++;
@@ -23292,10 +23338,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++;
@@ -23322,10 +23368,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++;
@@ -23352,10 +23398,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++;
@@ -23445,7 +23491,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++);
@@ -23458,10 +23504,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++;
@@ -23488,10 +23534,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++;
@@ -23520,10 +23566,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++;
@@ -23550,10 +23596,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++;
@@ -23582,10 +23628,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++;
@@ -23673,7 +23719,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++);
@@ -23686,10 +23732,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++;
@@ -23716,10 +23762,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++;
@@ -23748,10 +23794,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++;
@@ -23778,10 +23824,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++;
@@ -23810,10 +23856,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++;
@@ -23908,7 +23954,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++);
@@ -23921,10 +23967,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++;
@@ -23951,10 +23997,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++;
@@ -23985,10 +24031,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++;
@@ -24017,10 +24063,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++;
@@ -24051,10 +24097,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++;
@@ -24155,10 +24201,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++;
@@ -24187,10 +24233,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++;
@@ -24284,10 +24330,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++;
@@ -24316,10 +24362,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++;
@@ -24413,10 +24459,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++;
@@ -24445,10 +24491,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++;
@@ -24542,10 +24588,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++;
@@ -24574,10 +24620,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++;
@@ -24672,10 +24718,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++;
@@ -24704,10 +24750,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++;
@@ -24802,10 +24848,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++;
@@ -24834,10 +24880,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++;
@@ -24957,8 +25003,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 ) &&
@@ -24997,8 +25043,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 ) &&
@@ -25028,7 +25074,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++);
@@ -25071,6 +25117,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 =
{
@@ -25128,8 +25175,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 ) {
@@ -25243,10 +25291,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++;
@@ -25276,10 +25324,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++;
@@ -25308,10 +25356,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++;
@@ -25422,10 +25470,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++;
@@ -25614,10 +25662,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++;
@@ -25736,7 +25784,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++);
@@ -25811,6 +25859,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 =
{
@@ -25875,14 +25924,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 ) {
@@ -25963,8 +26012,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 ) {
@@ -26039,8 +26087,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 ) {
@@ -26116,8 +26163,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 ) {
@@ -26190,8 +26236,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 ) {
@@ -26266,8 +26311,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 ) {
@@ -26339,8 +26383,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 ) {
@@ -26416,8 +26459,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 ) {
@@ -26489,8 +26531,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 ) {
@@ -26562,8 +26603,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 ) {
@@ -26638,8 +26678,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 ) {
@@ -26711,8 +26750,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 ) {
@@ -26788,8 +26826,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 ) {
@@ -26862,8 +26899,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 ) {
@@ -26938,8 +26974,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 ) {
@@ -27011,8 +27046,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 ) {
@@ -27084,8 +27118,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 ) {
@@ -27161,8 +27194,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 ) {
@@ -27238,8 +27270,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 ) {
@@ -27314,8 +27345,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 ) {
@@ -27388,8 +27418,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 ) {
@@ -27464,8 +27493,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 ) {
@@ -27538,8 +27566,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 ) {
@@ -27614,8 +27641,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 ) {
@@ -27688,8 +27714,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 ) {
@@ -27764,8 +27789,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 ) {
@@ -27837,8 +27861,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 ) {
@@ -27913,8 +27936,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 ) {
@@ -27986,8 +28008,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 ) {
@@ -28061,8 +28082,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 ) {
@@ -28134,8 +28154,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 ) {
@@ -28181,7 +28200,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 ) {
@@ -28206,7 +28225,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(); }
@@ -28249,6 +28268,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;
@@ -28316,14 +28336,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 ) {
@@ -28379,11 +28399,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++;
@@ -28425,11 +28445,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++;
@@ -28508,11 +28528,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++;
@@ -28613,11 +28633,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);
}
@@ -28748,7 +28768,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(); }
@@ -28798,6 +28818,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;
@@ -28990,14 +29011,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 */
@@ -29034,18 +29058,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, /* int321_t dirty */
@@ -29057,7 +29081,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 */
@@ -29095,17 +29119,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, /* int321_t dirty */
@@ -29129,7 +29153,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 */
@@ -29151,17 +29175,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, /* int321_t dirty */
@@ -29185,7 +29209,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 */
@@ -29205,17 +29229,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, /* int321_t dirty */
@@ -29232,7 +29256,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 */
@@ -29279,17 +29303,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, /* int321_t dirty */
@@ -29317,7 +29341,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 */
@@ -29344,17 +29368,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, /* int321_t dirty */
@@ -29364,7 +29388,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;
@@ -29434,7 +29458,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 */
@@ -29476,18 +29500,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, /* int321_t dirty */
@@ -29497,7 +29521,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;
@@ -29519,17 +29543,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, /* int321_t dirty */
@@ -29555,7 +29579,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 */
@@ -29574,18 +29598,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, /* int321_t dirty */
@@ -29595,7 +29619,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;
@@ -29621,7 +29645,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();
}
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 568050a..b9dcd66 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -19,30 +19,63 @@
* 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];
-test_entry_t nano_entries[NUM_NANO_ENTRIES];
-test_entry_t micro_entries[NUM_MICRO_ENTRIES];
-test_entry_t tiny_entries[NUM_TINY_ENTRIES];
-test_entry_t small_entries[NUM_SMALL_ENTRIES];
-test_entry_t medium_entries[NUM_MEDIUM_ENTRIES];
-test_entry_t large_entries[NUM_LARGE_ENTRIES];
-test_entry_t huge_entries[NUM_HUGE_ENTRIES];
-test_entry_t monster_entries[NUM_MONSTER_ENTRIES];
-test_entry_t variable_entries[NUM_VARIABLE_ENTRIES];
+test_entry_t pico_entries[NUM_PICO_ENTRIES], orig_pico_entries[NUM_PICO_ENTRIES];
+test_entry_t nano_entries[NUM_NANO_ENTRIES], orig_nano_entries[NUM_NANO_ENTRIES];
+test_entry_t micro_entries[NUM_MICRO_ENTRIES], orig_micro_entries[NUM_MICRO_ENTRIES];
+test_entry_t tiny_entries[NUM_TINY_ENTRIES], orig_tiny_entries[NUM_TINY_ENTRIES];
+test_entry_t small_entries[NUM_SMALL_ENTRIES], orig_small_entries[NUM_SMALL_ENTRIES];
+test_entry_t medium_entries[NUM_MEDIUM_ENTRIES], orig_medium_entries[NUM_MEDIUM_ENTRIES];
+test_entry_t large_entries[NUM_LARGE_ENTRIES], orig_large_entries[NUM_LARGE_ENTRIES];
+test_entry_t huge_entries[NUM_HUGE_ENTRIES], orig_huge_entries[NUM_HUGE_ENTRIES];
+test_entry_t monster_entries[NUM_MONSTER_ENTRIES], orig_monster_entries[NUM_MONSTER_ENTRIES];
+test_entry_t variable_entries[NUM_VARIABLE_ENTRIES], orig_variable_entries[NUM_VARIABLE_ENTRIES];
+
+hbool_t orig_entry_arrays_init = FALSE;
test_entry_t * entries[NUMBER_OF_ENTRY_TYPES] =
{
@@ -58,6 +91,20 @@ test_entry_t * entries[NUMBER_OF_ENTRY_TYPES] =
variable_entries
};
+test_entry_t * orig_entries[NUMBER_OF_ENTRY_TYPES] =
+{
+ orig_pico_entries,
+ orig_nano_entries,
+ orig_micro_entries,
+ orig_tiny_entries,
+ orig_small_entries,
+ orig_medium_entries,
+ orig_large_entries,
+ orig_huge_entries,
+ orig_monster_entries,
+ orig_variable_entries
+};
+
const int32_t max_indices[NUMBER_OF_ENTRY_TYPES] =
{
NUM_PICO_ENTRIES - 1,
@@ -222,6 +269,9 @@ static herr_t flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
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 void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
+ struct flush_op *op_ptr, unsigned *flags_ptr);
+
@@ -596,8 +646,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);
}
@@ -748,7 +797,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);
@@ -1221,7 +1270,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,
@@ -1265,8 +1314,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);
}
@@ -1304,7 +1353,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)
@@ -1312,13 +1361,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) ) {
@@ -1341,14 +1393,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);
}
}
@@ -1378,11 +1430,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 );
@@ -1413,7 +1469,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:
@@ -1444,7 +1500,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;
@@ -1549,87 +1605,113 @@ reset_entries(void)
{
int i;
- int j;
- int k;
int32_t max_index;
- haddr_t addr = 0;
- haddr_t alt_addr = PICO_ALT_BASE_ADDR;
- size_t entry_size;
test_entry_t * base_addr;
+ test_entry_t * orig_base_addr;
- for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
+ if( !orig_entry_arrays_init)
{
- entry_size = entry_sizes[i];
- max_index = max_indices[i];
- base_addr = entries[i];
+ haddr_t addr = PICO_BASE_ADDR;
+ haddr_t alt_addr = PICO_ALT_BASE_ADDR;
+ size_t entry_size;
- HDassert( base_addr );
-
- for ( j = 0; j <= max_index; j++ )
+ for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
{
- /* one can argue that we should fill the header with garbage.
- * If this is desired, we can simply comment out the header
- * initialization - the headers will be full of garbage soon
- * enough.
- */
+ int j;
+
+ max_index = max_indices[i];
+ entry_size = entry_sizes[i];
+ base_addr = entries[i];
+ orig_base_addr = orig_entries[i];
+
+ HDassert( base_addr );
+ HDassert( orig_base_addr );
- base_addr[j].header.addr = (haddr_t)0;
- base_addr[j].header.size = (size_t)0;
- base_addr[j].header.type = NULL;
- base_addr[j].header.is_dirty = FALSE;
- base_addr[j].header.is_protected = FALSE;
- base_addr[j].header.is_read_only = FALSE;
- base_addr[j].header.ro_ref_count = FALSE;
- base_addr[j].header.next = NULL;
- base_addr[j].header.prev = NULL;
- base_addr[j].header.aux_next = NULL;
- base_addr[j].header.aux_prev = NULL;
-
- base_addr[j].self = &(base_addr[j]);
- base_addr[j].cache_ptr = NULL;
- base_addr[j].addr = addr;
- base_addr[j].at_main_addr = TRUE;
- base_addr[j].main_addr = addr;
- base_addr[j].alt_addr = alt_addr;
- base_addr[j].size = entry_size;
- base_addr[j].type = i;
- base_addr[j].index = j;
- base_addr[j].reads = 0;
- base_addr[j].writes = 0;
- base_addr[j].is_dirty = FALSE;
- base_addr[j].is_protected = FALSE;
- base_addr[j].is_read_only = FALSE;
- base_addr[j].ro_ref_count = FALSE;
-
- base_addr[j].is_pinned = FALSE;
- base_addr[j].pinning_ref_count = 0;
- base_addr[j].num_pins = 0;
- for ( k = 0; k < MAX_PINS; k++ )
+ for ( j = 0; j <= max_index; j++ )
{
- base_addr[j].pin_type[k] = -1;
- base_addr[j].pin_idx[k] = -1;
- }
+ int k;
+
+ /* one can argue that we should fill the header with garbage.
+ * If this is desired, we can simply comment out the header
+ * initialization - the headers will be full of garbage soon
+ * enough.
+ */
+
+ base_addr[j].header.addr = (haddr_t)0;
+ base_addr[j].header.size = (size_t)0;
+ base_addr[j].header.type = NULL;
+ base_addr[j].header.is_dirty = FALSE;
+ base_addr[j].header.is_protected = FALSE;
+ base_addr[j].header.is_read_only = FALSE;
+ base_addr[j].header.ro_ref_count = FALSE;
+ base_addr[j].header.next = NULL;
+ base_addr[j].header.prev = NULL;
+ base_addr[j].header.aux_next = NULL;
+ base_addr[j].header.aux_prev = NULL;
+
+ base_addr[j].self = &(base_addr[j]);
+ base_addr[j].cache_ptr = NULL;
+ base_addr[j].addr = addr;
+ base_addr[j].at_main_addr = TRUE;
+ base_addr[j].main_addr = addr;
+ base_addr[j].alt_addr = alt_addr;
+ base_addr[j].size = entry_size;
+ base_addr[j].type = i;
+ base_addr[j].index = j;
+ base_addr[j].reads = 0;
+ base_addr[j].writes = 0;
+ base_addr[j].is_dirty = FALSE;
+ base_addr[j].is_protected = FALSE;
+ base_addr[j].is_read_only = FALSE;
+ base_addr[j].ro_ref_count = FALSE;
+
+ base_addr[j].is_pinned = FALSE;
+ base_addr[j].pinning_ref_count = 0;
+ base_addr[j].num_pins = 0;
+ for ( k = 0; k < MAX_PINS; k++ )
+ {
+ base_addr[j].pin_type[k] = -1;
+ base_addr[j].pin_idx[k] = -1;
+ }
- base_addr[j].num_flush_ops = 0;
- for ( k = 0; k < MAX_FLUSH_OPS; k++ )
- {
- base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
- base_addr[j].flush_ops[k].type = -1;
- base_addr[j].flush_ops[k].idx = -1;
- base_addr[j].flush_ops[k].flag = FALSE;
- base_addr[j].flush_ops[k].size = 0;
- }
- base_addr[j].flush_op_self_resize_in_progress = FALSE;
+ base_addr[j].num_flush_ops = 0;
+ for ( k = 0; k < MAX_FLUSH_OPS; k++ )
+ {
+ base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
+ base_addr[j].flush_ops[k].type = -1;
+ base_addr[j].flush_ops[k].idx = -1;
+ base_addr[j].flush_ops[k].flag = FALSE;
+ base_addr[j].flush_ops[k].size = 0;
+ }
+ base_addr[j].flush_op_self_resize_in_progress = FALSE;
- base_addr[j].loaded = FALSE;
- base_addr[j].cleared = FALSE;
- base_addr[j].flushed = FALSE;
- base_addr[j].destroyed = FALSE;
+ base_addr[j].loaded = FALSE;
+ base_addr[j].cleared = FALSE;
+ base_addr[j].flushed = FALSE;
+ base_addr[j].destroyed = FALSE;
- addr += (haddr_t)entry_size;
- alt_addr += (haddr_t)entry_size;
- }
- }
+ addr += (haddr_t)entry_size;
+ alt_addr += (haddr_t)entry_size;
+ } /* end for */
+
+ /* Make copy of entries in base_addr for later */
+ HDmemcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof( *base_addr ));
+ } /* end for */
+
+ /* Indicate that we've made a copy for later */
+ orig_entry_arrays_init = TRUE;
+ } /* end if */
+ else {
+ for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; 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 ));
+ } /* end for */
+ } /* end else */
return;
@@ -1664,7 +1746,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,
@@ -1673,7 +1755,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] ) );
@@ -1689,6 +1770,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) ) {
@@ -1704,14 +1788,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);
}
}
@@ -1783,8 +1866,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 ) {
@@ -2181,38 +2263,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() */
@@ -2227,26 +2538,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);
- H5C_dest(NULL, -1, -1, cache_ptr);
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+ }
+
+ }
+
+ 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;
@@ -2274,7 +2642,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)
{
@@ -2284,8 +2652,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] ) );
@@ -2301,8 +2673,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 ) {
@@ -2334,29 +2706,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);
}
}
@@ -2436,12 +2811,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;
@@ -2449,6 +2825,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] ) );
@@ -2465,8 +2843,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 ) ||
@@ -2537,8 +2915,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)
@@ -2550,7 +2927,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] ) );
@@ -2560,7 +2936,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 );
@@ -2573,8 +2948,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);
@@ -2635,8 +3009,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()"; */
@@ -2646,7 +3019,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] ) );
@@ -2656,14 +3028,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 )
||
@@ -2829,17 +3199,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] ) );
@@ -2852,9 +3225,8 @@ protect_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- cache_entry_ptr = 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) ) ||
@@ -2926,17 +3298,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] ) );
@@ -2951,9 +3326,8 @@ protect_entry_ro(H5C_t * cache_ptr,
( ( entry_ptr->is_read_only ) &&
( entry_ptr->ro_ref_count > 0 ) ) );
- cache_entry_ptr = 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) ) ||
@@ -3005,8 +3379,7 @@ protect_entry_ro(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()"; */
@@ -3016,7 +3389,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] ) );
@@ -3026,12 +3398,11 @@ 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_protected) );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->is_pinned );
- result = H5C_unpin_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_unpin_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.is_pinned ) ||
@@ -3091,13 +3462,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;
@@ -3106,6 +3478,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] ) );
@@ -3133,9 +3507,9 @@ unprotect_entry(H5C_t * cache_ptr,
entry_ptr->is_dirty = (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 ) &&
@@ -3245,13 +3619,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;
@@ -3262,6 +3637,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] ) );
@@ -3297,9 +3674,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 ) ||
@@ -3384,7 +3761,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,
@@ -3400,19 +3777,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 ) )
@@ -3434,7 +3817,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);
}
@@ -3446,7 +3829,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 ) &&
@@ -3456,7 +3839,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);
}
@@ -3477,7 +3860,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 ) &&
@@ -3487,7 +3870,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);
}
@@ -3501,7 +3884,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 ) &&
@@ -3512,7 +3895,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 ) &&
@@ -3523,7 +3906,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 ) &&
@@ -3534,7 +3917,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);
}
@@ -3546,7 +3929,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);
}
@@ -3558,7 +3941,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 ) */
@@ -3568,7 +3951,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 ) &&
@@ -3578,7 +3961,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);
}
@@ -3589,7 +3972,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));
}
@@ -3601,36 +3984,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);
}
@@ -3650,7 +4033,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);
}
}
@@ -3696,7 +4079,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,
@@ -3706,7 +4089,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;
@@ -3715,15 +4099,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 ) )
@@ -3742,7 +4130,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);
}
@@ -3755,12 +4143,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--;
@@ -3796,17 +4184,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,
@@ -3822,19 +4204,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 ) )
@@ -3851,7 +4238,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);
}
@@ -3863,7 +4250,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 ) &&
@@ -3873,7 +4260,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);
}
@@ -3894,7 +4281,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 ) &&
@@ -3904,7 +4291,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);
}
@@ -3918,7 +4305,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 ) &&
@@ -3929,7 +4316,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 ) &&
@@ -3940,7 +4327,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 ) &&
@@ -3951,7 +4338,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);
}
@@ -3963,7 +4350,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);
}
@@ -3975,7 +4362,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 ) */
@@ -3985,7 +4372,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);
}
@@ -3996,7 +4383,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);
}
@@ -4007,7 +4394,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));
}
@@ -4021,36 +4408,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;
@@ -4067,7 +4454,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);
}
}
@@ -4113,7 +4500,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,
@@ -4123,7 +4510,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;
@@ -4132,15 +4520,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 ) )
@@ -4159,7 +4551,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);
}
@@ -4172,12 +4564,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--;
@@ -4219,7 +4611,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,
@@ -4230,19 +4622,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;
@@ -4261,7 +4657,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);
}
@@ -4270,7 +4666,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 ) &&
@@ -4279,7 +4675,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);
}
@@ -4325,7 +4721,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,
@@ -4336,7 +4732,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;
@@ -4345,15 +4742,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 ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 500 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = 0;
@@ -4379,7 +4780,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);
}
@@ -4388,7 +4789,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 ) &&
@@ -4397,7 +4798,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);
}
@@ -4441,7 +4842,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,
@@ -4452,6 +4853,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;
@@ -4459,11 +4861,18 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
+ if ( pass ) {
+
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
- H5C_stats__reset(cache_ptr);
+ HDassert( lag > 5 );
+
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = MAX_ENTRIES + lag;
@@ -4486,7 +4895,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);
}
@@ -4495,7 +4904,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 ) &&
@@ -4504,7 +4913,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);
}
@@ -4556,7 +4965,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,
@@ -4567,7 +4976,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;
@@ -4576,20 +4986,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 ) )
{
@@ -4609,7 +5023,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);
}
@@ -4618,7 +5032,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 ) &&
@@ -4627,7 +5041,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);
}
diff --git a/test/cache_common.h b/test/cache_common.h
index f76f47c..0009ab3 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -19,17 +19,20 @@
* This file contains common #defines, type definitions, and
* externs for tests of the cache implemented in H5C.c
*/
-#include "h5test.h"
-#include "H5Iprivate.h"
-#include "H5ACprivate.h"
+#ifndef _CACHE_COMMON_H
+#define _CACHE_COMMON_H
#define H5C_PACKAGE /*suppress error about including H5Cpkg */
-
-#include "H5Cpkg.h"
-
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Include library header files */
+#include "H5ACprivate.h"
+#include "H5Cpkg.h"
#include "H5Fpkg.h"
+#include "H5Iprivate.h"
+
+/* Include test header files */
+#include "h5test.h"
#define NO_CHANGE -1
@@ -72,7 +75,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 + \
@@ -112,6 +119,9 @@
(HUGE_ENTRY_SIZE * NUM_HUGE_ENTRIES))
#define VARIABLE_ALT_BASE_ADDR (haddr_t)(MONSTER_ALT_BASE_ADDR + \
(MONSTER_ENTRY_SIZE * NUM_MONSTER_ENTRIES))
+#define MAX_ADDR (haddr_t)(VARIABLE_ALT_BASE_ADDR + \
+ (VARIABLE_ENTRY_SIZE * NUM_VARIABLE_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.
@@ -442,15 +452,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;
};
@@ -594,29 +604,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,
@@ -624,11 +632,11 @@ 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);
@@ -636,20 +644,15 @@ 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,
@@ -660,9 +663,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,
@@ -677,7 +680,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,
@@ -686,7 +689,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,
@@ -701,7 +704,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,
@@ -710,7 +713,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,
@@ -720,7 +723,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,
@@ -730,7 +733,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,
@@ -740,7 +743,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,
@@ -750,26 +753,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,
@@ -784,3 +786,5 @@ void verify_entry_status(H5C_t * cache_ptr,
void verify_unprotected(void);
+#endif /* _CACHE_COMMON_H */
+
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;