summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-25 22:11:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-25 22:11:11 (GMT)
commitee28e83e6fa4267aa0c46ca8dc7eb55082f60dcc (patch)
treecc171353be4682232323ab4cc41a38d73a0f9e57
parentf3293b3cdcea9b233607450ebec1fe7a0167f886 (diff)
downloadhdf5-ee28e83e6fa4267aa0c46ca8dc7eb55082f60dcc.zip
hdf5-ee28e83e6fa4267aa0c46ca8dc7eb55082f60dcc.tar.gz
hdf5-ee28e83e6fa4267aa0c46ca8dc7eb55082f60dcc.tar.bz2
[svn-r18458] Description:
More convergence of the metadata journaling branch toward to the trunk. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug, prod & parallel (h5committest not required on this branch)
-rw-r--r--src/H5A.c3
-rw-r--r--src/H5AC.c210
-rw-r--r--src/H5AC1pkg.h2
-rw-r--r--src/H5ACpkg.h4
-rw-r--r--src/H5ACprivate.h158
-rw-r--r--src/H5ACpublic.h50
-rw-r--r--src/H5Adeprec.c1
-rw-r--r--src/H5B.c4
-rw-r--r--src/H5Bpkg.h1
-rw-r--r--src/H5Bprivate.h1
-rw-r--r--src/H5C.c963
-rw-r--r--src/H5C1.c4
-rw-r--r--src/H5C1pkg.h2
-rw-r--r--src/H5C1private.h18
-rw-r--r--src/H5Cpkg.h1592
-rw-r--r--src/H5Cprivate.h641
-rw-r--r--src/H5Cpublic.h1
-rw-r--r--src/H5Dint.c1
-rw-r--r--src/H5Ocopy.c1
-rw-r--r--src/H5Ofill.c1
-rw-r--r--src/H5Opkg.h1
-rw-r--r--src/H5Pdcpl.c1
22 files changed, 1656 insertions, 2004 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 77ed0a2..4a79589 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -29,12 +29,11 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Opkg.h" /* Object headers */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5SMprivate.h" /* Shared Object Header Messages */
diff --git a/src/H5AC.c b/src/H5AC.c
index 5b3f0e7..236e2ac 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -46,7 +46,7 @@
#include <aio.h>
#define H5AC_PACKAGE /*suppress error about including H5ACpkg */
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
@@ -58,7 +58,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5ACpkg.h" /* Metadata cache */
-#include "H5Cpkg.h" /* Cache */
+#include "H5Cpkg.h" /* Cache */
#include "H5Dprivate.h" /* Dataset functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* Files */
@@ -192,7 +192,7 @@ static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
hid_t dxpl_id,
H5AC_t * cache_ptr);
-static herr_t H5AC_log_renamed_entry(H5F_t * f,
+static herr_t H5AC_log_renamed_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
#endif /* H5_HAVE_PARALLEL */
@@ -514,8 +514,8 @@ static const char * H5AC_entry_type_names[H5AC_NTYPES] =
};
herr_t
-H5AC_create(H5F_t * f,
- H5AC_cache_config_t *config_ptr)
+H5AC_create(const H5F_t *f,
+ H5AC_cache_config_t *config_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
@@ -627,28 +627,28 @@ H5AC_create(H5F_t * f,
if ( aux_ptr->mpi_rank == 0 ) {
f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- H5AC_check_if_write_permitted,
- TRUE,
- H5AC_log_flushed_entry,
- (void *)aux_ptr);
+ H5AC__DEFAULT_MIN_CLEAN_SIZE,
+ (H5AC_NTYPES - 1),
+ (const char **)H5AC_entry_type_names,
+ H5AC_check_if_write_permitted,
+ TRUE,
+ H5AC_log_flushed_entry,
+ (void *)aux_ptr);
} else {
f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
- H5AC__DEFAULT_MIN_CLEAN_SIZE,
- (H5AC_NTYPES - 1),
- (const char **)H5AC_entry_type_names,
- NULL,
- FALSE,
+ H5AC__DEFAULT_MIN_CLEAN_SIZE,
+ (H5AC_NTYPES - 1),
+ (const char **)H5AC_entry_type_names,
+ NULL,
+ FALSE,
#if 0 /* this is useful debugging code -- keep it for a while */ /* JRM */
- H5AC_log_flushed_entry_dummy,
+ H5AC_log_flushed_entry_dummy,
#else /* JRM */
- NULL,
+ NULL,
#endif /* JRM */
- (void *)aux_ptr);
+ (void *)aux_ptr);
}
} else {
@@ -668,7 +668,6 @@ H5AC_create(H5F_t * f,
* overwritten shortly by the subsequent set resize config call.
* -- JRM
*/
-
f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE,
H5AC__DEFAULT_MIN_CLEAN_SIZE,
(H5AC_NTYPES - 1),
@@ -916,7 +915,7 @@ H5AC_begin_transaction(hid_t id,
case H5I_DATATYPE:
{
- H5T_t *dt = H5I_object(id);
+ H5T_t *dt = (H5T_t *)H5I_object(id);
if( ( dt == NULL ) || ( ! H5T_committed(dt) ) ) {
*do_transaction_ptr = FALSE;
}
@@ -1377,13 +1376,12 @@ H5AC_expunge_entry(H5F_t *f,
const H5AC_class_t *type,
haddr_t addr)
{
- herr_t result;
- herr_t ret_value=SUCCEED; /* Return value */
- H5AC_t * cache_ptr = NULL;
+ herr_t result;
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_expunge_entry, FAIL)
@@ -1393,9 +1391,10 @@ H5AC_expunge_entry(H5F_t *f,
HDassert(type);
HDassert(H5F_addr_defined(addr));
- cache_ptr = f->shared->cache;
-
#if H5AC__TRACE_FILE_ENABLED
+{
+ H5AC_t * cache_ptr = f->shared->cache;
+
/* For the expunge entry call, only the addr, and type id are really
* necessary in the trace file. Write the return value to catch occult
* errors.
@@ -1408,6 +1407,7 @@ H5AC_expunge_entry(H5F_t *f,
(unsigned long)addr,
(int)(type->id));
}
+}
#endif /* H5AC__TRACE_FILE_ENABLED */
result = H5C_expunge_entry(f,
@@ -1667,13 +1667,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_get_entry_status(H5F_t * f,
+H5AC_get_entry_status(const H5F_t *f,
haddr_t addr,
unsigned * status_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t *cache_ptr = f->shared->cache;
herr_t result;
hbool_t in_cache;
hbool_t is_dirty;
@@ -1681,13 +1680,12 @@ H5AC_get_entry_status(H5F_t * f,
hbool_t is_pinned;
size_t entry_size;
unsigned status = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_get_entry_status, FAIL)
- if ( ( f == NULL ) ||
- ( f->shared == NULL ) ||
- ( f->shared->cache == NULL ) ||
- ( f->shared->cache->magic != H5C__H5C_T_MAGIC ) ||
+ if ( ( cache_ptr == NULL ) ||
+ ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ||
( ! H5F_addr_defined(addr) ) ||
( status_ptr == NULL ) ) {
@@ -1933,9 +1931,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_entry_dirty(void * thing,
- hbool_t size_changed,
- size_t new_size)
+H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
@@ -1954,7 +1950,7 @@ H5AC_mark_pinned_entry_dirty(void * thing,
* to catch occult errors.
*/
if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
+ (NULL != trace_file_ptr))
sprintf(trace, "%s 0x%lx %d %d", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
(int)size_changed,
@@ -2152,23 +2148,15 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
#ifdef H5_HAVE_PARALLEL
if ( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) {
-
- result = H5AC_log_renamed_entry(f,
- old_addr,
- new_addr);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_log_renamed_entry() failed.")
- }
+ if(H5AC_log_renamed_entry(f, old_addr, new_addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log renamed entry")
}
#endif /* H5_HAVE_PARALLEL */
result = H5C_rename_entry(f->shared->cache,
- type,
- old_addr,
- new_addr);
+ type,
+ old_addr,
+ new_addr);
if ( result < 0 ) {
@@ -2241,7 +2229,7 @@ H5AC_pin_protected_entry(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
if(H5C_pin_protected_entry(thing) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't unpin entry")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry")
done:
#if H5AC__TRACE_FILE_ENABLED
@@ -2470,7 +2458,7 @@ H5AC_resize_pinned_entry(void *thing, size_t new_size)
* occult errors.
*/
if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
+ (NULL != trace_file_ptr))
sprintf(trace, "%s 0x%lx %d", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
(int)new_size);
@@ -2492,12 +2480,12 @@ H5AC_resize_pinned_entry(void *thing, size_t new_size)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry is protected??")
if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, TRUE, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log entry")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
} /* end if */
}
#endif /* H5_HAVE_PARALLEL */
- if(H5C_resize_pinned_entry(thing, new_size) < 0 )
+ if(H5C_resize_pinned_entry(thing, new_size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry")
done:
@@ -2542,7 +2530,7 @@ H5AC_unpin_entry(void *thing)
* in the trace file. Also write the result to catch occult errors.
*/
if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
+ (NULL != trace_file_ptr))
sprintf(trace, "%s 0x%lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
@@ -2656,10 +2644,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
- haddr_t addr, size_t new_size, void *thing, unsigned flags)
+H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
+ size_t new_size, void *thing, unsigned flags)
{
herr_t result;
hbool_t size_changed = FALSE;
@@ -2975,8 +2962,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
"H5C_get_cache_auto_resize_config() failed.")
}
- result = H5C_get_evictions_enabled((const H5C_t *)cache_ptr,
- &evictions_enabled);
+ result = H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled);
if ( result < 0 ) {
@@ -3008,11 +2994,11 @@ H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
config_ptr->increment = internal_config.increment;
config_ptr->apply_max_increment = internal_config.apply_max_increment;
config_ptr->max_increment = internal_config.max_increment;
+ config_ptr->decr_mode = internal_config.decr_mode;
+ config_ptr->upper_hr_threshold = internal_config.upper_hr_threshold;
config_ptr->flash_incr_mode = internal_config.flash_incr_mode;
config_ptr->flash_multiple = internal_config.flash_multiple;
config_ptr->flash_threshold = internal_config.flash_threshold;
- config_ptr->decr_mode = internal_config.decr_mode;
- config_ptr->upper_hr_threshold = internal_config.upper_hr_threshold;
config_ptr->decrement = internal_config.decrement;
config_ptr->apply_max_decrement = internal_config.apply_max_decrement;
config_ptr->max_decrement = internal_config.max_decrement;
@@ -3157,13 +3143,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5AC_get_cache_size(H5AC_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr)
+ size_t * max_size_ptr,
+ size_t * min_clean_size_ptr,
+ size_t * cur_size_ptr,
+ int32_t * cur_num_entries_ptr)
{
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
@@ -3207,29 +3192,18 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_get_cache_hit_rate(H5AC_t * cache_ptr,
- double * hit_rate_ptr)
-
+H5AC_get_cache_hit_rate(H5AC_t * cache_ptr, double * hit_rate_ptr)
{
- herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_get_cache_hit_rate, FAIL)
- result = H5C_get_cache_hit_rate((H5C_t *)cache_ptr, hit_rate_ptr);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_get_cache_hit_rate() failed.")
- }
+ if(H5C_get_cache_hit_rate((H5C_t *)cache_ptr, hit_rate_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_hit_rate() failed.")
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_get_cache_hit_rate() */
@@ -3324,10 +3298,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
- H5AC_cache_config_t *config_ptr)
+H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
+ H5AC_cache_config_t *config_ptr)
{
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
@@ -3724,30 +3697,14 @@ H5AC_set_cache_config(H5AC_t * cache_ptr,
}
}
- if ( H5AC_ext_config_2_int_config(config_ptr, &internal_config) !=
- SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_ext_config_2_int_config() failed.")
- }
-
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &internal_config);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_cache_auto_resize_config() failed.")
- }
-
+ if(H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_ext_config_2_int_config() failed.")
- result = H5C_set_evictions_enabled(cache_ptr,
- config_ptr->evictions_enabled);
+ if(H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed.")
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_evictions_enabled() failed.")
- }
+ if(H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed.")
#ifdef H5_HAVE_PARALLEL
if ( cache_ptr->aux_ptr != NULL ) {
@@ -3813,7 +3770,6 @@ herr_t
H5AC_validate_config(H5AC_cache_config_t * config_ptr)
{
herr_t result;
- int name_len;
H5C_auto_size_ctl_t internal_config;
herr_t ret_value = SUCCEED; /* Return value */
@@ -3852,6 +3808,7 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr)
/* don't bother to test trace_file_name unless open_trace_file is TRUE */
if ( config_ptr->open_trace_file ) {
+ size_t name_len;
/* Can't really test the trace_file_name field without trying to
* open the file, so we will content ourselves with a couple of
@@ -4174,10 +4131,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5AC_open_trace_file(H5AC_t * cache_ptr,
- const char * trace_file_name)
+ const char * trace_file_name)
{
herr_t ret_value = SUCCEED; /* Return value */
char file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 2];
@@ -4255,7 +4211,7 @@ H5AC_open_trace_file(H5AC_t * cache_ptr,
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "trace file open failed.")
}
- HDfprintf(file_ptr, "### HDF5 metadata cache trace file version 2 ###\n");
+ HDfprintf(file_ptr, "### HDF5 metadata cache trace file ###\n");
if ( H5C_set_trace_file_ptr(cache_ptr, file_ptr) < 0 ) {
@@ -4558,10 +4514,8 @@ done:
*
* JRM -- 1/2/08
*
- *
*-------------------------------------------------------------------------
*/
-
herr_t
H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
H5C_auto_size_ctl_t * int_conf_ptr)
@@ -4592,8 +4546,7 @@ H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
int_conf_ptr->min_clean_fraction = ext_conf_ptr->min_clean_fraction;
int_conf_ptr->max_size = ext_conf_ptr->max_size;
int_conf_ptr->min_size = ext_conf_ptr->min_size;
- int_conf_ptr->epoch_length =
- (int64_t)(ext_conf_ptr->epoch_length);
+ int_conf_ptr->epoch_length = (int64_t)(ext_conf_ptr->epoch_length);
int_conf_ptr->incr_mode = ext_conf_ptr->incr_mode;
int_conf_ptr->lower_hr_threshold = ext_conf_ptr->lower_hr_threshold;
@@ -4604,21 +4557,17 @@ H5AC_ext_config_2_int_config(H5AC_cache_config_t * ext_conf_ptr,
int_conf_ptr->flash_multiple = ext_conf_ptr->flash_multiple;
int_conf_ptr->flash_threshold = ext_conf_ptr->flash_threshold;
-
int_conf_ptr->decr_mode = ext_conf_ptr->decr_mode;
int_conf_ptr->upper_hr_threshold = ext_conf_ptr->upper_hr_threshold;
int_conf_ptr->decrement = ext_conf_ptr->decrement;
int_conf_ptr->apply_max_decrement = ext_conf_ptr->apply_max_decrement;
int_conf_ptr->max_decrement = ext_conf_ptr->max_decrement;
- int_conf_ptr->epochs_before_eviction =
- (int32_t)(ext_conf_ptr->epochs_before_eviction);
+ int_conf_ptr->epochs_before_eviction = (int32_t)(ext_conf_ptr->epochs_before_eviction);
int_conf_ptr->apply_empty_reserve = ext_conf_ptr->apply_empty_reserve;
int_conf_ptr->empty_reserve = ext_conf_ptr->empty_reserve;
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_ext_config_2_int_config() */
@@ -4754,7 +4703,6 @@ done:
*
*-------------------------------------------------------------------------
*/
-
#ifdef H5_HAVE_PARALLEL
static herr_t
H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
@@ -5192,29 +5140,28 @@ done:
*
*-------------------------------------------------------------------------
*/
-
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_renamed_entry(H5F_t * f,
+H5AC_log_renamed_entry(const H5F_t *f,
haddr_t old_addr,
haddr_t new_addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- H5AC_t * cache_ptr;
+ H5AC_t * cache_ptr;
hbool_t entry_in_cache;
hbool_t entry_dirty;
size_t entry_size;
H5AC_aux_t * aux_ptr = NULL;
H5AC_slist_entry_t * slist_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_log_renamed_entry, FAIL)
- HDassert( f != NULL );
- HDassert( f->shared != NULL );
+ HDassert( f );
+ HDassert( f->shared );
cache_ptr = (H5AC_t *)f->shared->cache;
- HDassert( cache_ptr != NULL );
+ HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
aux_ptr = cache_ptr->aux_ptr;
@@ -5556,9 +5503,9 @@ done:
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_receive_and_apply_clean_list(H5F_t * f,
- hid_t dxpl_id,
- H5AC_t * cache_ptr)
+H5AC_receive_and_apply_clean_list(H5F_t * f,
+ hid_t dxpl_id,
+ H5AC_t * cache_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
H5AC_aux_t * aux_ptr = NULL;
@@ -5675,6 +5622,5 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_receive_and_apply_clean_list() */
-
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5AC1pkg.h b/src/H5AC1pkg.h
index fdb6323..c685632 100644
--- a/src/H5AC1pkg.h
+++ b/src/H5AC1pkg.h
@@ -274,7 +274,7 @@
#ifdef H5_HAVE_PARALLEL
-#define H5AC1__H5AC1_AUX_T_MAGIC (unsigned)0x00D0A01
+#define H5AC1__H5AC1_AUX_T_MAGIC (unsigned)0x00D0A00
typedef struct H5AC1_aux_t
{
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 30102a8..911aceb 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -53,7 +53,7 @@
*-------------------------------------------------------------------------
*/
-#define H5AC__MIN_DIRTY_BYTES_THRESHOLD (int32_t) \
+#define H5AC__MIN_DIRTY_BYTES_THRESHOLD (int32_t) \
(H5C__MIN_MAX_CACHE_SIZE / 2)
#define H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD (256 * 1024)
#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
@@ -275,7 +275,7 @@
#ifdef H5_HAVE_PARALLEL
-#define H5AC__H5AC_AUX_T_MAGIC (unsigned)0x00D0A02
+#define H5AC__H5AC_AUX_T_MAGIC (unsigned)0x00D0A01
typedef struct H5AC_aux_t
{
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 0365317..e970ef3 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -22,15 +22,6 @@
* Purpose: Constants and typedefs available to the rest of the
* library.
*
- * Modifications: JRM - 6/4/04
- * Complete re-write for a new caching algorithm
- * located in H5C.c
- *
- * JRM - 10/18/07
- * Copied H5ACprivate.h to H5ACprivate.h and reworked
- * to use H5C instead of H5C. All this is in support
- * of cache API modifications needed for journaling.
- *
*-------------------------------------------------------------------------
*/
@@ -52,25 +43,25 @@
/* Types of metadata objects cached */
typedef enum {
- H5AC_BT_ID = 0, /*B-tree nodes */
- H5AC_SNODE_ID, /*symbol table nodes */
- H5AC_LHEAP_PRFX_ID, /*local heap prefix */
- H5AC_LHEAP_DBLK_ID, /*local heap data block */
- H5AC_GHEAP_ID, /*global heap */
- H5AC_OHDR_ID, /*object header */
- H5AC_OHDR_CHK_ID, /*object header chunk */
- H5AC_BT2_HDR_ID, /*v2 B-tree header */
- H5AC_BT2_INT_ID, /*v2 B-tree internal node */
- H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */
- H5AC_FHEAP_HDR_ID, /*fractal heap header */
- H5AC_FHEAP_DBLOCK_ID,/*fractal heap direct block */
- H5AC_FHEAP_IBLOCK_ID,/*fractal heap indirect block */
- H5AC_FSPACE_HDR_ID, /*free space header */
- H5AC_FSPACE_SINFO_ID,/*free space sections */
- H5AC_SOHM_TABLE_ID, /*shared object header message master table */
- H5AC_SOHM_LIST_ID, /*shared message index stored as a list */
- H5AC_TEST_ID, /*test entry -- not used for actual files */
- H5AC_NTYPES /* Number of types, must be last */
+ H5AC_BT_ID = 0, /*B-tree nodes */
+ H5AC_SNODE_ID, /*symbol table nodes */
+ H5AC_LHEAP_PRFX_ID, /*local heap prefix */
+ H5AC_LHEAP_DBLK_ID, /*local heap data block */
+ H5AC_GHEAP_ID, /*global heap */
+ H5AC_OHDR_ID, /*object header */
+ H5AC_OHDR_CHK_ID, /*object header chunk */
+ H5AC_BT2_HDR_ID, /*v2 B-tree header */
+ H5AC_BT2_INT_ID, /*v2 B-tree internal node */
+ H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */
+ H5AC_FHEAP_HDR_ID, /*fractal heap header */
+ H5AC_FHEAP_DBLOCK_ID, /*fractal heap direct block */
+ H5AC_FHEAP_IBLOCK_ID, /*fractal heap indirect block */
+ H5AC_FSPACE_HDR_ID, /*free space header */
+ H5AC_FSPACE_SINFO_ID,/*free space sections */
+ H5AC_SOHM_TABLE_ID, /*shared object header message master table */
+ H5AC_SOHM_LIST_ID, /*shared message index stored as a list */
+ H5AC_TEST_ID, /*test entry -- not used for actual files */
+ H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
/* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when
@@ -194,40 +185,38 @@ extern hid_t H5AC_ind_dxpl_id;
/* Default cache configuration. */
-#define H5AC__DEFAULT_CACHE_CONFIG \
+#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
- /* int version = */ \
- H5AC__CURR_CACHE_CONFIG_VERSION, \
- /* hbool_t rpt_fcn_enabled = */ FALSE, \
- /* hbool_t open_trace_file = */ FALSE, \
- /* hbool_t close_trace_file = */ FALSE, \
- /* char trace_file_name[] = */ "", \
- /* hbool_t evictions_enabled = */ TRUE, \
- /* hbool_t set_initial_size = */ TRUE, \
- /* size_t initial_size = */ ( 1 * 1024 * 1024 ), \
- /* double min_clean_fraction = */ 0.5, \
- /* size_t max_size = */ (16 * 1024 * 1024 ), \
- /* size_t min_size = */ ( 1 * 1024 * 1024 ), \
- /* long int epoch_length = */ 50000, \
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
- /* double lower_hr_threshold = */ 0.9, \
- /* double increment = */ 2.0, \
- /* hbool_t apply_max_increment = */ TRUE, \
- /* size_t max_increment = */ (4 * 1024 * 1024), \
- /* enum H5C_cache_flash_incr_mode */ \
- /* flash_incr_mode = */ H5C_flash_incr__add_space, \
- /* double flash_multiple = */ 1.0, \
- /* double flash_threshold = */ 0.25, \
- /* enum H5C_cache_decr_mode decr_mode = */ \
- H5C_decr__age_out_with_threshold, \
- /* double upper_hr_threshold = */ 0.999, \
- /* double decrement = */ 0.9, \
- /* hbool_t apply_max_decrement = */ TRUE, \
- /* size_t max_decrement = */ (1 * 1024 * 1024), \
- /* int epochs_before_eviction = */ 3, \
- /* hbool_t apply_empty_reserve = */ TRUE, \
- /* double empty_reserve = */ 0.1, \
- /* int dirty_bytes_threshold = */ (256 * 1024) \
+ /* int version = */ H5AC__CURR_CACHE_CONFIG_VERSION, \
+ /* hbool_t rpt_fcn_enabled = */ FALSE, \
+ /* hbool_t open_trace_file = */ FALSE, \
+ /* hbool_t close_trace_file = */ FALSE, \
+ /* char trace_file_name[] = */ "", \
+ /* hbool_t evictions_enabled = */ TRUE, \
+ /* hbool_t set_initial_size = */ TRUE, \
+ /* size_t initial_size = */ (1 * 1024 * 1024), \
+ /* double min_clean_fraction = */ 0.5, \
+ /* size_t max_size = */ (16 * 1024 * 1024), \
+ /* size_t min_size = */ (1 * 1024 * 1024), \
+ /* long int epoch_length = */ 50000, \
+ /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
+ /* double lower_hr_threshold = */ 0.9, \
+ /* double increment = */ 2.0, \
+ /* hbool_t apply_max_increment = */ TRUE, \
+ /* size_t max_increment = */ (4 * 1024 * 1024), \
+ /* enum H5C_cache_flash_incr_mode */ \
+ /* flash_incr_mode = */ H5C_flash_incr__add_space, \
+ /* double flash_multiple = */ 1.0, \
+ /* double flash_threshold = */ 0.25, \
+ /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, \
+ /* double upper_hr_threshold = */ 0.999, \
+ /* double decrement = */ 0.9, \
+ /* hbool_t apply_max_decrement = */ TRUE, \
+ /* size_t max_decrement = */ (1 * 1024 * 1024), \
+ /* int epochs_before_eviction = */ 3, \
+ /* hbool_t apply_empty_reserve = */ TRUE, \
+ /* double empty_reserve = */ 0.1, \
+ /* int dirty_bytes_threshold = */ (256 * 1024) \
}
@@ -255,15 +244,15 @@ extern hid_t H5AC_ind_dxpl_id;
* the equivalent flags from H5Cprivate.h.
*/
-#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
-#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
-#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
-#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
-#define H5AC__SIZE_CHANGED_FLAG H5C__SIZE_CHANGED_FLAG
-#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
-#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
-#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
-#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
+#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
+#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
+#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
+#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
+#define H5AC__SIZE_CHANGED_FLAG H5C__SIZE_CHANGED_FLAG
+#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
+#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
+#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
+#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
#define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG
#define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG
@@ -293,8 +282,7 @@ H5_DLL herr_t H5AC_check_for_journaling(H5F_t * f,
H5_DLL herr_t H5AC_deregister_mdjsc_callback(H5F_t * file_ptr,
int32_t idx);
-H5_DLL herr_t H5AC_create(H5F_t *f,
- H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_begin_transaction(hid_t id,
hbool_t * do_transaction_ptr,
@@ -312,27 +300,23 @@ H5_DLL herr_t H5AC_end_transaction(hbool_t do_transaction,
uint64_t trans_num,
const char * api_call_name);
-H5_DLL herr_t H5AC_get_entry_status(H5F_t * f, haddr_t addr,
+H5_DLL herr_t H5AC_get_entry_status(const H5F_t *f, haddr_t addr,
unsigned * status_ptr);
-
H5_DLL herr_t H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
- haddr_t addr, size_t len, void *thing,
- unsigned int flags);
-H5_DLL herr_t H5AC_pin_protected_entry(void * thing);
+ haddr_t addr, size_t len, void *thing, unsigned int flags);
+H5_DLL herr_t H5AC_pin_protected_entry(void *thing);
H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
haddr_t addr, size_t len, void *udata,
H5AC_protect_t rw);
-H5_DLL herr_t H5AC_resize_pinned_entry(void * thing,
- size_t new_size);
-H5_DLL herr_t H5AC_unpin_entry(void * thing);
+H5_DLL herr_t H5AC_resize_pinned_entry(void *thing, size_t new_size);
+H5_DLL herr_t H5AC_unpin_entry(void *thing);
H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
const H5AC_class_t *type, haddr_t addr,
size_t new_size, void *thing, unsigned flags);
H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags);
-H5_DLL herr_t H5AC_mark_pinned_entry_dirty(void * thing,
- hbool_t size_changed,
- size_t new_size);
-H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(void * thing);
+H5_DLL herr_t H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed,
+ size_t new_size);
+H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
haddr_t old_addr, haddr_t new_addr);
@@ -346,7 +330,7 @@ H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
H5_DLL herr_t H5AC_stats(const H5F_t *f);
H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
- H5AC_cache_config_t *config_ptr);
+ H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_get_cache_size(H5AC_t * cache_ptr,
size_t * max_size_ptr,
@@ -368,8 +352,8 @@ H5_DLL herr_t H5AC_register_mdjsc_callback(const H5F_t * file_ptr,
H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr);
-H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5C_t * cache_ptr,
- H5AC_cache_config_t *config_ptr);
+H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
+ H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_set_jnl_config(H5F_t * f,
hid_t dxpl_id,
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index e09e658..a89cfe0 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -386,38 +386,38 @@ extern "C" {
typedef struct H5AC_cache_config_t
{
/* general configuration fields: */
- int version;
+ int version;
- hbool_t rpt_fcn_enabled;
+ hbool_t rpt_fcn_enabled;
- hbool_t open_trace_file;
- hbool_t close_trace_file;
- char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN+1];
+ hbool_t open_trace_file;
+ hbool_t close_trace_file;
+ char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1];
- hbool_t evictions_enabled;
+ hbool_t evictions_enabled;
- hbool_t set_initial_size;
- size_t initial_size;
+ hbool_t set_initial_size;
+ size_t initial_size;
- double min_clean_fraction;
+ double min_clean_fraction;
- size_t max_size;
- size_t min_size;
+ size_t max_size;
+ size_t min_size;
- long int epoch_length;
+ long int epoch_length;
/* size increase control fields: */
enum H5C_cache_incr_mode incr_mode;
- double lower_hr_threshold;
+ double lower_hr_threshold;
- double increment;
+ double increment;
- hbool_t apply_max_increment;
- size_t max_increment;
+ hbool_t apply_max_increment;
+ size_t max_increment;
- enum H5C_cache_flash_incr_mode flash_incr_mode;
+ enum H5C_cache_flash_incr_mode flash_incr_mode;
double flash_multiple;
double flash_threshold;
@@ -425,21 +425,21 @@ typedef struct H5AC_cache_config_t
/* size decrease control fields: */
enum H5C_cache_decr_mode decr_mode;
- double upper_hr_threshold;
+ double upper_hr_threshold;
- double decrement;
+ double decrement;
- hbool_t apply_max_decrement;
- size_t max_decrement;
+ hbool_t apply_max_decrement;
+ size_t max_decrement;
- int epochs_before_eviction;
+ int epochs_before_eviction;
- hbool_t apply_empty_reserve;
- double empty_reserve;
+ hbool_t apply_empty_reserve;
+ double empty_reserve;
/* parallel configuration fields: */
- int dirty_bytes_threshold;
+ int dirty_bytes_threshold;
} H5AC_cache_config_t;
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 2c0f7cc..e075c62 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -43,7 +43,6 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
diff --git a/src/H5B.c b/src/H5B.c
index 0f32f0c..e3c7314 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1748,7 +1748,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
HDassert(type);
/* Allocate space for the shared structure */
- if(NULL == (shared = H5FL_MALLOC(H5B_shared_t)))
+ if(NULL == (shared = H5FL_CALLOC(H5B_shared_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info")
/* Set up the "global" information for this file's groups */
@@ -2067,7 +2067,7 @@ H5B_dest(H5B_t *bt)
HDassert(bt);
HDassert(bt->rc_shared);
- H5FL_SEQ_FREE(haddr_t, bt->child);
+ bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
bt->native = H5FL_BLK_FREE(native_block, bt->native);
H5RC_DEC(bt->rc_shared);
bt = H5FL_FREE(H5B_t, bt);
diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h
index 5309d02..a1fe17e 100644
--- a/src/H5Bpkg.h
+++ b/src/H5Bpkg.h
@@ -33,6 +33,7 @@
/* Other private headers needed by this file */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index da18733..085b79e 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -34,7 +34,6 @@
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
#include "H5Fprivate.h" /* File access */
-#include "H5FLprivate.h" /* Free Lists */
#include "H5RCprivate.h" /* Reference counted object functions */
/**************************/
diff --git a/src/H5C.c b/src/H5C.c
index 6355182..43fdf27 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -97,7 +97,7 @@
#include <aio.h>
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
@@ -113,26 +113,7 @@
#include "H5Pprivate.h" /* Property lists */
#include "H5SLprivate.h" /* Skip lists */
-
-/*
- * #defines controlling debugging code. All should be turned off
- * before checkin.
- */
-
-#define H5C_PRINT_ENTRY_POINTS FALSE
-#if H5C_PRINT_ENTRY_POINTS
-#define H5C_PRINT_EXIT_POINTS TRUE
-#define H5C_PRINT_ENTRY_POINT_TARGET_TYPE(i) \
- ( ( (i) == H5AC_FHEAP_HDR_ID ) || \
- ( (i) == H5AC_FHEAP_DBLOCK_ID ) || \
- ( (i) == H5AC_FHEAP_IBLOCK_ID ) )
-#else /* H5C_PRINT_ENTRY_POINTS */
-#define H5C_PRINT_EXIT_POINTS FALSE
-#endif /* H5C_PRINT_ENTRY_POINTS */
-
-
-
/*
* Private file-scope variables.
*/
@@ -146,23 +127,20 @@ H5FL_DEFINE_STATIC(H5C_t);
*/
static herr_t H5C__auto_adjust_cache_size(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- hbool_t write_permitted);
+ hid_t dxpl_id,
+ hbool_t write_permitted);
static herr_t H5C__autoadjust__ageout(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- double hit_rate,
- enum H5C_resize_status * status_ptr,
- size_t * new_max_cache_size_ptr,
- hbool_t write_permitted);
+ hid_t dxpl_id,
+ double hit_rate,
+ enum H5C_resize_status * status_ptr,
+ size_t * new_max_cache_size_ptr,
+ hbool_t write_permitted);
static herr_t H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr);
static herr_t H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
hid_t dxpl_id,
- H5C_t * cache_ptr,
hbool_t write_permitted);
static herr_t H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr);
@@ -172,34 +150,31 @@ static herr_t H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr);
static herr_t H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr);
static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr,
- size_t old_entry_size,
- size_t new_entry_size);
+ size_t old_entry_size,
+ size_t new_entry_size);
-static herr_t H5C_flush_single_entry(const H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- const H5C_class_t * type_ptr,
- haddr_t addr,
- unsigned flags,
- hbool_t del_entry_from_slist_on_destroy);
+static herr_t H5C_flush_single_entry(const H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type_ptr,
+ haddr_t addr,
+ unsigned flags,
+ hbool_t del_entry_from_slist_on_destroy);
static herr_t H5C_flush_invalidate_cache(const H5F_t * f,
hid_t dxpl_id,
- H5C_t * cache_ptr,
unsigned flags);
-static void * H5C_load_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * udata_ptr);
+static void * H5C_load_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * udata_ptr);
-static herr_t H5C_make_space_in_cache(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- size_t space_needed,
- hbool_t write_permitted);
+static herr_t H5C_make_space_in_cache(H5F_t * f,
+ hid_t dxpl_id,
+ size_t space_needed,
+ hbool_t write_permitted);
#if H5C_DO_EXTREME_SANITY_CHECKS
static herr_t H5C_validate_lru_list(H5C_t * cache_ptr);
@@ -249,7 +224,7 @@ static herr_t H5C_epoch_marker_clear_dirty_bits(haddr_t addr,
size_t len,
void * thing);
-const H5C_class_t epoch_marker_class_2 =
+const H5C_class_t epoch_marker_class =
{
/* id = */ H5C__EPOCH_MARKER_TYPE,
/* name = */ "epoch marker",
@@ -465,14 +440,14 @@ done:
*/
H5C_t *
-H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
- const char * (* type_name_table_ptr),
- H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
- H5C_log_flush_func_t log_flush,
- void * aux_ptr)
+H5C_create(size_t max_cache_size,
+ size_t min_clean_size,
+ int max_type_id,
+ const char * (* type_name_table_ptr),
+ H5C_write_permitted_func_t check_write_permitted,
+ hbool_t write_permitted,
+ H5C_log_flush_func_t log_flush,
+ void * aux_ptr)
{
int i;
H5C_t * cache_ptr = NULL;
@@ -630,7 +605,7 @@ H5C_create(size_t max_cache_size,
((cache_ptr->epoch_markers)[i]).size = (size_t)0;
((cache_ptr->epoch_markers)[i]).image_ptr = NULL;
((cache_ptr->epoch_markers)[i]).image_up_to_date = FALSE;
- ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class_2;
+ ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class;
((cache_ptr->epoch_markers)[i]).is_dirty = FALSE;
((cache_ptr->epoch_markers)[i]).dirtied = FALSE;
((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
@@ -794,13 +769,13 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
switch ( status )
{
- case in_spec2:
+ case in_spec:
HDfprintf(stdout,
"%sAuto cache resize -- no change. (hit rate = %lf)\n",
cache_ptr->prefix, hit_rate);
break;
- case increase2:
+ case increase:
HDassert( hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold );
HDassert( old_max_cache_size < new_max_cache_size );
@@ -818,26 +793,25 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
new_min_clean_size);
break;
- case flash_increase2:
- HDassert( old_max_cache_size < new_max_cache_size );
-
- HDfprintf(stdout,
- "%sflash cache resize(%d) -- size threshold = %Zu.\n",
- cache_ptr->prefix,
- (int)((cache_ptr->resize_ctl).flash_incr_mode),
- cache_ptr->flash_size_increase_threshold);
+ case flash_increase:
+ HDassert( old_max_cache_size < new_max_cache_size );
- HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
- cache_ptr->prefix,
- old_max_cache_size,
- old_min_clean_size,
- new_max_cache_size,
- new_min_clean_size);
- break;
+ HDfprintf(stdout,
+ "%sflash cache resize(%d) -- size threshold = %Zu.\n",
+ cache_ptr->prefix,
+ (int)((cache_ptr->resize_ctl).flash_incr_mode),
+ cache_ptr->flash_size_increase_threshold);
+ HDfprintf(stdout,
+ "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ cache_ptr->prefix,
+ old_max_cache_size,
+ old_min_clean_size,
+ new_max_cache_size,
+ new_min_clean_size);
+ break;
- case decrease2:
+ case decrease:
HDassert( old_max_cache_size > new_max_cache_size );
switch ( (cache_ptr->resize_ctl).decr_mode )
@@ -887,7 +861,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
new_min_clean_size);
break;
- case at_max_size2:
+ case at_max_size:
HDfprintf(stdout,
"%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n",
cache_ptr->prefix, hit_rate,
@@ -897,7 +871,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix);
break;
- case at_min_size2:
+ case at_min_size:
HDfprintf(stdout,
"%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n",
cache_ptr->prefix, hit_rate);
@@ -905,19 +879,19 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix);
break;
- case increase_disabled2:
+ case increase_disabled:
HDfprintf(stdout,
"%sAuto cache resize -- increase disabled -- HR = %lf.",
cache_ptr->prefix, hit_rate);
break;
- case decrease_disabled2:
+ case decrease_disabled:
HDfprintf(stdout,
"%sAuto cache resize -- decrease disabled -- HR = %lf.\n",
cache_ptr->prefix, hit_rate);
break;
- case not_full2:
+ case not_full:
HDassert( hit_rate < (cache_ptr->resize_ctl).lower_hr_threshold );
HDfprintf(stdout,
@@ -1116,37 +1090,28 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_expunge_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr)
+H5C_expunge_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_expunge_entry, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) )
- {
- HDfprintf(stdout, "%s: addr = 0x%lX, type = %s.\n",
- FUNC, (unsigned long)addr, type->name);
- }
-#endif /* H5C_PRINT_ENTRY_POINTS */
-
HDassert( f );
HDassert( f->shared );
cache_ptr = f->shared->cache;
- HDassert( H5F_addr_defined(addr) );
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( type );
+ HDassert( H5F_addr_defined(addr) );
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
@@ -1207,13 +1172,11 @@ H5C_expunge_entry(H5F_t * f,
*/
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG |
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- TRUE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG,
+ TRUE);
if ( result < 0 ) {
@@ -1231,13 +1194,6 @@ done:
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_PRINT_EXIT_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) ) {
- HDfprintf(stdout, "%s: Exiting with result = %d.\n",
- FUNC, (int)ret_value);
- }
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_expunge_entry() */
@@ -1363,9 +1319,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
+H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr = f->shared->cache;
herr_t status;
herr_t ret_value = SUCCEED;
hbool_t destroy;
@@ -1387,15 +1343,6 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
FUNC_ENTER_NOAPI(H5C_flush_cache, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- HDfprintf(stdout, "%s: flags = 0x%x.\n", FUNC, flags);
-#endif /* H5C_PRINT_ENTRY_POINTS */
-
- HDassert( f );
- HDassert( f->shared );
-
- cache_ptr = f->shared->cache;
-
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f);
@@ -1431,9 +1378,8 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
if ( destroy ) {
status = H5C_flush_invalidate_cache(f,
- dxpl_id,
- cache_ptr,
- flags);
+ dxpl_id,
+ flags);
if ( status < 0 ) {
@@ -1632,12 +1578,11 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
flushed_entries_size += entry_ptr->size;
#endif /* H5C_DO_SANITY_CHECKS */
status = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- flags,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ flags,
+ FALSE);
if ( status < 0 ) {
/* This shouldn't happen -- if it does, we
@@ -1654,12 +1599,11 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags)
flushed_entries_size += entry_ptr->size;
#endif /* H5C_DO_SANITY_CHECKS */
status = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- flags,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ flags,
+ FALSE);
if ( status < 0 ) {
/* This shouldn't happen -- if it does, we are
@@ -1729,11 +1673,6 @@ done:
cache_ptr->flush_in_progress = FALSE;
-#if H5C_PRINT_EXIT_POINTS
- HDfprintf(stdout, "%s: Exiting with result = %d.\n",
- FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_cache() */
@@ -1799,11 +1738,10 @@ done:
*/
herr_t
H5C_flush_to_min_clean(H5F_t * f,
- hid_t dxpl_id)
+ hid_t dxpl_id)
{
H5C_t * cache_ptr;
herr_t result;
- herr_t ret_value = SUCCEED;
hbool_t write_permitted;
#if 0 /* modified code -- commented out for now */
int i;
@@ -1813,6 +1751,7 @@ H5C_flush_to_min_clean(H5F_t * f,
haddr_t * flushed_entries_list = NULL;
H5C_cache_entry_t * entry_ptr = NULL;
#endif /* JRM */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(H5C_flush_to_min_clean, FAIL)
@@ -1848,10 +1787,9 @@ H5C_flush_to_min_clean(H5F_t * f,
}
#if 1 /* original code */
result = H5C_make_space_in_cache(f,
- dxpl_id,
- cache_ptr,
- (size_t)0,
- write_permitted);
+ dxpl_id,
+ (size_t)0,
+ write_permitted);
if ( result < 0 ) {
@@ -1931,8 +1869,7 @@ H5C_flush_to_min_clean(H5F_t * f,
/* Flush the marked entries */
result = H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
- cache_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG |
- H5C__FLUSH_IGNORE_PROTECTED_FLAG);
+ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG);
if ( result < 0 ) {
@@ -1986,10 +1923,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
- H5C_auto_size_ctl_t *config_ptr)
+ H5C_auto_size_ctl_t *config_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2037,13 +1973,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_get_cache_size(H5C_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr)
+ size_t * max_size_ptr,
+ size_t * min_clean_size_ptr,
+ size_t * cur_size_ptr,
+ int32_t * cur_num_entries_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2101,10 +2036,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_get_cache_hit_rate(H5C_t * cache_ptr,
- double * hit_rate_ptr)
+ double * hit_rate_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2168,19 +2102,18 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_get_entry_status(const H5F_t * f,
- haddr_t addr,
- size_t * size_ptr,
- hbool_t * in_cache_ptr,
- hbool_t * is_dirty_ptr,
- hbool_t * is_protected_ptr,
- hbool_t * is_pinned_ptr)
+H5C_get_entry_status(const H5F_t *f,
+ haddr_t addr,
+ size_t * size_ptr,
+ hbool_t * in_cache_ptr,
+ hbool_t * is_dirty_ptr,
+ hbool_t * is_protected_ptr,
+ hbool_t * is_pinned_ptr)
{
- H5C_t * cache_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_get_entry_status, FAIL)
@@ -2260,17 +2193,15 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_get_evictions_enabled(const H5C_t * cache_ptr,
- hbool_t * evictions_enabled_ptr)
+H5C_get_evictions_enabled(const H5C_t *cache_ptr,
+ hbool_t * evictions_enabled_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_get_evictions_enabled, FAIL)
- if ( ( cache_ptr == NULL ) ||
- ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
}
@@ -2339,7 +2270,7 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
*/
herr_t
H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
- FILE ** trace_file_ptr_ptr)
+ FILE **trace_file_ptr_ptr)
{
FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr_from_entry)
@@ -2449,35 +2380,26 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_insert_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * thing,
- unsigned int flags)
+H5C_insert_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * thing,
+ unsigned int flags)
{
- H5C_t * cache_ptr;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
- hbool_t insert_pinned;
- hbool_t set_flush_marker;
- hbool_t write_permitted = TRUE;
+ H5C_t * cache_ptr;
+ herr_t result;
+ hbool_t insert_pinned;
+ hbool_t set_flush_marker;
+ hbool_t write_permitted = TRUE;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * test_entry_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_insert_entry, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) )
- {
- HDfprintf(stdout, "%s: addr = 0x%lX, len = %d, type = %s.\n", FUNC,
- (unsigned long)addr, (int)len, type->name);
- }
-#endif /* JRM */
-
HDassert( f );
HDassert( f->shared );
@@ -2558,8 +2480,7 @@ H5C_insert_entry(H5F_t * f,
if ( ( cache_ptr->flash_size_increase_possible ) &&
( entry_ptr->size > cache_ptr->flash_size_increase_threshold ) ) {
- result = H5C__flash_increase_cache_size(cache_ptr, 0,
- entry_ptr->size);
+ result = H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size);
if ( result < 0 ) {
@@ -2627,10 +2548,9 @@ H5C_insert_entry(H5F_t * f,
*/
result = H5C_make_space_in_cache(f,
- dxpl_id,
- cache_ptr,
- space_needed,
- write_permitted);
+ dxpl_id,
+ space_needed,
+ write_permitted);
if ( result < 0 ) {
@@ -2712,14 +2632,6 @@ done:
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_PRINT_EXIT_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) ) {
- HDfprintf(stdout, "%s: Exiting with result = %d.\n",
- FUNC, (int)ret_value);
- }
-#endif /* H5C_PRINT_EXIT_POINTS */
-
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_insert_entry() */
@@ -2795,16 +2707,14 @@ done:
*
*-------------------------------------------------------------------------
*/
-
#ifdef H5_HAVE_PARALLEL
herr_t
H5C_mark_entries_as_clean(H5F_t * f,
- hid_t dxpl_id,
- int32_t ce_array_len,
- haddr_t * ce_array_ptr)
+ hid_t dxpl_id,
+ int32_t ce_array_len,
+ haddr_t * ce_array_ptr)
{
- H5C_t * cache_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr;
int entries_cleared;
int entries_examined;
int i;
@@ -2818,6 +2728,7 @@ H5C_mark_entries_as_clean(H5F_t * f,
#endif /* H5C_DO_SANITY_CHECKS */
H5C_cache_entry_t * clear_ptr = NULL;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_mark_entries_as_clean, FAIL)
@@ -2903,12 +2814,11 @@ H5C_mark_entries_as_clean(H5F_t * f,
} else {
if ( H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- TRUE) < 0 ) {
+ dxpl_id,
+ entry_ptr->type,
+ addr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG,
+ TRUE) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
}
@@ -2961,12 +2871,11 @@ H5C_mark_entries_as_clean(H5F_t * f,
entries_cleared++;
if ( H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- TRUE) < 0 ) {
+ dxpl_id,
+ clear_ptr->type,
+ clear_ptr->addr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG,
+ TRUE) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
}
@@ -2997,12 +2906,11 @@ H5C_mark_entries_as_clean(H5F_t * f,
entries_cleared++;
if ( H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- clear_ptr->type,
- clear_ptr->addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- TRUE) < 0 ) {
+ dxpl_id,
+ clear_ptr->type,
+ clear_ptr->addr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG,
+ TRUE) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
}
@@ -3074,10 +2982,9 @@ done:
herr_t
H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
size_t size_increase;
- herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_mark_pinned_entry_dirty, FAIL)
@@ -3090,14 +2997,6 @@ H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert((!cache_ptr->mdj_enabled) || cache_ptr->trans_in_progress);
-#if H5C_PRINT_ENTRY_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout,
- "%s: addr = 0x%lX, size_changed = %d, new_size = %d.\n",
- FUNC, (unsigned long)(entry_ptr->addr), (int)size_changed,
- (int)new_size);
-#endif /* JRM */
-
/* Check for usage errors */
if(!entry_ptr->is_pinned)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
@@ -3132,8 +3031,8 @@ H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
/* update the pinned entry list */
H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pel_len), \
- (cache_ptr->pel_size), \
- (entry_ptr->size), (new_size));
+ (cache_ptr->pel_size), \
+ (entry_ptr->size), (new_size));
/* update the hash table */
H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
@@ -3150,11 +3049,11 @@ H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
* transaction list, update that list for the size change as well.
*/
H5C__UPDATE_TL_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), \
- (entry_ptr->size), (new_size));
+ (entry_ptr->size), (new_size));
/* update statistics just before changing the entry size */
H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), \
- (new_size));
+ (new_size));
/* finally, update the entry size proper */
entry_ptr->size = new_size;
@@ -3174,11 +3073,6 @@ H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-#if H5C_PRINT_EXIT_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: Exiting with result = %d.\n", FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_pinned_entry_dirty() */
@@ -3209,7 +3103,7 @@ done:
herr_t
H5C_mark_pinned_or_protected_entry_dirty(void *thing)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
@@ -3222,12 +3116,6 @@ H5C_mark_pinned_or_protected_entry_dirty(void *thing)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-#if H5C_PRINT_ENTRY_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: addr = 0x%lX, type = %s.\n", FUNC,
- (unsigned long)(entry_ptr->addr), entry_ptr->type->name);
-#endif /* JRM */
-
if ( entry_ptr->is_protected ) {
HDassert( ! ((entry_ptr)->is_read_only) );
@@ -3265,11 +3153,6 @@ H5C_mark_pinned_or_protected_entry_dirty(void *thing)
}
done:
-#if H5C_PRINT_EXIT_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: Exiting with result = %d.\n", FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_pinned_or_protected_entry_dirty() */
@@ -3330,14 +3213,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_rename_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t old_addr,
haddr_t new_addr)
{
- herr_t ret_value = SUCCEED; /* Return value */
hbool_t was_dirty;
hbool_t had_jwip;
H5C_cache_entry_t * entry_ptr = NULL;
@@ -3345,18 +3226,10 @@ H5C_rename_entry(H5C_t * cache_ptr,
#if H5C_DO_SANITY_CHECKS
hbool_t removed_entry_from_slist = FALSE;
#endif /* H5C_DO_SANITY_CHECKS */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_rename_entry, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) )
- {
- HDfprintf(stdout, "%s: type = %s, old_addr = 0x%lX, new_addr = 0x%lx.\n",
- FUNC, type->name, (unsigned long)old_addr,
- (unsigned long)new_addr);
- }
-#endif /* JRM */
-
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( type );
@@ -3519,13 +3392,6 @@ done:
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_PRINT_EXIT_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) ) {
- HDfprintf(stdout, "%s: Exiting with result = %d.\n",
- FUNC, (int)ret_value);
- }
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_rename_entry() */
@@ -3551,10 +3417,9 @@ done:
herr_t
H5C_resize_pinned_entry(void *thing, size_t new_size)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
size_t size_increase;
- herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_resize_pinned_entry, FAIL)
@@ -3566,13 +3431,6 @@ H5C_resize_pinned_entry(void *thing, size_t new_size)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-#if H5C_PRINT_ENTRY_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: type = %s, addr = 0x%lX, new_size = %d.\n",
- FUNC, entry_ptr->type->name, (unsigned long)(entry_ptr->addr),
- (int)new_size);
-#endif /* JRM */
-
/* Check for usage errors */
if(new_size <= 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "New size is non-positive.")
@@ -3601,18 +3459,9 @@ H5C_resize_pinned_entry(void *thing, size_t new_size)
size_increase = new_size - entry_ptr->size;
- if ( size_increase >=
- cache_ptr->flash_size_increase_threshold ) {
-
- result = H5C__flash_increase_cache_size(cache_ptr,
- entry_ptr->size,
- new_size);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5C__flash_increase_cache_size failed.")
- }
+ if(size_increase >= cache_ptr->flash_size_increase_threshold) {
+ if(H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
}
}
}
@@ -3662,11 +3511,6 @@ H5C_resize_pinned_entry(void *thing, size_t new_size)
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-#if H5C_PRINT_EXIT_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: Exiting with result = %d.\n", FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_resize_pinned_entry() */
@@ -3689,16 +3533,10 @@ H5C_pin_protected_entry(void *thing)
{
H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_pin_protected_entry, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: addr = 0x%lX, type = %s.\n", FUNC,
- (unsigned long)(entry_ptr->addr), entry_ptr->type->name);
-#endif /* JRM */
-
/* Sanity checks */
HDassert(entry_ptr);
HDassert(H5F_addr_defined(entry_ptr->addr));
@@ -3719,11 +3557,6 @@ H5C_pin_protected_entry(void *thing)
H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
done:
-#if H5C_PRINT_EXIT_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: Exiting with result = %d.\n", FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_pin_protected_entry() */
@@ -3826,15 +3659,14 @@ done:
*
*-------------------------------------------------------------------------
*/
-
void *
-H5C_protect(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * udata,
- unsigned flags)
+H5C_protect(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * udata,
+ unsigned flags)
{
H5C_t * cache_ptr;
hbool_t hit;
@@ -3849,15 +3681,6 @@ H5C_protect(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_protect, NULL)
-#if H5C_PRINT_ENTRY_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) )
- {
- HDfprintf(stdout,
- "%s: addr = 0x%lX, len = %d, type = %s, flags = 0x%x.\n",
- FUNC, (unsigned long)addr, (int)len, type->name, flags);
- }
-#endif /* JRM */
-
/* check args */
HDassert( f );
HDassert( f->shared );
@@ -3999,8 +3822,10 @@ H5C_protect(H5F_t * f,
* see no point in worrying about the fourth.
*/
- result = H5C_make_space_in_cache(f, dxpl_id, cache_ptr,
- space_needed, write_permitted);
+ result = H5C_make_space_in_cache(f,
+ dxpl_id,
+ space_needed,
+ write_permitted);
if ( result < 0 ) {
@@ -4124,7 +3949,6 @@ H5C_protect(H5F_t * f,
result = H5C__auto_adjust_cache_size(f,
dxpl_id,
- cache_ptr,
write_permitted);
if ( result != SUCCEED ) {
@@ -4147,7 +3971,6 @@ H5C_protect(H5F_t * f,
result = H5C_make_space_in_cache(f,
dxpl_id,
- cache_ptr,
(size_t)0,
write_permitted);
@@ -4170,13 +3993,6 @@ done:
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_PRINT_EXIT_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) ) {
- HDfprintf(stdout, "%s: Exiting with result = 0x%lX.\n",
- FUNC, (unsigned long)ret_value);
- }
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_protect() */
@@ -4255,9 +4071,8 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
+H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
herr_t result;
@@ -4395,7 +4210,6 @@ H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
/* flash_size_increase_possible is intentionally omitted from the
* following:
*/
-
cache_ptr->resize_enabled = cache_ptr->size_increase_possible ||
cache_ptr->size_decrease_possible;
@@ -4538,10 +4352,9 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_set_evictions_enabled(H5C_t * cache_ptr,
- hbool_t evictions_enabled)
+H5C_set_evictions_enabled(H5C_t *cache_ptr,
+ hbool_t evictions_enabled)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -5295,11 +5108,6 @@ H5C_unpin_entry(void *_entry_ptr)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-#if H5C_PRINT_ENTRY_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: addr = 0x%lX, type = %s.\n", FUNC, (unsigned long)(entry_ptr->addr), entry_ptr->type->name);
-#endif /* H5C_PRINT_ENTRY_POINTS */
-
/* Error checking */
if(!entry_ptr->is_pinned)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry isn't pinned")
@@ -5315,11 +5123,6 @@ H5C_unpin_entry(void *_entry_ptr)
H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
done:
-#if H5C_PRINT_EXIT_POINTS
- if(H5C_PRINT_ENTRY_POINT_TARGET_TYPE(entry_ptr->type->id))
- HDfprintf(stdout, "%s: Exiting with result = %d.\n", FUNC, (int)ret_value);
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unpin_entry() */
@@ -5428,15 +5231,15 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_unprotect(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags,
- size_t new_size)
+H5C_unprotect(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ void * thing,
+ unsigned int flags,
+ size_t new_size)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
hbool_t deleted;
hbool_t dirtied;
hbool_t set_flush_marker;
@@ -5446,23 +5249,14 @@ H5C_unprotect(H5F_t * f,
#ifdef H5_HAVE_PARALLEL
hbool_t clear_entry = FALSE;
#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
size_t size_increase = 0;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * test_entry_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_unprotect, FAIL)
-#if H5C_PRINT_ENTRY_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) )
- {
- HDfprintf(stdout,
- "%s: addr = 0x%lX, type = %s, flags = 0x%x, new_size = %d.\n",
- FUNC, (unsigned long)addr, type->name, flags, (int)new_size);
- }
-#endif /* JRM */
-
deleted = ( (flags & H5C__DELETED_FLAG) != 0 );
dirtied = ( (flags & H5C__DIRTIED_FLAG) != 0 );
set_flush_marker = ( (flags & H5C__SET_FLUSH_MARKER_FLAG) != 0 );
@@ -5779,13 +5573,11 @@ H5C_unprotect(H5F_t * f,
}
if ( H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- type,
- addr,
- (H5C__FLUSH_CLEAR_ONLY_FLAG |
- H5C__FLUSH_INVALIDATE_FLAG),
- TRUE) < 0 ) {
+ dxpl_id,
+ type,
+ addr,
+ (H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_INVALIDATE_FLAG),
+ TRUE) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush.")
}
@@ -5809,12 +5601,11 @@ H5C_unprotect(H5F_t * f,
}
if ( H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- type,
- addr,
- H5C__FLUSH_CLEAR_ONLY_FLAG,
- TRUE) < 0 ) {
+ dxpl_id,
+ type,
+ addr,
+ H5C__FLUSH_CLEAR_ONLY_FLAG,
+ TRUE) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear.")
}
@@ -5834,13 +5625,6 @@ done:
}
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_PRINT_EXIT_POINTS
- if ( H5C_PRINT_ENTRY_POINT_TARGET_TYPE(type->id) ) {
- HDfprintf(stdout, "%s: Exiting with result = %d.\n",
- FUNC, (int)ret_value);
- }
-#endif /* H5C_PRINT_EXIT_POINTS */
-
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unprotect() */
@@ -6152,13 +5936,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
H5C__auto_adjust_cache_size(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- hbool_t write_permitted)
+ hid_t dxpl_id,
+ hbool_t write_permitted)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t result;
hbool_t inserted_epoch_marker = FALSE;
size_t new_max_cache_size = 0;
@@ -6166,7 +5949,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
size_t new_min_clean_size = 0;
size_t old_min_clean_size = 0;
double hit_rate;
- enum H5C_resize_status status = in_spec2; /* will change if needed */
+ enum H5C_resize_status status = in_spec; /* will change if needed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C__auto_adjust_cache_size)
@@ -6209,18 +5992,18 @@ H5C__auto_adjust_cache_size(H5F_t * f,
if ( ! cache_ptr->size_increase_possible ) {
- status = increase_disabled2;
+ status = increase_disabled;
} else if ( cache_ptr->max_cache_size >=
(cache_ptr->resize_ctl).max_size ) {
HDassert( cache_ptr->max_cache_size == \
(cache_ptr->resize_ctl).max_size );
- status = at_max_size2;
+ status = at_max_size;
} else if ( ! cache_ptr->cache_full ) {
- status = not_full2;
+ status = not_full;
} else {
@@ -6245,7 +6028,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
(cache_ptr->resize_ctl).max_increment;
}
- status = increase2;
+ status = increase;
}
}
break;
@@ -6293,10 +6076,10 @@ H5C__auto_adjust_cache_size(H5F_t * f,
/* don't run the cache size decrease code unless the cache size
* increase code is disabled, or the size increase code sees no need
- * for action. In either case, status == in_spec2 at this point.
+ * for action. In either case, status == in_spec at this point.
*/
- if ( status == in_spec2 ) {
+ if ( status == in_spec ) {
switch ( (cache_ptr->resize_ctl).decr_mode )
{
@@ -6308,14 +6091,14 @@ H5C__auto_adjust_cache_size(H5F_t * f,
if ( ! cache_ptr->size_decrease_possible ) {
- status = decrease_disabled2;
+ status = decrease_disabled;
} else if ( cache_ptr->max_cache_size <=
(cache_ptr->resize_ctl).min_size ) {
HDassert( cache_ptr->max_cache_size ==
(cache_ptr->resize_ctl).min_size );
- status = at_min_size2;
+ status = at_min_size;
} else {
@@ -6341,7 +6124,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
(cache_ptr->resize_ctl).max_decrement;
}
- status = decrease2;
+ status = decrease;
}
}
break;
@@ -6352,17 +6135,16 @@ H5C__auto_adjust_cache_size(H5F_t * f,
if ( ! cache_ptr->size_decrease_possible ) {
- status = decrease_disabled2;
+ status = decrease_disabled;
} else {
result = H5C__autoadjust__ageout(f,
- dxpl_id,
- cache_ptr,
- hit_rate,
- &status,
- &new_max_cache_size,
- write_permitted);
+ dxpl_id,
+ hit_rate,
+ &status,
+ &new_max_cache_size,
+ write_permitted);
if ( result != SUCCEED ) {
@@ -6399,7 +6181,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
}
}
- if ( ( status == increase2 ) || ( status == decrease2 ) ) {
+ if ( ( status == increase ) || ( status == decrease ) ) {
old_max_cache_size = cache_ptr->max_cache_size;
old_min_clean_size = cache_ptr->min_clean_size;
@@ -6422,11 +6204,11 @@ H5C__auto_adjust_cache_size(H5F_t * f,
cache_ptr->max_cache_size = new_max_cache_size;
cache_ptr->min_clean_size = new_min_clean_size;
- if ( status == increase2 ) {
+ if ( status == increase ) {
cache_ptr->cache_full = FALSE;
- } else if ( status == decrease2 ) {
+ } else if ( status == decrease ) {
cache_ptr->size_decreased = TRUE;
}
@@ -6511,26 +6293,25 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
H5C__autoadjust__ageout(H5F_t * f,
hid_t dxpl_id,
- H5C_t * cache_ptr,
double hit_rate,
enum H5C_resize_status * status_ptr,
size_t * new_max_cache_size_ptr,
hbool_t write_permitted)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr = f->shared->cache;
herr_t result;
size_t test_size;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout)
HDassert( f );
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( ( status_ptr ) && ( *status_ptr == in_spec2 ) );
+ HDassert( ( status_ptr ) && ( *status_ptr == in_spec ) );
HDassert( ( new_max_cache_size_ptr ) && ( *new_max_cache_size_ptr == 0 ) );
/* remove excess epoch markers if any */
@@ -6559,19 +6340,8 @@ H5C__autoadjust__ageout(H5F_t * f,
if ( cache_ptr->max_cache_size > (cache_ptr->resize_ctl).min_size ){
/* evict aged out cache entries if appropriate... */
- result = H5C__autoadjust__ageout__evict_aged_out_entries
- (
- f,
- dxpl_id,
- cache_ptr,
- write_permitted
- );
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "error flushing aged out entries.")
- }
+ if(H5C__autoadjust__ageout__evict_aged_out_entries(f, dxpl_id, write_permitted) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries.")
/* ... and then reduce cache size if appropriate */
if ( cache_ptr->index_size < cache_ptr->max_cache_size ) {
@@ -6583,16 +6353,16 @@ H5C__autoadjust__ageout(H5F_t * f,
if ( test_size < cache_ptr->max_cache_size ) {
- *status_ptr = decrease2;
+ *status_ptr = decrease;
*new_max_cache_size_ptr = test_size;
}
} else {
- *status_ptr = decrease2;
+ *status_ptr = decrease;
*new_max_cache_size_ptr = cache_ptr->index_size;
}
- if ( *status_ptr == decrease2 ) {
+ if ( *status_ptr == decrease ) {
/* clip to min size if necessary */
if ( *new_max_cache_size_ptr <
@@ -6615,7 +6385,7 @@ H5C__autoadjust__ageout(H5F_t * f,
}
} else {
- *status_ptr = at_min_size2;
+ *status_ptr = at_min_size;
}
}
@@ -6795,21 +6565,20 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- hbool_t write_permitted)
+ hid_t dxpl_id,
+ hbool_t write_permitted)
{
- herr_t result;
- size_t eviction_size_limit;
- size_t bytes_evicted = 0;
- hbool_t prev_is_dirty = FALSE;
+ H5C_t * cache_ptr = f->shared->cache;
+ herr_t result;
+ size_t eviction_size_limit;
+ size_t bytes_evicted = 0;
+ hbool_t prev_is_dirty = FALSE;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * next_ptr;
H5C_cache_entry_t * prev_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C__autoadjust__ageout__evict_aged_out_entries)
@@ -6853,23 +6622,21 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
if ( entry_ptr->is_dirty ) {
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__NO_FLAGS_SET,
+ FALSE);
} else {
bytes_evicted += entry_ptr->size;
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- TRUE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG,
+ TRUE);
}
if ( result < 0 ) {
@@ -6891,12 +6658,12 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
} else
#endif /* NDEBUG */
if ( ( prev_ptr->is_dirty != prev_is_dirty )
- ||
- ( prev_ptr->next != next_ptr )
- ||
- ( prev_ptr->is_protected )
- ||
- ( prev_ptr->is_pinned ) ) {
+ ||
+ ( prev_ptr->next != next_ptr )
+ ||
+ ( prev_ptr->is_protected )
+ ||
+ ( prev_ptr->is_pinned ) ) {
/* something has happened to the LRU -- start over
* from the tail.
@@ -6961,12 +6728,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
if ( ! (entry_ptr->is_dirty) ) {
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- TRUE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG,
+ TRUE);
if ( result < 0 ) {
@@ -7283,22 +7049,22 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
H5C__flash_increase_cache_size(H5C_t * cache_ptr,
- size_t old_entry_size,
- size_t new_entry_size)
+ size_t old_entry_size,
+ size_t new_entry_size)
{
- size_t new_max_cache_size = 0;
- size_t old_max_cache_size = 0;
- size_t new_min_clean_size = 0;
- size_t old_min_clean_size = 0;
- size_t space_needed;
- enum H5C_resize_status status = flash_increase2; /* may change */
- double hit_rate;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t new_max_cache_size = 0;
+ size_t old_max_cache_size = 0;
+ size_t new_min_clean_size = 0;
+ size_t old_min_clean_size = 0;
+ size_t space_needed;
+ enum H5C_resize_status status = flash_increase; /* may change */
+ double hit_rate;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C__flash_increase_cache_size)
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->flash_size_increase_possible );
@@ -7329,8 +7095,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
case H5C_flash_incr__add_space:
if ( cache_ptr->index_size < cache_ptr->max_cache_size ) {
- HDassert( (cache_ptr->max_cache_size -
- cache_ptr->index_size)
+ HDassert( (cache_ptr->max_cache_size - cache_ptr->index_size)
< space_needed );
space_needed -= cache_ptr->max_cache_size -
cache_ptr->index_size;
@@ -7431,7 +7196,6 @@ done:
} /* H5C__flash_increase_cache_size() */
-
/*-------------------------------------------------------------------------
* Function: H5C_flush_invalidate_cache
@@ -7470,14 +7234,10 @@ done:
*
* Modifications:
*
- * To support the fractal heap, the cache must now deal with
- * entries being dirtied, resized, and/or renamed inside
- * flush callbacks. Updated function to support this.
+ * To support the fractal heap, the cache must now deal with
+ * entries being dirtied, resized, and/or renamed inside
+ * flush callbacks. Updated function to support this.
*
- * Reworked argument list and code to reflect the
- * removal of the secondary dxpl id, and the decision
- * to store f in H5C_t, removing the need to pass it
- * in all the time.
* -- JRM 8/27/06
*
* Added code to detect and manage the case in which a
@@ -7496,14 +7256,19 @@ done:
*
* -- JRM 10/13/07
*
+ * Reworked argument list and code to reflect the
+ * removal of the secondary dxpl id, and the decision
+ * to store f in H5C_t, removing the need to pass it
+ * in all the time.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
H5C_flush_invalidate_cache(const H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- unsigned flags)
+ hid_t dxpl_id,
+ unsigned flags)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t status;
hbool_t done = FALSE;
int32_t protected_entries = 0;
@@ -7612,8 +7377,7 @@ H5C_flush_invalidate_cache(const H5F_t * f,
"next_entry_ptr == NULL 1 ?!?!");
}
#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
+ HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
#endif /* NDEBUG */
HDassert( next_entry_ptr->is_dirty );
HDassert( next_entry_ptr->in_slist );
@@ -7773,12 +7537,11 @@ H5C_flush_invalidate_cache(const H5F_t * f,
*/
status = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__NO_FLAGS_SET,
+ FALSE);
if ( status < 0 ) {
/* This shouldn't happen -- if it does, we are toast
@@ -7792,13 +7555,11 @@ H5C_flush_invalidate_cache(const H5F_t * f,
} else {
status = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- (cooked_flags |
- H5C__FLUSH_INVALIDATE_FLAG),
- TRUE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG),
+ TRUE);
if ( status < 0 ) {
/* This shouldn't happen -- if it does, we are toast so
@@ -7871,15 +7632,12 @@ H5C_flush_invalidate_cache(const H5F_t * f,
}
} else if ( ! ( entry_ptr->is_pinned ) ) {
- status =
- H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- (cooked_flags |
- H5C__FLUSH_INVALIDATE_FLAG),
- TRUE);
+ status = H5C_flush_single_entry(f,
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ (cooked_flags | H5C__FLUSH_INVALIDATE_FLAG),
+ TRUE);
if ( status < 0 ) {
/* This shouldn't happen -- if it does, we are toast so
@@ -8110,27 +7868,26 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
-H5C_flush_single_entry(const H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- const H5C_class_t * type_ptr,
- haddr_t addr,
- unsigned flags,
- hbool_t del_entry_from_slist_on_destroy)
+H5C_flush_single_entry(const H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type_ptr,
+ haddr_t addr,
+ unsigned flags,
+ hbool_t del_entry_from_slist_on_destroy)
{
- hbool_t destroy;
- hbool_t clear_only;
- hbool_t was_dirty;
- herr_t ret_value = SUCCEED; /* Return value */
- herr_t status;
- int type_id;
- unsigned serialize_flags = 0;
- haddr_t new_addr;
- size_t new_len;
- void * new_image_ptr;
+ H5C_t * cache_ptr = f->shared->cache;
+ hbool_t destroy;
+ hbool_t clear_only;
+ hbool_t was_dirty;
+ herr_t status;
+ int type_id;
+ unsigned serialize_flags = 0;
+ haddr_t new_addr;
+ size_t new_len;
+ void * new_image_ptr;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C_flush_single_entry)
@@ -8143,11 +7900,9 @@ H5C_flush_single_entry(const H5F_t * f,
destroy = ( (flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 );
clear_only = ( (flags & H5C__FLUSH_CLEAR_ONLY_FLAG) != 0);
-
/* attempt to find the target entry in the hash table */
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
-
#if H5C_DO_SANITY_CHECKS
if ( entry_ptr != NULL ) {
@@ -8155,8 +7910,7 @@ H5C_flush_single_entry(const H5F_t * f,
if ( entry_ptr->in_slist ) {
- if ( ( ( entry_ptr->flush_marker ) && ( ! entry_ptr->is_dirty ) )
- ||
+ if ( ( ( entry_ptr->flush_marker ) && ( ! entry_ptr->is_dirty ) ) ||
( entry_ptr->addr != addr ) ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
@@ -8179,14 +7933,13 @@ H5C_flush_single_entry(const H5F_t * f,
*/
else {
HDfprintf(stdout,
- "H5C_flush_single_entry(): non-existant entry. addr = 0x%lx\n",
- (long)addr);
+ "H5C_flush_single_entry(): non-existant entry. addr = %a\n",
+ addr);
HDfflush(stdout);
}
#endif
#endif /* H5C_DO_SANITY_CHECKS */
-
if ( ( entry_ptr != NULL ) && ( entry_ptr->is_protected ) )
{
@@ -8195,7 +7948,6 @@ H5C_flush_single_entry(const H5F_t * f,
"Attempt to flush a protected entry.")
}
-
if ( ( entry_ptr != NULL ) &&
( ( type_ptr == NULL ) || ( type_ptr->id == entry_ptr->type->id ) ) )
{
@@ -8450,10 +8202,8 @@ H5C_flush_single_entry(const H5F_t * f,
}
}
-
/* Clear the dirty flag only, if requested */
- if ( clear_only )
- {
+ if ( clear_only ) {
if ( entry_ptr->is_dirty )
{
#ifndef NDEBUG
@@ -8762,10 +8512,8 @@ H5C_flush_single_entry(const H5F_t * f,
entry_ptr->flush_in_progress = FALSE;
}
-
if ( cache_ptr->log_flush ) {
- /* JRM */ /* may want to update this */
status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty,
flags, type_id);
@@ -8833,20 +8581,19 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static void *
-H5C_load_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * udata_ptr)
+H5C_load_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * udata_ptr)
{
- hbool_t dirty = FALSE;
- void * image_ptr = NULL;
- void * thing = NULL;
+ hbool_t dirty = FALSE;
+ void * image_ptr = NULL;
+ void * thing = NULL;
H5C_cache_entry_t * entry_ptr = NULL;
- void * ret_value = NULL;
+ void * ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT(H5C_load_entry)
@@ -9108,22 +8855,21 @@ done:
*
*-------------------------------------------------------------------------
*/
-
static herr_t
-H5C_make_space_in_cache(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- size_t space_needed,
- hbool_t write_permitted)
+H5C_make_space_in_cache(H5F_t * f,
+ hid_t dxpl_id,
+ size_t space_needed,
+ hbool_t write_permitted)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t result;
int32_t entries_examined = 0;
int32_t initial_list_len;
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
size_t empty_space;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- hbool_t prev_is_dirty = FALSE;
- hbool_t entry_is_epoch_maker = FALSE;
+ hbool_t prev_is_dirty = FALSE;
+ hbool_t entry_is_epoch_maker = FALSE;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * prev_ptr;
H5C_cache_entry_t * next_ptr;
@@ -9169,22 +8915,19 @@ H5C_make_space_in_cache(H5F_t * f,
if ( entry_ptr->is_dirty ) {
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__NO_FLAGS_SET,
+ FALSE);
} else {
- result =
- H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- TRUE);
+ result = H5C_flush_single_entry(f,
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG,
+ TRUE);
}
} else {
@@ -9211,7 +8954,7 @@ H5C_make_space_in_cache(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"*prev_ptr corrupt 1")
- } else
+ }
#endif /* NDEBUG */
if ( entry_is_epoch_maker ) {
@@ -9286,12 +9029,11 @@ H5C_make_space_in_cache(H5F_t * f,
}
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__NO_FLAGS_SET,
- FALSE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__NO_FLAGS_SET,
+ FALSE);
if ( result < 0 ) {
@@ -9388,12 +9130,11 @@ H5C_make_space_in_cache(H5F_t * f,
prev_ptr = entry_ptr->aux_prev;
result = H5C_flush_single_entry(f,
- dxpl_id,
- cache_ptr,
- entry_ptr->type,
- entry_ptr->addr,
- H5C__FLUSH_INVALIDATE_FLAG,
- TRUE);
+ dxpl_id,
+ entry_ptr->type,
+ entry_ptr->addr,
+ H5C__FLUSH_INVALIDATE_FLAG,
+ TRUE);
if ( result < 0 ) {
diff --git a/src/H5C1.c b/src/H5C1.c
index 244cf9c..b1e3d9c 100644
--- a/src/H5C1.c
+++ b/src/H5C1.c
@@ -223,7 +223,7 @@ static herr_t H5C1_epoch_marker_dest(H5F_t *f, void *thing);
static herr_t H5C1_epoch_marker_clear(H5F_t *f, void *thing, hbool_t dest);
static herr_t H5C1_epoch_marker_size(const H5F_t *f, const void *thing, size_t *size_ptr);
-const H5C1_class_t epoch_marker_class =
+const H5C1_class_t epoch_marker_class1 =
{
/* id = */ H5C1__EPOCH_MARKER_TYPE,
/* load = */ &H5C1_epoch_marker_load,
@@ -573,7 +573,7 @@ H5C1_create(size_t max_cache_size,
#endif /* NDEBUG */
((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
((cache_ptr->epoch_markers)[i]).size = (size_t)0;
- ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class;
+ ((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class1;
((cache_ptr->epoch_markers)[i]).is_dirty = FALSE;
((cache_ptr->epoch_markers)[i]).dirtied = FALSE;
((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
diff --git a/src/H5C1pkg.h b/src/H5C1pkg.h
index 6b411c8..865ea52 100644
--- a/src/H5C1pkg.h
+++ b/src/H5C1pkg.h
@@ -801,7 +801,7 @@
#define H5C1__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */
-#define H5C1__H5C1_T_MAGIC 0x005CAC0E
+#define H5C1__H5C1_T_MAGIC 0x005CAC0D
#define H5C1__MAX_NUM_TYPE_IDS 16
#define H5C1__PREFIX_LEN 32
diff --git a/src/H5C1private.h b/src/H5C1private.h
index d508346..8f70525 100644
--- a/src/H5C1private.h
+++ b/src/H5C1private.h
@@ -793,15 +793,15 @@ typedef struct H5C1_cache_entry_t
enum H5C1_resize_status
{
- in_spec,
- increase,
- flash_increase,
- decrease,
- at_max_size,
- at_min_size,
- increase_disabled,
- decrease_disabled,
- not_full
+ in_spec1,
+ increase1,
+ flash_increase1,
+ decrease1,
+ at_max_size1,
+ at_min_size1,
+ increase_disabled1,
+ decrease_disabled1,
+ not_full1
}; /* enum H5C1_resize_conditions */
typedef void (*H5C1_auto_resize_rpt_fcn)(H5C1_t * cache_ptr,
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 08581e6..3925fdd 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -55,15 +55,15 @@
* Programmer: John Mainzer
* 2/6/10
*
- * Purpose: Instances of the H5C_jbrb_sync_q_entry_t structure
+ * Purpose: Instances of the H5C_jbrb_sync_q_entry_t structure
* are used to maintain a queue of pending aio_fsync()
* operations.
*
* The basic idea is to issue a call to aio_fsync()
- * after each transaction if that transaction has
+ * after each transaction if that transaction has
* triggered a buffer write, and place the associated
* AIO control block on a queue of asynchronous syncs
- * in progress. Then, whenever we are asked for the
+ * in progress. Then, whenever we are asked for the
* ID of the last transaction on disk, we simply scan
* this queue to see what if any syncs have completed,
* and update the last transaction on disk accordingly.
@@ -71,18 +71,18 @@
* The fields of this structure are discussed below:
*
*
- * magic: Unsigned 32-bit integer always set to
- * H5C__H5C_JBRB_SYNC_Q_T_MAGIC. This field is used
- * to validate pointers to instances of
+ * magic: Unsigned 32-bit integer always set to
+ * H5C__H5C_JBRB_SYNC_Q_T_MAGIC. This field is used
+ * to validate pointers to instances of
* H5C_jbrb_sync_q_entry_t.
*
* last_trans_in_sync: ID of the last transaction that will be on disk
* when the associated aio_fsync() completes.
*
- * clt_blk Instance of aiocb used in the associated call to
+ * clt_blk Instance of aiocb used in the associated call to
* aio_fsync().
*
- * next: Pointer to the next instance of
+ * next: Pointer to the next instance of
* H5C_jbrb_sync_q_entry_t in the list of same,
* or NULL if there is no next instance.
*
@@ -115,19 +115,19 @@ struct H5C_jbrb_sync_q_entry_t
* The fields of this structure are discussed below:
*
*
- * magic: Unsigned 32-bit integer always set to
- * H5C__H5C_JBRB_T_MAGIC. This field is used to
+ * magic: Unsigned 32-bit integer always set to
+ * H5C__H5C_JBRB_T_MAGIC. This field is used to
* validate pointers to instances of H5C_jbrb_t.
*
* journal_magic: int32_t used to store a randomly selected integer
- * used to tag both the journal file and the
- * mdj_config_block. Should the journal ever be
- * run, we will check to see if the magic number
- * from the target HDF5 file matches that in the
+ * used to tag both the journal file and the
+ * mdj_config_block. Should the journal ever be
+ * run, we will check to see if the magic number
+ * from the target HDF5 file matches that in the
* journal, and refuse to run the journal if it does
* not.
*
- * journal_file_fd: File Descriptor of the journal file that is being
+ * journal_file_fd: File Descriptor of the journal file that is being
* written to from this ring buffer.
*
* num_bufs: The number of journal buffers in the ring buffer. This
@@ -136,11 +136,11 @@ struct H5C_jbrb_sync_q_entry_t
* one for holding the last set of journal entries while
* they are being written to disk).
*
- * buf_size: The size of each journal buffer in the ring buffer.
- * This value is user specified, and will determine how
- * much data each journal buffer can hold before a move
- * to another journal buffer in the ring buffer is
- * necessary. Typically, this will be a multiple of
+ * buf_size: The size of each journal buffer in the ring buffer.
+ * This value is user specified, and will determine how
+ * much data each journal buffer can hold before a move
+ * to another journal buffer in the ring buffer is
+ * necessary. Typically, this will be a multiple of
* the block size of the underlying file system.
*
* bufs_in_use: This is the current number of dirty journal buffers
@@ -153,7 +153,7 @@ struct H5C_jbrb_sync_q_entry_t
* of the formatting changes of the journal file.
*
* get: Number of the journal buffer that is next in line to
- * be written to disk. (i.e. the least recently dirtied
+ * be written to disk. (i.e. the least recently dirtied
* journal buffer).
*
* put: Number of the journal buffer that is currently being
@@ -168,25 +168,25 @@ struct H5C_jbrb_sync_q_entry_t
* human_readable: Boolean flag that indicates whether the journal file
* is to be human readable or machine readable.
*
- * offset_width: If human_readable is FALSE, this field contains the
- * width of offsets in the HDF5 file in bytes (as
- * specified in the superblock -- sizeof_addr in
+ * offset_width: If human_readable is FALSE, this field contains the
+ * width of offsets in the HDF5 file in bytes (as
+ * specified in the superblock -- sizeof_addr in
* H5F_file_t).
*
* If human_readable is TRUE, this field is undefined.
*
* length_width: If human_readable is FALSE, this field contains the
- * width of lengths in the HDF5 file in bytes (as
- * specified in the super block -- sizeof_size in
+ * width of lengths in the HDF5 file in bytes (as
+ * specified in the super block -- sizeof_size in
* H5F_file_t).
*
* chksum_cur_msg: Boolean flag that is only defined if human_readable
* is false. It is used to indicate whether the current
- * journal message must be checksumed. If true, the
+ * journal message must be checksumed. If true, the
* message checksum to date is stored in the msg_chksum
* (discussed below).
*
- * If the journal message is being checksumed, this
+ * If the journal message is being checksumed, this
* field will be set back to FALSE when the checksum
* of the messages is written to buffer.
*
@@ -202,14 +202,14 @@ struct H5C_jbrb_sync_q_entry_t
* cur_trans: Current transaction number, used to differentiate
* between differing journal entries in the journal file.
*
- * last_trans_queued: Number of the last transaction that has been
+ * last_trans_queued: Number of the last transaction that has been
* successfully queued (i.e. the associated aio_write()
* call has returned without error. At present, this
- * field is only defined when use_aio (see above) is
+ * field is only defined when use_aio (see above) is
* TRUE, and only used when use_aio_fsync (see below)
* is TRUE as well.
*
- * last_trans_written: Number of the last transaction that has been
+ * last_trans_written: Number of the last transaction that has been
* successfully written. At present, this field is
* only defined when use_aio (see above) is TRUE.
*
@@ -219,7 +219,7 @@ struct H5C_jbrb_sync_q_entry_t
* trans_in_prog: Boolean flag that indicates if a transaction is in
* progress or not.
*
- * jname: Character array containing the name of the journal
+ * jname: Character array containing the name of the journal
* file.
*
* hdf5_file_name: Character array containing the name of the HDF5 file
@@ -234,14 +234,14 @@ struct H5C_jbrb_sync_q_entry_t
* ring buffer needs to switch to writing to the next
* journal buffer.
*
- * rb_space_to_rollover: The amount of space left at the end of the ring
+ * rb_space_to_rollover: The amount of space left at the end of the ring
* buffer, starting at the head pointer, and ending at
* the end of the ring buffer's allocate space. This
* is used to keep track of when a rollover to the start
* of the ring buffer must occur.
*
* rb_free_space: The amount of unused space in the ring buffer.
- *
+ *
* head: A pointer to the location in the active journal buffer
* that is to be written to.
*
@@ -251,23 +251,23 @@ struct H5C_jbrb_sync_q_entry_t
* is the last transaction successfully on disk.
*
* aio_ctl_blks An array of size num_bufs of instances of struct
- * aiocb, or NULL if use_aio is FALSE.
+ * aiocb, or NULL if use_aio is FALSE.
*
- * Each instance of struct aiocb is associated with
+ * Each instance of struct aiocb is associated with
* the buffer at the same index in buf, and is used
* to manage posix aio for that buffer.
- *
+ *
* Note that it is said to be good practice to zero
- * out each instance of struct aiocb before each
+ * out each instance of struct aiocb before each
* write.
*
- * aio_next_buf_offset: Offset in the journal file at which to write the
- * next buffer to the journal file. This field is
+ * aio_next_buf_offset: Offset in the journal file at which to write the
+ * next buffer to the journal file. This field is
* undefined if use_aio is FALSE.
*
* use_aio_fsync: Boolean flag indicating whether we should attempt to
* use aio_fsync() to sync out journal writes. This
- * field is initialized to TRUE whenever use_aio (see
+ * field is initialized to TRUE whenever use_aio (see
* above) is set to TRUE, and then set to FALSE
* if we determine that aio_fsync() is not supported
* on the current host.
@@ -280,11 +280,11 @@ struct H5C_jbrb_sync_q_entry_t
*
* aio_sync_q_len: Number of elements on the aio sync queue. Note that
* aio_sync_q_head and aio_sync_q_tail must be NULL
- * if this field contains zero, and may not be NULL if
+ * if this field contains zero, and may not be NULL if
* the sync queue length is greater than zero.
*
* buf: Array of char pointers to each journal buffer in the
- * ring buffer. This is allocated as a single chunk of
+ * ring buffer. This is allocated as a single chunk of
* memory, and thus data can be written past a buffer
* boundary provided it will not extend past the end
* of the total area allocated for the ring buffer.
@@ -295,61 +295,61 @@ struct H5C_jbrb_sync_q_entry_t
* stats collection fields follow:
*
* transactions_completed: uint64_t used to track the number of transactions
- * completed. This is simply the number of calls to
+ * completed. This is simply the number of calls to
* H5C_jb__end_transaction().
*
- * buf_writes_queued: uint64_t used to track the number of asynchronous
- * buffer writes queued (via aio_write()).
+ * buf_writes_queued: uint64_t used to track the number of asynchronous
+ * buffer writes queued (via aio_write()).
*
- * full_buf_writes_queued: uint64_t used to track the number of
- * full asynchronous buffer writes queued
- * (via aio_write()).
+ * full_buf_writes_queued: uint64_t used to track the number of
+ * full asynchronous buffer writes queued
+ * (via aio_write()).
*
* partial_buf_writes_queued; uint64_t used to track the number of
* partial (i.e. writes of a buffer that isn't full)
* buffer writes queued (via aio_write()).
*
- * buf_writes_completed: uint64_t used to track the total number of
+ * buf_writes_completed: uint64_t used to track the total number of
* asynchronous buffer writes (queued via aio_write())
* that have completed.
*
- * buf_writes_completed_by_test: uint64_t used to track the number of
+ * buf_writes_completed_by_test: uint64_t used to track the number of
* asynchronous buffer writes completed by test
- * (i.e. the write was found to be complete in a
+ * (i.e. the write was found to be complete in a
* routine check for completed writes without any
* waiting.)
*
- * buf_writes_completed_by_await: uint64_t used to track the number of
+ * buf_writes_completed_by_await: uint64_t used to track the number of
* asynchronous buffer writes completed by await
- * (i.e. the write was completed via a call to
- * aio_suspend()) because processing could not
+ * (i.e. the write was completed via a call to
+ * aio_suspend()) because processing could not
* continue until the write completed.
*
- * async_syncs_queued: uint64_t used to track the number of asynchronous
+ * async_syncs_queued: uint64_t used to track the number of asynchronous
* syncs queued (via aio_fsync()).
*
*
* async_syncs_completed: uin64_t used to track the number of asynchronous
* syncs completed.
*
- * async_syncs_completed_by_test; uint64_t used to track the number of
+ * async_syncs_completed_by_test; uint64_t used to track the number of
* asynchronous syncs completed by test
- * (i.e. the sync was found to be complete in a
+ * (i.e. the sync was found to be complete in a
* routine check for completed writes without any
* waiting.).
*
- * async_syncs_completed_by_await; uint64_t used to track the number of
+ * async_syncs_completed_by_await; uint64_t used to track the number of
* asynchronous syncs completed by await
* (i.e. the sync was completed busy waiting
* with repeated calls to aio_error()).
*
- * calls_to_aio_error_awaiting_sync: uint64_t used to track the number of
- * calls to aio_error() made while busy waiting for
+ * calls_to_aio_error_awaiting_sync: uint64_t used to track the number of
+ * calls to aio_error() made while busy waiting for
* the completion of aio_fsync()s.
*
- * max_sync_q_len: uint64_t used to track the maximum value of
+ * max_sync_q_len: uint64_t used to track the maximum value of
*
- * calls_to_fsync: uint64_t used to track the number of calls to
+ * calls_to_fsync: uint64_t used to track the number of calls to
* fsync().
*
******************************************************************************/
@@ -368,7 +368,7 @@ struct H5C_jbrb_sync_q_entry_t
#define H5C_JNL__OFFSET_WIDTH_TAG "offset_width"
#define H5C_JNL__LENGTH_WIDTH_TAG "length_width"
-/* signatures and versions used to mark the beginnings of journal file
+/* signatures and versions used to mark the beginnings of journal file
* messages in binary journal files.
*/
@@ -382,7 +382,7 @@ struct H5C_jbrb_sync_q_entry_t
#define H5C_BJNL__END_ADDR_SPACE_SIG "eoas"
#define H5C_BJNL__END_ADDR_SPACE_VER ((uint8_t)(0))
-struct H5C_jbrb_t
+struct H5C_jbrb_t
{
uint32_t magic;
int32_t journal_magic;
@@ -441,12 +441,12 @@ struct H5C_jbrb_t
};
-/* With the introduction of the fractal heap, it is now possible for
+/* With the introduction of the fractal heap, it is now possible for
* entries to be dirtied, resized, and/or renamed in the flush callbacks.
* As a result, on flushes, it may be necessary to make multiple passes
* through the slist before it is empty. The H5C__MAX_PASSES_ON_FLUSH
* #define is used to set an upper limit on the number of passes.
- * The current value was obtained via personal communication with
+ * The current value was obtained via personal communication with
* Quincey. I have applied a fudge factor of 2.
*
* -- JRM
@@ -459,8 +459,8 @@ struct H5C_jbrb_t
*
* structure H5C_mdjsc_record_t
*
- * A dynamically allocate array of instances of H5C_mdjsc_record_t is
- * used to record metadata journaling status change callbacks -- of which
+ * A dynamically allocate array of instances of H5C_mdjsc_record_t is
+ * used to record metadata journaling status change callbacks -- of which
* there can be an arbitrary number.
*
* The fields in the structure are discussed individually below:
@@ -469,20 +469,20 @@ struct H5C_jbrb_t
* to be called on metadata journaling start or stop. NULL
* if this record is not in use.
*
- * Note that the cache must be clean when this callback
+ * Note that the cache must be clean when this callback
* is called.
*
* data_ptr: Pointer to void. This value is supplied on registration,
- * and is passed to *fcn_ptr. NULL if this record is not
+ * and is passed to *fcn_ptr. NULL if this record is not
* in use.
*
* fl_next: Index of the next free entry in the metadata status change
- * callback table, or -1 if there is no next free entry or
+ * callback table, or -1 if there is no next free entry or
* if the entry is in use.
*
****************************************************************************/
-typedef struct H5C_mdjsc_record_t
+typedef struct H5C_mdjsc_record_t
{
H5C_mdj_status_change_func_t fcn_ptr;
void * data_ptr;
@@ -528,11 +528,11 @@ typedef struct H5C_mdjsc_record_t
*
* JRM - 9/26/05
*
- * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
- * This field is used to validate pointers to instances of
+ * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
+ * This field is used to validate pointers to instances of
* H5C_t.
*
- * flush_in_progress: Boolean flag indicating whether a flush is in
+ * flush_in_progress: Boolean flag indicating whether a flush is in
* progress.
*
* trace_file_ptr: File pointer pointing to the trace file, which is used
@@ -541,7 +541,7 @@ typedef struct H5C_mdjsc_record_t
* no trace file should be recorded.
*
* Since much of the code supporting the parallel metadata
- * cache is in H5AC, we don't write the trace file from
+ * cache is in H5AC, we don't write the trace file from
* H5C. Instead, H5AC reads the trace_file_ptr as needed.
*
* When we get to using H5C in other places, we may add
@@ -614,7 +614,7 @@ typedef struct H5C_mdjsc_record_t
* writes. The following field is used to implement this.
*
* evictions_enabled: Boolean flag that is initialized to TRUE. When
- * this flag is set to FALSE, the metadata cache will not
+ * this flag is set to FALSE, the metadata cache will not
* attempt to evict entries to make space for newly protected
* entries, and instead the will grow without limit.
*
@@ -688,7 +688,7 @@ typedef struct H5C_mdjsc_record_t
* following two fields have been added. They are only compiled in when
* H5C_DO_SANITY_CHECKS is TRUE.
*
- * slist_len_increase: Number of entries that have been added to the
+ * slist_len_increase: Number of entries that have been added to the
* slist since the last time this field was set to zero.
*
* slist_size_increase: Total size of all entries that have been added
@@ -1011,39 +1011,39 @@ typedef struct H5C_mdjsc_record_t
*
* Metadata journaling fields:
*
- * The following fields are used to support metadata journaling. The
+ * The following fields are used to support metadata journaling. The
* objective here is to journal all changes in metadata, so that we will
* be able to re-construct a HDF5 file with a consistent set of metadata
* in the event of a crash.
*
- * mdj_enabled: Boolean flag used to indicate whether journaling is
- * currently enabled. In general, the values of the
- * remaining fields in this section are undefined if
+ * mdj_enabled: Boolean flag used to indicate whether journaling is
+ * currently enabled. In general, the values of the
+ * remaining fields in this section are undefined if
* mdj_enabled is FALSE.
*
* trans_in_progress Boolean flag used to indicate whether a metadata
- * transaction is in progress.
+ * transaction is in progress.
*
- * For purposes of metadata journaling, a transaction is a
- * sequence of operations on metadata selected such that
- * the HDF5 file metadata is in a consistent state both at
- * the beginning and at the end of the sequence.
+ * For purposes of metadata journaling, a transaction is a
+ * sequence of operations on metadata selected such that
+ * the HDF5 file metadata is in a consistent state both at
+ * the beginning and at the end of the sequence.
*
* At least to begin with, transactions will be closely tied
* to user level API calls.
*
- * trans_api_name: Array of char of length H5C__MAX_API_NAME_LEN + 1. Used
- * to store the name of the API call associated with the
+ * trans_api_name: Array of char of length H5C__MAX_API_NAME_LEN + 1. Used
+ * to store the name of the API call associated with the
* current transaction.
*
- * trans_num: uint64_t containing the id assigned to the current
- * transaction (if trans_in_progress is TRUE), or of the
+ * trans_num: uint64_t containing the id assigned to the current
+ * transaction (if trans_in_progress is TRUE), or of the
* last transaction completed (if trans_in_progress is FALSE),
* or zero if no transaction has been initiated yet.
*
- * last_trans_on_disk: uint64_t containing the id assigned to the
+ * last_trans_on_disk: uint64_t containing the id assigned to the
* last transaction all of whose associated journal entries
- * are on disk in the journal file.
+ * are on disk in the journal file.
*
* We must track this value, as to avoid messages from the
* future, we must not write a cache entry to file until
@@ -1052,21 +1052,21 @@ typedef struct H5C_mdjsc_record_t
* file.
*
* jnl_magic: Randomly selected int32_t used to reduce the possibility
- * of running the wrong journal on an HDF5 file. The basic
- * idea is to pick a random number, store it in both the HDF5
- * file and the journal file, and then refuse to run the
+ * of running the wrong journal on an HDF5 file. The basic
+ * idea is to pick a random number, store it in both the HDF5
+ * file and the journal file, and then refuse to run the
* journal unless the numbers match.
*
* jnl_file_name_len: Length of the journal file name, or zero if the
* journal file name is undefined.
*
- * jnl_file_name: Array of char of length H5C__MAX_JOURNAL_FILE_NAME_LEN
+ * jnl_file_name: Array of char of length H5C__MAX_JOURNAL_FILE_NAME_LEN
* + 1 used to store the journal file path.
*
* mdj_jbrb: Instance of H5C_jbrb_t used to manage logging of journal
* entries to the journal file.
*
- * While a transaction is in progress, we must maintain a list of the
+ * While a transaction is in progress, we must maintain a list of the
* entries that have been modified during the transaction so we can
* generate the appropriate journal entries. The following fields are
* used to maintain this list:
@@ -1077,56 +1077,56 @@ typedef struct H5C_mdjsc_record_t
* transaction list.
*
* tl_head_ptr: Pointer to the head of the doubly linked list of entries
- * dirtied in the current transaction. Note that cache entries
- * on this list are linked by their trans_next and trans_prev
+ * dirtied in the current transaction. Note that cache entries
+ * on this list are linked by their trans_next and trans_prev
* fields.
*
* This field is NULL if the list is empty.
*
* tl_tail_ptr: Pointer to the tail of the doubly linked list of entries
- * dirtied in the current transaction. Note that cache entries
- * on this list are linked by their trans_next and trans_prev
+ * dirtied in the current transaction. Note that cache entries
+ * on this list are linked by their trans_next and trans_prev
* fields.
*
* This field is NULL if the list is empty.
*
- * When an entry is dirtied in a transaction, we must not flush it until
- * all the journal entries generated by the transaction have reached disk
+ * When an entry is dirtied in a transaction, we must not flush it until
+ * all the journal entries generated by the transaction have reached disk
* in the journal file.
*
* We could just leave these entries in the LRU and skip over them when
- * we scan the list for candidates for eviction. However, this will be
+ * we scan the list for candidates for eviction. However, this will be
* costly, so we store them on the journal write in progress list instead
- * until all the journal entries for the specified transaction reaches
+ * until all the journal entries for the specified transaction reaches
* disk.
*
- * jwipl_len: Number of entries currently residing on the journal
+ * jwipl_len: Number of entries currently residing on the journal
* entry write in progress list.
*
* jwipl_size: Number of bytes of cache entries currently residing on the
* journal entry write in progress list.
*
* jwipl_head_ptr: Pointer to the head of the doubly linked list of entries
- * dirtied in some transaction n, where at least some of the
+ * dirtied in some transaction n, where at least some of the
* journal entries generated in transaction n have not yet
* made it to disk in the journal file.
*
- * Entries on this list are linked by their next and prev
+ * Entries on this list are linked by their next and prev
* fields.
*
* This field is NULL if the list is empty.
*
* jwipl_tail_ptr: Pointer to the tail of the doubly linked list of entries
- * dirtied in some transaction n, where at least some of the
+ * dirtied in some transaction n, where at least some of the
* journal entries generated in transaction n have not yet
* made it to disk in the journal file.
*
- * Entries on this list are linked by their next and prev
+ * Entries on this list are linked by their next and prev
* fields.
*
* This field is NULL if the list is empty.
*
- * It is necessary to turn off some optimization while journaling is
+ * It is necessary to turn off some optimization while journaling is
* in progress, so as to avoid generating dirty metadata during a flush.
* The following fields are used to maintain a list of functions to be
* called when journaling is enabled or disabled. Note that the metadata
@@ -1134,15 +1134,15 @@ typedef struct H5C_mdjsc_record_t
*
* The metadata journaling status change callback table is initaly allocated
* with H5C__MIN_MDJSC_CB_TBL_LEN entries. The table size is doubled
- * whenever an entry is added to a full table, and halved whenever the
- * active entries to total entries ratio drops below
- * H5C__MDJSC_CB_TBL_MIN_ACTIVE_RATIO and the upper half of the table is
- * empty (Since entries are removed from the table by specifying the
+ * whenever an entry is added to a full table, and halved whenever the
+ * active entries to total entries ratio drops below
+ * H5C__MDJSC_CB_TBL_MIN_ACTIVE_RATIO and the upper half of the table is
+ * empty (Since entries are removed from the table by specifying the
* index of the entry, we can't compress the table).
*
* mdjsc_cb_tbl: Base address of a dynamically allocated array of instances
- * of H5C_mdjsc_record_t used to record an arbitrarily long
- * list of functions to call whenever journaling is enabled or
+ * of H5C_mdjsc_record_t used to record an arbitrarily long
+ * list of functions to call whenever journaling is enabled or
* disabled.
*
* mdjsc_cb_tbl_len: Number of entries currently allocated in *mdjsc_cb_tbl.
@@ -1154,7 +1154,7 @@ typedef struct H5C_mdjsc_record_t
* or -1 if the table is full.
*
* mdjsc_cb_tbl_max_idx_in_use: Maximum of the indicies of metadata journaling
- * status change callback table entries in use, or -1 if the
+ * status change callback table entries in use, or -1 if the
* table is empty;
*
* Statistics collection fields:
@@ -1173,23 +1173,23 @@ typedef struct H5C_mdjsc_record_t
* equal to the array index has not been in cache when
* requested in the current epoch.
*
- * write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been write protected
+ * write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been write protected
* in the current epoch.
*
* Observe that (hits + misses) = (write_protects + read_protects).
*
- * read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been read protected in
+ * read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been read protected in
* the current epoch.
*
* Observe that (hits + misses) = (write_protects + read_protects).
*
- * max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to maximum number of simultaneous read
- * protects on any entry with type id equal to the array index
+ * max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to maximum number of simultaneous read
+ * protects on any entry with type id equal to the array index
* in the current epoch.
*
* insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
@@ -1197,9 +1197,9 @@ typedef struct H5C_mdjsc_record_t
* id equal to the array index has been inserted into the
* cache in the current epoch.
*
- * pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been inserted
+ * pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been inserted
* pinned into the cache in the current epoch.
*
* clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
@@ -1222,13 +1222,13 @@ typedef struct H5C_mdjsc_record_t
* id equal to the array index has been renamed in the current
* epoch.
*
- * entry_flush_renames: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
+ * entry_flush_renames: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
* with type id equal to the array index has been renamed
* during its flush callback in the current epoch.
*
- * cache_flush_renames: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
+ * cache_flush_renames: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
+ * The cells are used to record the number of times an entry
* with type id equal to the array index has been renamed
* during a cache flush in the current epoch.
*
@@ -1267,14 +1267,14 @@ typedef struct H5C_mdjsc_record_t
* with type id equal to the array index has decreased in
* size in the current epoch.
*
- * entry_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
+ * entry_flush_size_changes: Array of int64 of length
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
* array index has changed size while in its flush callback.
*
- * cache_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
+ * cache_flush_size_changes: Array of int64 of length
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
* array index has changed size during a cache flush
*
* total_ht_insertions: Number of times entries have been inserted into the
@@ -1384,10 +1384,10 @@ typedef struct H5C_mdjsc_record_t
#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */
-#define H5C__H5C_T_MAGIC 0x005CAC0F
-#define H5C__MAX_NUM_TYPE_IDS 18
+#define H5C__H5C_T_MAGIC 0x005CAC0E
+#define H5C__MAX_NUM_TYPE_IDS 18
#define H5C__PREFIX_LEN 32
-#define H5C__MAX_API_NAME_LEN 128
+#define H5C__MAX_API_NAME_LEN 128
#define H5C__MIN_MDJSC_CB_TBL_LEN 16
#define H5C__MDJSC_CB_TBL_MIN_ACTIVE_RATIO 0.25
@@ -1417,7 +1417,7 @@ struct H5C_t
int32_t index_len;
size_t index_size;
- H5C_cache_entry_t * (index[H5C__HASH_TABLE_LEN]);
+ H5C_cache_entry_t * (index[H5C__HASH_TABLE_LEN]);
int32_t slist_len;
@@ -1430,37 +1430,37 @@ struct H5C_t
int32_t pl_len;
size_t pl_size;
- H5C_cache_entry_t * pl_head_ptr;
+ H5C_cache_entry_t * pl_head_ptr;
H5C_cache_entry_t * pl_tail_ptr;
int32_t pel_len;
size_t pel_size;
- H5C_cache_entry_t * pel_head_ptr;
+ H5C_cache_entry_t * pel_head_ptr;
H5C_cache_entry_t * pel_tail_ptr;
int32_t LRU_list_len;
size_t LRU_list_size;
- H5C_cache_entry_t * LRU_head_ptr;
- H5C_cache_entry_t * LRU_tail_ptr;
+ H5C_cache_entry_t * LRU_head_ptr;
+ H5C_cache_entry_t * LRU_tail_ptr;
int32_t cLRU_list_len;
size_t cLRU_list_size;
- H5C_cache_entry_t * cLRU_head_ptr;
- H5C_cache_entry_t * cLRU_tail_ptr;
+ H5C_cache_entry_t * cLRU_head_ptr;
+ H5C_cache_entry_t * cLRU_tail_ptr;
int32_t dLRU_list_len;
size_t dLRU_list_size;
- H5C_cache_entry_t * dLRU_head_ptr;
- H5C_cache_entry_t * dLRU_tail_ptr;
+ H5C_cache_entry_t * dLRU_head_ptr;
+ H5C_cache_entry_t * dLRU_tail_ptr;
hbool_t size_increase_possible;
- hbool_t flash_size_increase_possible;
- size_t flash_size_increase_threshold;
+ hbool_t flash_size_increase_possible;
+ size_t flash_size_increase_threshold;
hbool_t size_decrease_possible;
hbool_t resize_enabled;
hbool_t cache_full;
hbool_t size_decreased;
- H5C_auto_size_ctl_t resize_ctl;
+ H5C_auto_size_ctl_t resize_ctl;
int32_t epoch_markers_active;
hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
@@ -1472,7 +1472,7 @@ struct H5C_t
int64_t cache_hits;
int64_t cache_accesses;
-
+
hbool_t mdj_enabled;
hbool_t trans_in_progress;
char trans_api_name[H5C__MAX_API_NAME_LEN];
@@ -1480,23 +1480,23 @@ struct H5C_t
uint64_t last_trans_on_disk;
int32_t jnl_magic;
int32_t jnl_file_name_len;
- char jnl_file_name[H5C__MAX_JOURNAL_FILE_NAME_LEN
+ char jnl_file_name[H5C__MAX_JOURNAL_FILE_NAME_LEN
+ 1];
struct H5C_jbrb_t mdj_jbrb;
int32_t tl_len;
size_t tl_size;
- H5C_cache_entry_t * tl_head_ptr;
- H5C_cache_entry_t * tl_tail_ptr;
+ H5C_cache_entry_t * tl_head_ptr;
+ H5C_cache_entry_t * tl_tail_ptr;
int32_t jwipl_len;
size_t jwipl_size;
- H5C_cache_entry_t * jwipl_head_ptr;
- H5C_cache_entry_t * jwipl_tail_ptr;
+ H5C_cache_entry_t * jwipl_head_ptr;
+ H5C_cache_entry_t * jwipl_tail_ptr;
H5C_mdjsc_record_t * mdjsc_cb_tbl;
int32_t mdjsc_cb_tbl_len;
int32_t num_mdjsc_cbs;
int32_t mdjsc_cb_tbl_fl_head;
int32_t mdjsc_cb_tbl_max_idx_in_use;
-
+
#if H5C_COLLECT_CACHE_STATS
/* stats fields */
@@ -1520,10 +1520,8 @@ struct H5C_t
int64_t pinned_clears[H5C__MAX_NUM_TYPE_IDS + 1];
int64_t size_increases[H5C__MAX_NUM_TYPE_IDS + 1];
int64_t size_decreases[H5C__MAX_NUM_TYPE_IDS + 1];
- int64_t entry_flush_size_changes
- [H5C__MAX_NUM_TYPE_IDS + 1];
- int64_t cache_flush_size_changes
- [H5C__MAX_NUM_TYPE_IDS + 1];
+ int64_t entry_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
+ int64_t cache_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
int64_t total_ht_insertions;
int64_t total_ht_deletions;
@@ -1662,10 +1660,10 @@ struct H5C_t
*
* JRM - 9/8/05
*
- * - Added a set of macros supporting doubly linked lists using the new
- * trans_next and trans_prev fields in H5C_cache_entry_t. These
+ * - Added a set of macros supporting doubly linked lists using the new
+ * trans_next and trans_prev fields in H5C_cache_entry_t. These
* fields are used to maintain a list of entries that have been dirtied
- * in the current transaction. At the end of the transaction, this
+ * in the current transaction. At the end of the transaction, this
* list is used to generate the needed journal entries.
*
* JRM -- 3/27/08
@@ -1861,7 +1859,7 @@ if ( ( (hd_ptr) == NULL ) || \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "aux DLL pre remove SC failed") \
}
-#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \
+#define H5C__AUX_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \
if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
( (head_ptr) != (tail_ptr) ) \
) || \
@@ -1881,7 +1879,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "AUX DLL sanity check failed") \
}
-#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv)\
+#define H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (entry_ptr) == NULL ) || \
( (entry_ptr)->aux_next != NULL ) || \
( (entry_ptr)->aux_prev != NULL ) || \
@@ -1914,158 +1912,143 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__AUX_DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val)\
H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \
- fail_val) \
- if ( (head_ptr) == NULL ) \
- { \
- (head_ptr) = (entry_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- else \
- { \
- (tail_ptr)->aux_next = (entry_ptr); \
- (entry_ptr)->aux_prev = (tail_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- (len)++; \
+ fail_val) \
+ if ( (head_ptr) == NULL ) \
+ { \
+ (head_ptr) = (entry_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ else \
+ { \
+ (tail_ptr)->aux_next = (entry_ptr); \
+ (entry_ptr)->aux_prev = (tail_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ (len)++; \
(Size) += entry_ptr->size;
#define H5C__AUX_DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
H5C__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \
- fv) \
- if ( (head_ptr) == NULL ) \
- { \
- (head_ptr) = (entry_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- else \
- { \
- (head_ptr)->aux_prev = (entry_ptr); \
- (entry_ptr)->aux_next = (head_ptr); \
- (head_ptr) = (entry_ptr); \
- } \
- (len)++; \
+ fv) \
+ if ( (head_ptr) == NULL ) \
+ { \
+ (head_ptr) = (entry_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ else \
+ { \
+ (head_ptr)->aux_prev = (entry_ptr); \
+ (entry_ptr)->aux_next = (head_ptr); \
+ (head_ptr) = (entry_ptr); \
+ } \
+ (len)++; \
(Size) += entry_ptr->size;
#define H5C__AUX_DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \
- fv) \
- { \
- if ( (head_ptr) == (entry_ptr) ) \
- { \
- (head_ptr) = (entry_ptr)->aux_next; \
- if ( (head_ptr) != NULL ) \
- { \
- (head_ptr)->aux_prev = NULL; \
- } \
- } \
- else \
- { \
- (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \
- } \
- if ( (tail_ptr) == (entry_ptr) ) \
- { \
- (tail_ptr) = (entry_ptr)->aux_prev; \
- if ( (tail_ptr) != NULL ) \
- { \
- (tail_ptr)->aux_next = NULL; \
- } \
- } \
- else \
- { \
- (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \
- } \
- entry_ptr->aux_next = NULL; \
- entry_ptr->aux_prev = NULL; \
- (len)--; \
- (Size) -= entry_ptr->size; \
+ fv) \
+ { \
+ if ( (head_ptr) == (entry_ptr) ) \
+ { \
+ (head_ptr) = (entry_ptr)->aux_next; \
+ if ( (head_ptr) != NULL ) \
+ { \
+ (head_ptr)->aux_prev = NULL; \
+ } \
+ } \
+ else \
+ { \
+ (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \
+ } \
+ if ( (tail_ptr) == (entry_ptr) ) \
+ { \
+ (tail_ptr) = (entry_ptr)->aux_prev; \
+ if ( (tail_ptr) != NULL ) \
+ { \
+ (tail_ptr)->aux_next = NULL; \
+ } \
+ } \
+ else \
+ { \
+ (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \
+ } \
+ entry_ptr->aux_next = NULL; \
+ entry_ptr->aux_prev = NULL; \
+ (len)--; \
+ (Size) -= entry_ptr->size; \
}
#if H5C_DO_SANITY_CHECKS
#define H5C__TRANS_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, \
- len, Size, fv) \
-if ( ( (hd_ptr) == NULL ) || \
- ( (tail_ptr) == NULL ) || \
- ( (entry_ptr) == NULL ) || \
- ( (len) <= 0 ) || \
- ( (Size) < (entry_ptr)->size ) || \
- ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) || \
+ len, Size, fv) \
+if ( ( (hd_ptr) == NULL ) || \
+ ( (tail_ptr) == NULL ) || \
+ ( (entry_ptr) == NULL ) || \
+ ( (len) <= 0 ) || \
+ ( (Size) < (entry_ptr)->size ) || \
+ ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) || \
( ( (entry_ptr)->trans_prev == NULL ) && ( (hd_ptr) != (entry_ptr) ) ) || \
- ( ( (entry_ptr)->trans_next == NULL ) && \
- ( (tail_ptr) != (entry_ptr) ) ) || \
- ( ( (len) == 1 ) && \
- ( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \
- ( (entry_ptr)->trans_next == NULL ) && \
- ( (entry_ptr)->trans_prev == NULL ) && \
- ( (Size) == (entry_ptr)->size ) \
- ) \
- ) \
- ) \
- ) { \
- HDfprintf(stdout, "%s: TRANS DLL pre remove SC failed.\n", FUNC); \
- /* JRM */ /* Debugging code -- remove eventually */ \
- if ( (hd_ptr) == NULL ) HDfprintf(stdout, "( (hd_ptr) == NULL ).\n" );\
- if ( (tail_ptr) == NULL ) HDfprintf(stdout, "(tail_ptr) == NULL\n");\
- if ( (entry_ptr) == NULL ) HDfprintf(stdout, "(entry_ptr) == NULL\n");\
- if ( (len) <= 0 ) HDfprintf(stdout, "( (len) <= 0 )\n");\
- if ( (Size) < (entry_ptr)->size ) \
- HDfprintf(stdout,"( (Size) < (entry_ptr)->size )\n");\
- if ( ( (Size) == (entry_ptr)->size ) && ( ! ( (len) == 1 ) ) ) \
- HDfprintf(stdout, "(((Size)==(entry_ptr)->size)&&(!((len) == 1)))\n");\
- if ( ( (entry_ptr)->trans_prev == NULL ) && ( (hd_ptr) != (entry_ptr) ) ) \
- HDfprintf(stdout,"(((entry_ptr)->trans_prev==NULL)&&((hd_ptr)!=(entry_ptr)))\n");\
- if ( ((entry_ptr)->trans_next == NULL) && ((tail_ptr) != (entry_ptr)) ) \
- HDfprintf(stdout,"(((entry_ptr)->trans_next==NULL)&&((tail_ptr)!=(entry_ptr)))\n"); \
- if ( ( (len) == 1 ) && \
+ ( ( (entry_ptr)->trans_next == NULL ) && \
+ ( (tail_ptr) != (entry_ptr) ) ) || \
+ ( ( (len) == 1 ) && \
+ ( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \
+ ( (entry_ptr)->trans_next == NULL ) && \
+ ( (entry_ptr)->trans_prev == NULL ) && \
+ ( (Size) == (entry_ptr)->size ) \
+ ) \
+ ) \
+ ) \
+ ) { \
+ if ( ( (len) == 1 ) && \
( ! ( ( (hd_ptr) == (entry_ptr) ) && ( (tail_ptr) == (entry_ptr) ) && \
- ( (entry_ptr)->trans_next == NULL ) && \
- ( (entry_ptr)->trans_prev == NULL ) && \
- ( (Size) == (entry_ptr)->size ) ) ) ) \
- HDfprintf(stdout,"long condition failed\n"); \
+ ( (entry_ptr)->trans_next == NULL ) && \
+ ( (entry_ptr)->trans_prev == NULL ) && \
+ ( (Size) == (entry_ptr)->size ) ) ) ) \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "TRANS DLL pre remove SC failed") \
}
#define H5C__TRANS_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \
-if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
- ( (head_ptr) != (tail_ptr) ) \
+if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
+ ( (head_ptr) != (tail_ptr) ) \
+ ) || \
+ ( (len) < 0 ) || \
+ ( (Size) < 0 ) || \
+ ( ( (len) == 1 ) && \
+ ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \
+ ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \
+ ) \
+ ) || \
+ ( ( (len) >= 1 ) && \
+ ( ( (head_ptr) == NULL ) || ( (head_ptr)->trans_prev != NULL ) || \
+ ( (tail_ptr) == NULL ) || ( (tail_ptr)->trans_next != NULL ) \
+ ) \
+ ) \
+ ) { \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "TRANS DLL sanity check failed") \
+}
+
+#define H5C__TRANS_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, \
+ len, Size, fv) \
+if ( ( (entry_ptr) == NULL ) || \
+ ( ! ((entry_ptr)->is_dirty) ) || \
+ ( (entry_ptr)->trans_next != NULL ) || \
+ ( (entry_ptr)->trans_prev != NULL ) || \
+ ( ( ( (hd_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
+ ( (hd_ptr) != (tail_ptr) ) \
) || \
( (len) < 0 ) || \
- ( (Size) < 0 ) || \
( ( (len) == 1 ) && \
- ( ( (head_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \
- ( (head_ptr) == NULL ) || ( (head_ptr)->size != (Size) ) \
+ ( ( (hd_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \
+ ( (hd_ptr) == NULL ) || ( (hd_ptr)->size != (Size) ) \
) \
) || \
( ( (len) >= 1 ) && \
- ( ( (head_ptr) == NULL ) || ( (head_ptr)->trans_prev != NULL ) || \
+ ( ( (hd_ptr) == NULL ) || ( (hd_ptr)->trans_prev != NULL ) || \
( (tail_ptr) == NULL ) || ( (tail_ptr)->trans_next != NULL ) \
) \
) \
) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "TRANS DLL sanity check failed") \
-}
-
-#define H5C__TRANS_DLL_PRE_INSERT_SC(entry_ptr, hd_ptr, tail_ptr, \
- len, Size, fv) \
-if ( ( (entry_ptr) == NULL ) || \
- ( ! ((entry_ptr)->is_dirty) ) || \
- ( (entry_ptr)->trans_next != NULL ) || \
- ( (entry_ptr)->trans_prev != NULL ) || \
- ( ( ( (hd_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
- ( (hd_ptr) != (tail_ptr) ) \
- ) || \
- ( (len) < 0 ) || \
- ( ( (len) == 1 ) && \
- ( ( (hd_ptr) != (tail_ptr) ) || ( (Size) <= 0 ) || \
- ( (hd_ptr) == NULL ) || ( (hd_ptr)->size != (Size) ) \
- ) \
- ) || \
- ( ( (len) >= 1 ) && \
- ( ( (hd_ptr) == NULL ) || ( (hd_ptr)->trans_prev != NULL ) || \
- ( (tail_ptr) == NULL ) || ( (tail_ptr)->trans_next != NULL ) \
- ) \
- ) \
- ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fv), "TRANS DLL pre insert SC failed") \
}
@@ -2079,72 +2062,72 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__TRANS_DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, \
- Size, fail_val) \
+ Size, fail_val) \
H5C__TRANS_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, \
- Size, fail_val) \
- if ( (head_ptr) == NULL ) \
- { \
- (head_ptr) = (entry_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- else \
- { \
- (tail_ptr)->trans_next = (entry_ptr); \
- (entry_ptr)->trans_prev = (tail_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- (len)++; \
+ Size, fail_val) \
+ if ( (head_ptr) == NULL ) \
+ { \
+ (head_ptr) = (entry_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ else \
+ { \
+ (tail_ptr)->trans_next = (entry_ptr); \
+ (entry_ptr)->trans_prev = (tail_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ (len)++; \
(Size) += entry_ptr->size;
#define H5C__TRANS_DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
H5C__TRANS_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, \
- Size, fv) \
- if ( (head_ptr) == NULL ) \
- { \
- (head_ptr) = (entry_ptr); \
- (tail_ptr) = (entry_ptr); \
- } \
- else \
- { \
- (head_ptr)->trans_prev = (entry_ptr); \
- (entry_ptr)->trans_next = (head_ptr); \
- (head_ptr) = (entry_ptr); \
- } \
- (len)++; \
+ Size, fv) \
+ if ( (head_ptr) == NULL ) \
+ { \
+ (head_ptr) = (entry_ptr); \
+ (tail_ptr) = (entry_ptr); \
+ } \
+ else \
+ { \
+ (head_ptr)->trans_prev = (entry_ptr); \
+ (entry_ptr)->trans_next = (head_ptr); \
+ (head_ptr) = (entry_ptr); \
+ } \
+ (len)++; \
(Size) += entry_ptr->size;
#define H5C__TRANS_DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
H5C__TRANS_DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, \
- Size, fv) \
- { \
- if ( (head_ptr) == (entry_ptr) ) \
- { \
- (head_ptr) = (entry_ptr)->trans_next; \
- if ( (head_ptr) != NULL ) \
- { \
- (head_ptr)->trans_prev = NULL; \
- } \
- } \
- else \
- { \
+ Size, fv) \
+ { \
+ if ( (head_ptr) == (entry_ptr) ) \
+ { \
+ (head_ptr) = (entry_ptr)->trans_next; \
+ if ( (head_ptr) != NULL ) \
+ { \
+ (head_ptr)->trans_prev = NULL; \
+ } \
+ } \
+ else \
+ { \
(entry_ptr)->trans_prev->trans_next = (entry_ptr)->trans_next; \
- } \
- if ( (tail_ptr) == (entry_ptr) ) \
- { \
- (tail_ptr) = (entry_ptr)->trans_prev; \
- if ( (tail_ptr) != NULL ) \
- { \
- (tail_ptr)->trans_next = NULL; \
- } \
- } \
- else \
- { \
+ } \
+ if ( (tail_ptr) == (entry_ptr) ) \
+ { \
+ (tail_ptr) = (entry_ptr)->trans_prev; \
+ if ( (tail_ptr) != NULL ) \
+ { \
+ (tail_ptr)->trans_next = NULL; \
+ } \
+ } \
+ else \
+ { \
(entry_ptr)->trans_next->trans_prev = (entry_ptr)->trans_prev; \
- } \
- entry_ptr->trans_next = NULL; \
- entry_ptr->trans_prev = NULL; \
- (len)--; \
- (Size) -= entry_ptr->size; \
+ } \
+ entry_ptr->trans_next = NULL; \
+ entry_ptr->trans_prev = NULL; \
+ (len)--; \
+ (Size) -= entry_ptr->size; \
}
@@ -2168,7 +2151,7 @@ if ( ( (entry_ptr) == NULL ) || \
* More pinned entry stats related updates.
*
* JRM -- 3/31/07
- * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on
+ * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on
* read and write protects.
*
***********************************************************************/
@@ -2204,22 +2187,22 @@ if ( ( (entry_ptr) == NULL ) || \
(((cache_ptr)->renames)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\
- if ( cache_ptr->flush_in_progress ) { \
- ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
- if ( entry_ptr->flush_in_progress ) { \
- ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
- if ( (entry_ptr)->size < (new_size) ) { \
- ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
- if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \
- (cache_ptr)->max_index_size = (cache_ptr)->index_size; \
- if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
- if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
- (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
- } else if ( (entry_ptr)->size > (new_size) ) { \
- ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
+ if ( cache_ptr->flush_in_progress ) { \
+ ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
+ } \
+ if ( entry_ptr->flush_in_progress ) { \
+ ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
+ } \
+ if ( (entry_ptr)->size < (new_size) ) { \
+ ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
+ if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \
+ (cache_ptr)->max_index_size = (cache_ptr)->index_size; \
+ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
+ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
+ (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
+ } else if ( (entry_ptr)->size > (new_size) ) { \
+ ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
}
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
@@ -2228,7 +2211,7 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
(cache_ptr)->total_ht_deletions++;
-#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \
+#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \
if ( success ) { \
(cache_ptr)->successful_ht_searches++; \
(cache_ptr)->total_successful_ht_search_depth += depth; \
@@ -2243,26 +2226,26 @@ if ( ( (entry_ptr) == NULL ) || \
#if H5C_COLLECT_CACHE_ENTRY_STATS
#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) \
- (entry_ptr)->accesses = 0; \
- (entry_ptr)->clears = 0; \
- (entry_ptr)->flushes = 0; \
+ (entry_ptr)->accesses = 0; \
+ (entry_ptr)->clears = 0; \
+ (entry_ptr)->flushes = 0; \
(entry_ptr)->pins = 0;
-#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
(((cache_ptr)->clears)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
} \
((entry_ptr)->clears)++;
-#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
(((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
} \
((entry_ptr)->flushes)++;
-#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \
(((cache_ptr)->evictions)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->accesses > \
((cache_ptr)->max_accesses)[(entry_ptr)->type->id] ) { \
@@ -2295,7 +2278,7 @@ if ( ( (entry_ptr) == NULL ) || \
= (entry_ptr)->pins; \
}
-#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
(((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
@@ -2320,7 +2303,7 @@ if ( ( (entry_ptr) == NULL ) || \
= (entry_ptr)->size; \
}
-#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
+#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
if ( hit ) \
((cache_ptr)->hits)[(entry_ptr)->type->id]++; \
else \
@@ -2350,7 +2333,7 @@ if ( ( (entry_ptr) == NULL ) || \
} \
((entry_ptr)->accesses)++;
-#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
(entry_ptr)->pins++; \
if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
@@ -2362,13 +2345,13 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr)
-#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_clears)[(entry_ptr)->type->id])++; \
} \
(((cache_ptr)->clears)[(entry_ptr)->type->id])++;
-#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) \
(((cache_ptr)->flushes)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_flushes)[(entry_ptr)->type->id])++; \
@@ -2377,7 +2360,7 @@ if ( ( (entry_ptr) == NULL ) || \
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr) \
(((cache_ptr)->evictions)[(entry_ptr)->type->id])++;
-#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) \
(((cache_ptr)->insertions)[(entry_ptr)->type->id])++; \
if ( (entry_ptr)->is_pinned ) { \
(((cache_ptr)->pinned_insertions)[(entry_ptr)->type->id])++; \
@@ -2396,7 +2379,7 @@ if ( ( (entry_ptr) == NULL ) || \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
(cache_ptr)->max_slist_size = (cache_ptr)->slist_size;
-#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
+#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) \
if ( hit ) \
((cache_ptr)->hits)[(entry_ptr)->type->id]++; \
else \
@@ -2420,7 +2403,7 @@ if ( ( (entry_ptr) == NULL ) || \
if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size;
-#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
+#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) \
((cache_ptr)->pins)[(entry_ptr)->type->id]++; \
if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
(cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
@@ -2471,100 +2454,100 @@ if ( ( (entry_ptr) == NULL ) || \
#if H5C_DO_SANITY_CHECKS
#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
-if ( ( (cache_ptr) == NULL ) || \
- ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
- ( (entry_ptr) == NULL ) || \
- ( ! H5F_addr_defined((entry_ptr)->addr) ) || \
- ( (entry_ptr)->ht_next != NULL ) || \
- ( (entry_ptr)->ht_prev != NULL ) || \
- ( (entry_ptr)->size <= 0 ) || \
+if ( ( (cache_ptr) == NULL ) || \
+ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
+ ( (entry_ptr) == NULL ) || \
+ ( ! H5F_addr_defined((entry_ptr)->addr) ) || \
+ ( (entry_ptr)->ht_next != NULL ) || \
+ ( (entry_ptr)->ht_prev != NULL ) || \
+ ( (entry_ptr)->size <= 0 ) || \
( (k = H5C__HASH_FCN((entry_ptr)->addr)) < 0 ) || \
( k >= H5C__HASH_TABLE_LEN ) ) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
- "Pre HT insert SC failed") \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
+ "Pre HT insert SC failed") \
}
-#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \
+#define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \
if ( ( (cache_ptr) == NULL ) || \
- ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
+ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
( (cache_ptr)->index_len < 1 ) || \
( (entry_ptr) == NULL ) || \
( (cache_ptr)->index_size < (entry_ptr)->size ) || \
( ! H5F_addr_defined((entry_ptr)->addr) ) || \
( (entry_ptr)->size <= 0 ) || \
- ( H5C__HASH_FCN((entry_ptr)->addr) < 0 ) || \
- ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \
- ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \
+ ( H5C__HASH_FCN((entry_ptr)->addr) < 0 ) || \
+ ( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \
+ ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \
== NULL ) || \
- ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \
+ ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] \
!= (entry_ptr) ) && \
( (entry_ptr)->ht_prev == NULL ) ) || \
- ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] == \
+ ( ( ((cache_ptr)->index)[(H5C__HASH_FCN((entry_ptr)->addr))] == \
(entry_ptr) ) && \
( (entry_ptr)->ht_prev != NULL ) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \
}
#define H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \
-if ( ( (cache_ptr) == NULL ) || \
- ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
- ( ! H5F_addr_defined(Addr) ) || \
+if ( ( (cache_ptr) == NULL ) || \
+ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
+ ( ! H5F_addr_defined(Addr) ) || \
( H5C__HASH_FCN(Addr) < 0 ) || \
- ( H5C__HASH_FCN(Addr) >= H5C__HASH_TABLE_LEN ) ) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \
+ ( H5C__HASH_FCN(Addr) >= H5C__HASH_TABLE_LEN ) ) { \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \
}
#define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \
-if ( ( (cache_ptr) == NULL ) || \
- ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
- ( (cache_ptr)->index_len < 1 ) || \
- ( (entry_ptr) == NULL ) || \
- ( (cache_ptr)->index_size < (entry_ptr)->size ) || \
- ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \
- ( (entry_ptr)->size <= 0 ) || \
- ( ((cache_ptr)->index)[k] == NULL ) || \
- ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \
- ( (entry_ptr)->ht_prev == NULL ) ) || \
- ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \
- ( (entry_ptr)->ht_prev != NULL ) ) || \
- ( ( (entry_ptr)->ht_prev != NULL ) && \
- ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \
- ( ( (entry_ptr)->ht_next != NULL ) && \
- ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
- "Post successful HT search SC failed") \
+if ( ( (cache_ptr) == NULL ) || \
+ ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
+ ( (cache_ptr)->index_len < 1 ) || \
+ ( (entry_ptr) == NULL ) || \
+ ( (cache_ptr)->index_size < (entry_ptr)->size ) || \
+ ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \
+ ( (entry_ptr)->size <= 0 ) || \
+ ( ((cache_ptr)->index)[k] == NULL ) || \
+ ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \
+ ( (entry_ptr)->ht_prev == NULL ) ) || \
+ ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \
+ ( (entry_ptr)->ht_prev != NULL ) ) || \
+ ( ( (entry_ptr)->ht_prev != NULL ) && \
+ ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \
+ ( ( (entry_ptr)->ht_next != NULL ) && \
+ ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
+ "Post successful HT search SC failed") \
}
#define H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \
-if ( ( (cache_ptr) == NULL ) || \
- ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \
- ( (entry_ptr)->ht_prev != NULL ) ) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
- "Post HT shift to front SC failed") \
+if ( ( (cache_ptr) == NULL ) || \
+ ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \
+ ( (entry_ptr)->ht_prev != NULL ) ) { \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \
+ "Post HT shift to front SC failed") \
}
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \
+if ( ( (cache_ptr) == NULL ) || \
+ ( (cache_ptr)->index_len <= 0 ) || \
+ ( (cache_ptr)->index_size <= 0 ) || \
+ ( (new_size) <= 0 ) || \
+ ( (old_size) > (cache_ptr)->index_size ) || \
+ ( (new_size) <= 0 ) || \
+ ( ( (cache_ptr)->index_len == 1 ) && \
+ ( (cache_ptr)->index_size != (old_size) ) ) ) { \
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
+ "Pre HT entry size change SC failed") \
+}
+
+#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
- ( (new_size) <= 0 ) || \
- ( (old_size) > (cache_ptr)->index_size ) || \
- ( (new_size) <= 0 ) || \
+ ( (new_size) > (cache_ptr)->index_size ) || \
( ( (cache_ptr)->index_len == 1 ) && \
- ( (cache_ptr)->index_size != (old_size) ) ) ) { \
+ ( (cache_ptr)->index_size != (new_size) ) ) ) { \
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Pre HT entry size change SC failed") \
-}
-
-#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \
-if ( ( (cache_ptr) == NULL ) || \
- ( (cache_ptr)->index_len <= 0 ) || \
- ( (cache_ptr)->index_size <= 0 ) || \
- ( (new_size) > (cache_ptr)->index_size ) || \
- ( ( (cache_ptr)->index_len == 1 ) && \
- ( (cache_ptr)->index_size != (new_size) ) ) ) { \
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Post HT entry size change SC failed") \
+ "Post HT entry size change SC failed") \
}
#else /* H5C_DO_SANITY_CHECKS */
@@ -2581,30 +2564,30 @@ if ( ( (cache_ptr) == NULL ) || \
#define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \
-{ \
- int k; \
+{ \
+ int k; \
H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
k = H5C__HASH_FCN((entry_ptr)->addr); \
- if ( ((cache_ptr)->index)[k] == NULL ) \
- { \
- ((cache_ptr)->index)[k] = (entry_ptr); \
- } \
- else \
- { \
- (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
- (entry_ptr)->ht_next->ht_prev = (entry_ptr); \
- ((cache_ptr)->index)[k] = (entry_ptr); \
- } \
- (cache_ptr)->index_len++; \
- (cache_ptr)->index_size += (entry_ptr)->size; \
+ if ( ((cache_ptr)->index)[k] == NULL ) \
+ { \
+ ((cache_ptr)->index)[k] = (entry_ptr); \
+ } \
+ else \
+ { \
+ (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
+ (entry_ptr)->ht_next->ht_prev = (entry_ptr); \
+ ((cache_ptr)->index)[k] = (entry_ptr); \
+ } \
+ (cache_ptr)->index_len++; \
+ (cache_ptr)->index_size += (entry_ptr)->size; \
H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
}
-#define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \
+#define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \
{ \
int k; \
- H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \
- k = H5C__HASH_FCN((entry_ptr)->addr); \
+ H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \
+ k = H5C__HASH_FCN((entry_ptr)->addr); \
if ( (entry_ptr)->ht_next ) \
{ \
(entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
@@ -2621,79 +2604,79 @@ if ( ( (cache_ptr) == NULL ) || \
(entry_ptr)->ht_prev = NULL; \
(cache_ptr)->index_len--; \
(cache_ptr)->index_size -= (entry_ptr)->size; \
- H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
+ H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
}
#define H5C__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \
-{ \
- int k; \
- int depth = 0; \
+{ \
+ int k; \
+ int depth = 0; \
H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \
k = H5C__HASH_FCN(Addr); \
- entry_ptr = ((cache_ptr)->index)[k]; \
- while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \
- { \
- (entry_ptr) = (entry_ptr)->ht_next; \
- (depth)++; \
- } \
- if ( entry_ptr ) \
- { \
+ entry_ptr = ((cache_ptr)->index)[k]; \
+ while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \
+ { \
+ (entry_ptr) = (entry_ptr)->ht_next; \
+ (depth)++; \
+ } \
+ if ( entry_ptr ) \
+ { \
H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \
- if ( entry_ptr != ((cache_ptr)->index)[k] ) \
- { \
- if ( (entry_ptr)->ht_next ) \
- { \
- (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
- } \
- HDassert( (entry_ptr)->ht_prev != NULL ); \
- (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
- ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
- (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
- (entry_ptr)->ht_prev = NULL; \
- ((cache_ptr)->index)[k] = (entry_ptr); \
+ if ( entry_ptr != ((cache_ptr)->index)[k] ) \
+ { \
+ if ( (entry_ptr)->ht_next ) \
+ { \
+ (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
+ } \
+ HDassert( (entry_ptr)->ht_prev != NULL ); \
+ (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
+ ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
+ (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
+ (entry_ptr)->ht_prev = NULL; \
+ ((cache_ptr)->index)[k] = (entry_ptr); \
H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \
- } \
- } \
+ } \
+ } \
H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, (entry_ptr != NULL), depth) \
}
#define H5C__SEARCH_INDEX_NO_STATS(cache_ptr, Addr, entry_ptr, fail_val) \
-{ \
- int k; \
- int depth = 0; \
+{ \
+ int k; \
+ int depth = 0; \
H5C__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \
k = H5C__HASH_FCN(Addr); \
- entry_ptr = ((cache_ptr)->index)[k]; \
- while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \
- { \
- (entry_ptr) = (entry_ptr)->ht_next; \
- (depth)++; \
- } \
- if ( entry_ptr ) \
- { \
+ entry_ptr = ((cache_ptr)->index)[k]; \
+ while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \
+ { \
+ (entry_ptr) = (entry_ptr)->ht_next; \
+ (depth)++; \
+ } \
+ if ( entry_ptr ) \
+ { \
H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \
- if ( entry_ptr != ((cache_ptr)->index)[k] ) \
- { \
- if ( (entry_ptr)->ht_next ) \
- { \
- (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
- } \
- HDassert( (entry_ptr)->ht_prev != NULL ); \
- (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
- ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
- (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
- (entry_ptr)->ht_prev = NULL; \
- ((cache_ptr)->index)[k] = (entry_ptr); \
+ if ( entry_ptr != ((cache_ptr)->index)[k] ) \
+ { \
+ if ( (entry_ptr)->ht_next ) \
+ { \
+ (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \
+ } \
+ HDassert( (entry_ptr)->ht_prev != NULL ); \
+ (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \
+ ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \
+ (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
+ (entry_ptr)->ht_prev = NULL; \
+ ((cache_ptr)->index)[k] = (entry_ptr); \
H5C__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \
- } \
- } \
+ } \
+ } \
}
#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
-{ \
+{ \
H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \
- (cache_ptr)->index_size -= old_size; \
- (cache_ptr)->index_size += new_size; \
+ (cache_ptr)->index_size -= old_size; \
+ (cache_ptr)->index_size += new_size; \
H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \
}
@@ -2747,12 +2730,12 @@ if ( ( (cache_ptr) == NULL ) || \
* JRM -- 8/25/06
* Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_len_increase and
+ * This version maintains the slist_len_increase and
* slist_size_increase fields that are used in sanity
* checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or rename entries during the
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or rename entries during the
* flush.
*
*-------------------------------------------------------------------------
@@ -2760,10 +2743,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_DO_SANITY_CHECKS
-#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
+#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
@@ -2787,10 +2770,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_DO_SANITY_CHECKS */
-#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
+#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( H5F_addr_defined((entry_ptr)->addr) ); \
@@ -2839,16 +2822,16 @@ if ( ( (cache_ptr) == NULL ) || \
* Switched over to using skip list routines.
*
* JRM -- 3/28/07
- * Updated sanity checks for the new is_read_only and
+ * Updated sanity checks for the new is_read_only and
* ro_ref_count fields in H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
-#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \
+#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -2887,11 +2870,11 @@ if ( ( (cache_ptr) == NULL ) || \
* JRM -- 8/27/06
* Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_size_increase field
+ * This version maintains the slist_size_increase field
* that are used in sanity checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or rename entries during the
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or rename entries during the
* flush.
*
*-------------------------------------------------------------------------
@@ -2900,46 +2883,46 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_DO_SANITY_CHECKS
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
-{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
- ( (cache_ptr)->slist_size == (old_size) ) ); \
- \
- (cache_ptr)->slist_size -= (old_size); \
- (cache_ptr)->slist_size += (new_size); \
- \
- (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \
- (cache_ptr)->slist_size_increase += (int64_t)(new_size); \
- \
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
- ( (cache_ptr)->slist_size == (new_size) ) ); \
+{ \
+ HDassert( (cache_ptr) ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (old_size) > 0 ); \
+ HDassert( (new_size) > 0 ); \
+ HDassert( (old_size) <= (cache_ptr)->slist_size ); \
+ HDassert( (cache_ptr)->slist_len > 0 ); \
+ HDassert( ((cache_ptr)->slist_len > 1) || \
+ ( (cache_ptr)->slist_size == (old_size) ) ); \
+ \
+ (cache_ptr)->slist_size -= (old_size); \
+ (cache_ptr)->slist_size += (new_size); \
+ \
+ (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \
+ (cache_ptr)->slist_size_increase += (int64_t)(new_size); \
+ \
+ HDassert( (new_size) <= (cache_ptr)->slist_size ); \
+ HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ ( (cache_ptr)->slist_size == (new_size) ) ); \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
#else /* H5C_DO_SANITY_CHECKS */
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
-{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (old_size) > 0 ); \
- HDassert( (new_size) > 0 ); \
- HDassert( (old_size) <= (cache_ptr)->slist_size ); \
- HDassert( (cache_ptr)->slist_len > 0 ); \
- HDassert( ((cache_ptr)->slist_len > 1) || \
- ( (cache_ptr)->slist_size == (old_size) ) ); \
- \
- (cache_ptr)->slist_size -= (old_size); \
- (cache_ptr)->slist_size += (new_size); \
- \
- HDassert( (new_size) <= (cache_ptr)->slist_size ); \
- HDassert( ( (cache_ptr)->slist_len > 1 ) || \
- ( (cache_ptr)->slist_size == (new_size) ) ); \
+{ \
+ HDassert( (cache_ptr) ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (old_size) > 0 ); \
+ HDassert( (new_size) > 0 ); \
+ HDassert( (old_size) <= (cache_ptr)->slist_size ); \
+ HDassert( (cache_ptr)->slist_len > 0 ); \
+ HDassert( ((cache_ptr)->slist_len > 1) || \
+ ( (cache_ptr)->slist_size == (old_size) ) ); \
+ \
+ (cache_ptr)->slist_size -= (old_size); \
+ (cache_ptr)->slist_size += (new_size); \
+ \
+ HDassert( (new_size) <= (cache_ptr)->slist_size ); \
+ HDassert( ( (cache_ptr)->slist_len > 1 ) || \
+ ( (cache_ptr)->slist_size == (new_size) ) ); \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
#endif /* H5C_DO_SANITY_CHECKS */
@@ -2982,7 +2965,7 @@ if ( ( (cache_ptr) == NULL ) || \
* to do if called for such an entry.
*
* JRM -- 3/28/07
- * Added sanity checks using the new is_read_only and
+ * Added sanity checks using the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM -- 3/29/08
@@ -2995,99 +2978,99 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \
-{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( (entry_ptr)->last_trans == 0 ); \
- \
- if ( ! ((entry_ptr)->is_pinned) ) { \
- \
- /* modified LRU specific code */ \
- \
- /* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
- \
+{ \
+ HDassert( (cache_ptr) ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (entry_ptr) ); \
+ HDassert( !((entry_ptr)->is_protected) ); \
+ HDassert( !((entry_ptr)->is_read_only) ); \
+ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ HDassert( (entry_ptr)->size > 0 ); \
+ HDassert( (entry_ptr)->last_trans == 0 ); \
+ \
+ if ( ! ((entry_ptr)->is_pinned) ) { \
+ \
+ /* modified LRU specific code */ \
+ \
+ /* remove the entry from the LRU list, and re-insert it at the head.\
+ */ \
+ \
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
- \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
+ \
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
- \
- /* Use the dirty flag to infer whether the entry is on the clean or \
- * dirty LRU list, and remove it. Then insert it at the head of \
- * the same LRU list. \
- * \
- * At least initially, all entries should be clean. That may \
- * change, so we may as well deal with both cases now. \
- */ \
- \
- if ( (entry_ptr)->is_dirty ) { \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
+ \
+ /* Use the dirty flag to infer whether the entry is on the clean or \
+ * dirty LRU list, and remove it. Then insert it at the head of \
+ * the same LRU list. \
+ * \
+ * At least initially, all entries should be clean. That may \
+ * change, so we may as well deal with both cases now. \
+ */ \
+ \
+ if ( (entry_ptr)->is_dirty ) { \
H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
- (cache_ptr)->dLRU_tail_ptr, \
- (cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, (fail_val)) \
- \
+ (cache_ptr)->dLRU_tail_ptr, \
+ (cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, (fail_val)) \
+ \
H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
- (cache_ptr)->dLRU_tail_ptr, \
- (cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, (fail_val)) \
- } else { \
+ (cache_ptr)->dLRU_tail_ptr, \
+ (cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, (fail_val)) \
+ } else { \
H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
- (cache_ptr)->cLRU_tail_ptr, \
- (cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, (fail_val)) \
- \
+ (cache_ptr)->cLRU_tail_ptr, \
+ (cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, (fail_val)) \
+ \
H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
- (cache_ptr)->cLRU_tail_ptr, \
- (cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, (fail_val)) \
- } \
- \
- /* End modified LRU specific code. */ \
- } \
+ (cache_ptr)->cLRU_tail_ptr, \
+ (cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, (fail_val)) \
+ } \
+ \
+ /* End modified LRU specific code. */ \
+ } \
} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
#define H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \
-{ \
- HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
- HDassert( (entry_ptr) ); \
- HDassert( !((entry_ptr)->is_protected) ); \
- HDassert( !((entry_ptr)->is_read_only) ); \
- HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
- HDassert( (entry_ptr)->size > 0 ); \
- HDassert( (entry_ptr)->last_trans == 0 ); \
- \
- if ( ! ((entry_ptr)->is_pinned) ) { \
- \
- /* modified LRU specific code */ \
- \
- /* remove the entry from the LRU list, and re-insert it at the head \
- */ \
- \
+{ \
+ HDassert( (cache_ptr) ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (entry_ptr) ); \
+ HDassert( !((entry_ptr)->is_protected) ); \
+ HDassert( !((entry_ptr)->is_read_only) ); \
+ HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
+ HDassert( (entry_ptr)->size > 0 ); \
+ HDassert( (entry_ptr)->last_trans == 0 ); \
+ \
+ if ( ! ((entry_ptr)->is_pinned) ) { \
+ \
+ /* modified LRU specific code */ \
+ \
+ /* remove the entry from the LRU list, and re-insert it at the head \
+ */ \
+ \
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
- \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
+ \
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
- \
- /* End modified LRU specific code. */ \
- } \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
+ \
+ /* End modified LRU specific code. */ \
+ } \
} /* H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -3130,7 +3113,7 @@ if ( ( (cache_ptr) == NULL ) || \
* be called on a pinned entry. Added assert to verify this.
*
* JRM -- 3/28/07
- * Added sanity checks for the new is_read_only and
+ * Added sanity checks for the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM -- 3/29/08
@@ -3142,10 +3125,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3158,7 +3141,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list. */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
@@ -3170,12 +3153,12 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, (fail_val)) \
} else { \
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
@@ -3185,10 +3168,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3201,7 +3184,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list. */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
@@ -3261,10 +3244,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3280,12 +3263,12 @@ if ( ( (cache_ptr) == NULL ) || \
* head. \
*/ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3302,18 +3285,18 @@ if ( ( (cache_ptr) == NULL ) || \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, (fail_val)) \
} else { \
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
} \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
@@ -3324,10 +3307,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3343,12 +3326,12 @@ if ( ( (cache_ptr) == NULL ) || \
* head. \
*/ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3397,7 +3380,7 @@ if ( ( (cache_ptr) == NULL ) || \
* Inserted an assert to verify this.
*
* JRM - 8/9/06
- * Not any more. We must now allow insertion of pinned
+ * Not any more. We must now allow insertion of pinned
* entries. Updated macro to support this.
*
* JRM - 3/28/07
@@ -3405,13 +3388,13 @@ if ( ( (cache_ptr) == NULL ) || \
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM - 3/29/30
- * Added sanity check that verifies that the last_trans field
- * of the entry matches the trans_num field of the cache.
- * Note that when journaling is disabled, both of these
- * fields should contain zero. Also verify that either
+ * Added sanity check that verifies that the last_trans field
+ * of the entry matches the trans_num field of the cache.
+ * Note that when journaling is disabled, both of these
+ * fields should contain zero. Also verify that either
* journaling is disabled or a transaction is in progress.
*
- * Added code to put the entry in the journal write in
+ * Added code to put the entry in the journal write in
* progress list if entries last_trans field is non-
* zero and the entry is not pinned.
*
@@ -3420,10 +3403,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3435,7 +3418,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -3444,7 +3427,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (cache_ptr)->trans_in_progress ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3456,7 +3439,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3466,12 +3449,12 @@ if ( ( (cache_ptr) == NULL ) || \
*/ \
\
if ( entry_ptr->is_dirty ) { \
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, (fail_val)) \
} else { \
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
@@ -3483,10 +3466,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3498,7 +3481,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -3507,7 +3490,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (cache_ptr)->trans_in_progress ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3519,7 +3502,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3535,13 +3518,13 @@ if ( ( (cache_ptr) == NULL ) || \
*
* Macro: H5C__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE
*
- * Purpose: Update the replacement policy data structures for the
- * completion of the last pending journal write for the
+ * Purpose: Update the replacement policy data structures for the
+ * completion of the last pending journal write for the
* specified un-pinned and un-protected cache entry.
*
* If an entry with a pending journal write is not protected
- * and is not pinned, it must be on the journal write in
- * progress list. Unlink it from that list, and add it to
+ * and is not pinned, it must be on the journal write in
+ * progress list. Unlink it from that list, and add it to
* the data structures used by the current replacement policy.
*
* At present, we only support the modified LRU policy, so
@@ -3565,11 +3548,11 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \
+#define H5C__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \
fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
@@ -3580,7 +3563,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (entry_ptr)->is_dirty ); \
HDassert( (entry_ptr)->last_trans == 0 ); \
\
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3591,7 +3574,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3601,12 +3584,12 @@ if ( ( (cache_ptr) == NULL ) || \
*/ \
\
if ( entry_ptr->is_dirty ) { \
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, (fail_val)) \
} else { \
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
@@ -3618,11 +3601,11 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \
+#define H5C__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \
fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
@@ -3633,7 +3616,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (entry_ptr)->is_dirty ); \
HDassert( (entry_ptr)->last_trans == 0 ); \
\
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3644,7 +3627,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3664,8 +3647,8 @@ if ( ( (cache_ptr) == NULL ) || \
* load from disk of the specified cache entry.
*
* Note that we update the replacement policy for load only
- * as a convenience -- the newly loaded entry will be
- * protected immediately. If this starts to eat up a
+ * as a convenience -- the newly loaded entry will be
+ * protected immediately. If this starts to eat up a
* significant number of cycles, we will have to re-work
* the code to avoid this step.
*
@@ -3802,7 +3785,7 @@ if ( ( (cache_ptr) == NULL ) || \
* maintained by the replacement policy.
*
* JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
+ * Added sanity checks based on the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM - 3/29/08
@@ -3814,10 +3797,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3826,7 +3809,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -3835,7 +3818,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3848,7 +3831,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list. */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3859,14 +3842,14 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, (fail_val)) \
\
} else { \
\
- H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ H5C__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, (fail_val)) \
@@ -3879,7 +3862,7 @@ if ( ( (cache_ptr) == NULL ) || \
* pinned, now add the entry to the protected list. \
*/ \
\
- H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \
+ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \
(cache_ptr)->pl_tail_ptr, \
(cache_ptr)->pl_len, \
(cache_ptr)->pl_size, (fail_val)) \
@@ -3887,10 +3870,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -3899,7 +3882,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -3908,7 +3891,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -3921,7 +3904,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list. */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -3933,10 +3916,10 @@ if ( ( (cache_ptr) == NULL ) || \
* pinned, now add the entry to the protected list. \
*/ \
\
- H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \
- (cache_ptr)->pl_tail_ptr, \
- (cache_ptr)->pl_len, \
- (cache_ptr)->pl_size, (fail_val)) \
+ H5C__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \
+ (cache_ptr)->pl_tail_ptr, \
+ (cache_ptr)->pl_len, \
+ (cache_ptr)->pl_size, (fail_val)) \
} /* H5C__UPDATE_RP_FOR_PROTECT */
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -3992,25 +3975,25 @@ if ( ( (cache_ptr) == NULL ) || \
* nothing to be done.
*
* JRM - 3/28/07
- * Added sanity checks using the new is_read_only and
+ * Added sanity checks using the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM - 3/29/08
* Reworked macro to handle the case in which the renamed
* entry has a journal write pending -- this required the
- * addition of the had_jwip parameter. Also added some
- * related sanity checks.
+ * addition of the had_jwip parameter. Also added some
+ * related sanity checks.
*
*-------------------------------------------------------------------------
*/
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \
+#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \
had_jwip, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4031,7 +4014,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (entry_ptr)->last_trans != 0 ); \
HDassert( was_dirty ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4044,7 +4027,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4054,7 +4037,7 @@ if ( ( (cache_ptr) == NULL ) || \
*/ \
if ( was_dirty ) { \
\
- H5C__AUX_DLL_REMOVE((entry_ptr), \
+ H5C__AUX_DLL_REMOVE((entry_ptr), \
(cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
@@ -4063,7 +4046,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
} else { \
\
- H5C__AUX_DLL_REMOVE((entry_ptr), \
+ H5C__AUX_DLL_REMOVE((entry_ptr), \
(cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
@@ -4080,7 +4063,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (cache_ptr)->trans_in_progress ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4090,7 +4073,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* begin modified LRU specific code */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4101,7 +4084,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
(cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
@@ -4110,7 +4093,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
} else { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
(cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
@@ -4125,11 +4108,11 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \
+#define H5C__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \
had_jwip, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4150,7 +4133,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (entry_ptr)->last_trans != 0 ); \
HDassert( was_dirty ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_REMOVE((entry_ptr), \
+ H5C__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4163,7 +4146,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* remove the entry from the LRU list */ \
\
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4178,7 +4161,7 @@ if ( ( (cache_ptr) == NULL ) || \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (cache_ptr)->trans_in_progress ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4188,7 +4171,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* begin modified LRU specific code */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4211,7 +4194,7 @@ if ( ( (cache_ptr) == NULL ) || \
* To do this, determine if the entry is pinned. If it is,
* update the size of the pinned entry list.
*
- * If it isn't pinned, the entry must handled by the
+ * If it isn't pinned, the entry must handled by the
* replacement policy. Update the appropriate replacement
* policy data structures.
*
@@ -4227,13 +4210,13 @@ if ( ( (cache_ptr) == NULL ) || \
* Modifications:
*
* JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
+ * Added sanity checks based on the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM -- 3/29/08
* Added code to deal with the journal write in progress
* list -- in essence, after checking to see if the entry is
- * pinned, check to see if it is on the jwip list. If it
+ * pinned, check to see if it is on the jwip list. If it
* is, update the size of that list. If not, proceed as
* before.
*
@@ -4242,10 +4225,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \
+#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4255,7 +4238,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
(cache_ptr)->pel_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4264,7 +4247,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \
(cache_ptr)->jwipl_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4275,7 +4258,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4287,14 +4270,14 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
(entry_ptr)->size, \
(new_size)); \
\
} else { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4307,10 +4290,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \
+#define H5C__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4320,7 +4303,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
(cache_ptr)->pel_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4329,7 +4312,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \
(cache_ptr)->jwipl_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4340,7 +4323,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, \
(entry_ptr)->size, \
(new_size)); \
@@ -4376,11 +4359,11 @@ if ( ( (cache_ptr) == NULL ) || \
* Modifications:
*
* JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
+ * Added sanity checks based on the new is_read_only and
* ro_ref_count fields of struct H5C_cache_entry_t.
*
* JRM -- 3/30/08
- * Added code to place the newly unpinned entry on the
+ * Added code to place the newly unpinned entry on the
* journal write pending list if appropriate.
*
*-------------------------------------------------------------------------
@@ -4388,10 +4371,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4402,7 +4385,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
*/ \
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
@@ -4411,7 +4394,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* put the entry in the jwip list */ \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4423,7 +4406,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4434,7 +4417,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
(cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
@@ -4443,7 +4426,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
} else { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), \
+ H5C__AUX_DLL_PREPEND((entry_ptr), \
(cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
@@ -4458,10 +4441,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( !((entry_ptr)->is_protected) ); \
HDassert( !((entry_ptr)->is_read_only) ); \
@@ -4472,7 +4455,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* Regardless of the replacement policy, remove the entry from the \
* pinned entry list. \
*/ \
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
@@ -4481,7 +4464,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* put the entry in the jwip list */ \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4493,7 +4476,7 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
(cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
@@ -4548,7 +4531,7 @@ if ( ( (cache_ptr) == NULL ) || \
* maintained by the replacement policy.
*
* JRM - 3/30/08
- * Modified macro to put un-pinned entries with pending
+ * Modified macro to put un-pinned entries with pending
* journal writes on the journal write in progress list.
*
*-------------------------------------------------------------------------
@@ -4556,10 +4539,10 @@ if ( ( (cache_ptr) == NULL ) || \
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
-#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( (entry_ptr)->is_protected); \
HDassert( (entry_ptr)->size > 0 ); \
@@ -4567,13 +4550,13 @@ if ( ( (cache_ptr) == NULL ) || \
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
*/ \
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \
(cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \
(cache_ptr)->pl_size, (fail_val)) \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -4583,7 +4566,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* put the entry in the jwip list */ \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4595,10 +4578,10 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Similarly, insert the entry at the head of either the clean or \
* dirty LRU list as appropriate. \
@@ -4606,17 +4589,17 @@ if ( ( (cache_ptr) == NULL ) || \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
- (cache_ptr)->dLRU_tail_ptr, \
- (cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, (fail_val)) \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_tail_ptr, \
+ (cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, (fail_val)) \
\
} else { \
\
- H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
- (cache_ptr)->cLRU_tail_ptr, \
- (cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, (fail_val)) \
+ H5C__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_tail_ptr, \
+ (cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -4626,10 +4609,10 @@ if ( ( (cache_ptr) == NULL ) || \
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
{ \
HDassert( (cache_ptr) ); \
- HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
+ HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \
HDassert( (entry_ptr) ); \
HDassert( (entry_ptr)->is_protected); \
HDassert( (entry_ptr)->size > 0 ); \
@@ -4637,13 +4620,13 @@ if ( ( (cache_ptr) == NULL ) || \
/* Regardless of the replacement policy, remove the entry from the \
* protected list. \
*/ \
- H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \
+ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \
(cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \
(cache_ptr)->pl_size, (fail_val)) \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
@@ -4653,7 +4636,7 @@ if ( ( (cache_ptr) == NULL ) || \
/* put the entry in the jwip list */ \
HDassert( (cache_ptr)->mdj_enabled ); \
HDassert( (entry_ptr)->is_dirty ); \
- H5C__DLL_PREPEND((entry_ptr), \
+ H5C__DLL_PREPEND((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
((cache_ptr)->jwipl_len), \
@@ -4665,10 +4648,10 @@ if ( ( (cache_ptr) == NULL ) || \
\
/* insert the entry at the head of the LRU list. */ \
\
- H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
- (cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, (fail_val)) \
+ H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
+ (cache_ptr)->LRU_tail_ptr, \
+ (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
} \
@@ -4710,7 +4693,7 @@ if ( ( (cache_ptr) == NULL ) || \
*-------------------------------------------------------------------------
*/
-#define H5C__INSERT_ENTRY_IN_TL(cache_ptr, entry_ptr, fail_val) \
+#define H5C__INSERT_ENTRY_IN_TL(cache_ptr, entry_ptr, fail_val) \
if ( cache_ptr->mdj_enabled ) \
{ \
HDassert( cache_ptr->trans_in_progress ); \
@@ -4718,7 +4701,7 @@ if ( cache_ptr->mdj_enabled ) \
\
entry_ptr->last_trans = cache_ptr->trans_num; \
\
- H5C__TRANS_DLL_PREPEND((entry_ptr), (cache_ptr->tl_head_ptr), \
+ H5C__TRANS_DLL_PREPEND((entry_ptr), (cache_ptr->tl_head_ptr), \
(cache_ptr->tl_tail_ptr), \
(cache_ptr->tl_len), (cache_ptr->tl_size), \
(fail_val)); \
@@ -4732,7 +4715,7 @@ if ( cache_ptr->mdj_enabled ) \
* Purpose: Check to see if journaling is enabled.
*
* If it is, see if the target entry is in the transaction
- * list. If it is, remove it from the list, and set its
+ * list. If it is, remove it from the list, and set its
* last_trans field to zero.
*
* Return: N/A
@@ -4746,7 +4729,7 @@ if ( cache_ptr->mdj_enabled ) \
*-------------------------------------------------------------------------
*/
-#define H5C__UPDATE_TL_FOR_ENTRY_CLEAR(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_TL_FOR_ENTRY_CLEAR(cache_ptr, entry_ptr, fail_val) \
if ( cache_ptr->mdj_enabled ) \
{ \
HDassert( cache_ptr->trans_in_progress ); \
@@ -4754,7 +4737,7 @@ if ( cache_ptr->mdj_enabled ) \
\
if ( entry_ptr->last_trans == cache_ptr->trans_num ) { \
\
- H5C__TRANS_DLL_REMOVE((entry_ptr), (cache_ptr->tl_head_ptr), \
+ H5C__TRANS_DLL_REMOVE((entry_ptr), (cache_ptr->tl_head_ptr), \
(cache_ptr->tl_tail_ptr), \
(cache_ptr->tl_len), \
(cache_ptr->tl_size), (fail_val)); \
@@ -4788,7 +4771,7 @@ if ( cache_ptr->mdj_enabled ) \
*-------------------------------------------------------------------------
*/
-#define H5C__UPDATE_TL_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr, fail_val) \
+#define H5C__UPDATE_TL_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr, fail_val) \
if ( cache_ptr->mdj_enabled ) \
{ \
HDassert( cache_ptr->trans_in_progress ); \
@@ -4796,7 +4779,7 @@ if ( cache_ptr->mdj_enabled ) \
\
if ( entry_ptr->last_trans == cache_ptr->trans_num ) { \
\
- H5C__TRANS_DLL_REMOVE((entry_ptr), (cache_ptr->tl_head_ptr), \
+ H5C__TRANS_DLL_REMOVE((entry_ptr), (cache_ptr->tl_head_ptr), \
(cache_ptr->tl_tail_ptr), \
(cache_ptr->tl_len), \
(cache_ptr->tl_size), (fail_val)); \
@@ -4804,7 +4787,7 @@ if ( cache_ptr->mdj_enabled ) \
entry_ptr->last_trans = cache_ptr->trans_num; \
} \
\
- H5C__TRANS_DLL_PREPEND((entry_ptr), (cache_ptr->tl_head_ptr), \
+ H5C__TRANS_DLL_PREPEND((entry_ptr), (cache_ptr->tl_head_ptr), \
(cache_ptr->tl_tail_ptr), \
(cache_ptr->tl_len), (cache_ptr->tl_size), \
(fail_val)); \
@@ -4815,9 +4798,9 @@ if ( cache_ptr->mdj_enabled ) \
*
* Macro: H5C__UPDATE_TL_FOR_ENTRY_SIZE_CHANGE
*
- * Purpose: Update the transaction list for a change in the size of
+ * Purpose: Update the transaction list for a change in the size of
* one of its constituents. Note that it is the callers
- * responsibility to verify that the entry is in the
+ * responsibility to verify that the entry is in the
* transaction list if it should be.
*
* Return: N/A
@@ -4831,12 +4814,12 @@ if ( cache_ptr->mdj_enabled ) \
*-------------------------------------------------------------------------
*/
-#define H5C__UPDATE_TL_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, \
+#define H5C__UPDATE_TL_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, \
old_size, new_size) \
if ( ( (cache_ptr)->mdj_enabled ) && \
( (entry_ptr)->last_trans == (cache_ptr)->trans_num ) ) { \
HDassert( (cache_ptr)->trans_in_progress ); \
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE(((cache_ptr)->tl_len), \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE(((cache_ptr)->tl_len), \
((cache_ptr)->tl_size), \
(old_size), (new_size)); \
} /* H5C__UPDATE_TL_FOR_ENTRY_SIZE_CHANGE() */
@@ -4846,8 +4829,8 @@ if ( ( (cache_ptr)->mdj_enabled ) && \
*
* Macro: H5C__JBRB__UPDATE_STATS_FOR* macros
*
- * Purpose: This set of macros exists to update the various journal
- * buffer ring buffer stats fields when
+ * Purpose: This set of macros exists to update the various journal
+ * buffer ring buffer stats fields when
* H5C__JBRB__COLLECT_STATS is TRUE, and do nothing when
* it is false.
*
@@ -4922,3 +4905,4 @@ if ( ( (cache_ptr)->mdj_enabled ) && \
#endif /* H5C__JBRB__COLLECT_STATS */
#endif /* _H5Cpkg_H */
+
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 453113a..3033a4f 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -107,13 +107,13 @@ typedef struct H5C_t H5C_t;
* name: Pointer to a string containing the name of the class of metadata
* cache entries.
*
- * mem_type: Instance of H5FD_mem_t, that is used to supply the
+ * mem_type: Instance of H5FD_mem_t, that is used to supply the
* mem type passed into H5F_block_read().
*
* deserialize: Pointer to the deserialize function.
*
* This function must be able to read an on disk image of a metadata
- * cache entry, allocate and load the equivalent in core representation,
+ * cache entry, allocate and load the equivalent in core representation,
* and return a pointer to that representation.
*
* The typedef for the deserialize callback is as follows:
@@ -140,8 +140,8 @@ typedef struct H5C_t H5C_t;
* mode, but the parameter may be unused when compiled in
* production mode.
*
- * image_ptr: Pointer to a buffer of length len containing the
- * contents of the file starting at addr and continuing
+ * image_ptr: Pointer to a buffer of length len containing the
+ * contents of the file starting at addr and continuing
* for len bytes.
*
* udata_ptr: Pointer to user data provided in the protect call, which
@@ -155,22 +155,22 @@ typedef struct H5C_t H5C_t;
* Processing in the deserialize function should proceed as follows:
*
* If the image contains valid data, and is of the correct length,
- * the deserialize function must allocate space for an in core
- * representation of that data, load the contents of the image into
- * the space allocated for the in core representation, and return
- * a pointer to the in core representation. Observe that an
- * instance of H5C_cache_entry_t must be the first item in this
- * representation. It will have to be initialized appropriately
+ * the deserialize function must allocate space for an in core
+ * representation of that data, load the contents of the image into
+ * the space allocated for the in core representation, and return
+ * a pointer to the in core representation. Observe that an
+ * instance of H5C_cache_entry_t must be the first item in this
+ * representation. It will have to be initialized appropriately
* after the callback returns.
*
* Note that the structure of the in core representation is otherwise
- * up to the cache client. All that is required is that the pointer
- * returned be sufficient for the clients purposes when it is returned
+ * up to the cache client. All that is required is that the pointer
+ * returned be sufficient for the clients purposes when it is returned
* on a protect call.
*
* If the deserialize function has to clean up file corruption
* left over from an old bug in the HDF5 library, it must set
- * *dirty_ptr to TRUE. If it doesn't, no action is needed as
+ * *dirty_ptr to TRUE. If it doesn't, no action is needed as
* *dirty_ptr will be set to FALSE before the deserialize call.
*
* If the operation fails for any reason (i.e. bad data in buffer, bad
@@ -214,18 +214,18 @@ typedef struct H5C_t H5C_t;
* serialize: Pointer to the serialize callback.
*
* The serialize callback is invoked by the metadata cache whenever
- * it needs a current on disk image of the metadata entry for purposes
+ * it needs a current on disk image of the metadata entry for purposes
* either constructing a journal or flushing the entry to disk.
*
- * At this point, one would think that the base address and length of
- * the length of the entry's image on disk would be well known.
- * However, that need not be the case as fractal heap blocks can
- * change size (and therefor possible location as well) on
- * serialization if compression is enabled. In the old H5C code,
- * this happened on a flush, and occasioned a rename in the midst
- * of the flush. To avoid this in H5C, the serialize callback
- * will return the new base address, length, and image pointer to
- * the caller when necessary. The caller must then update the
+ * At this point, one would think that the base address and length of
+ * the length of the entry's image on disk would be well known.
+ * However, that need not be the case as fractal heap blocks can
+ * change size (and therefor possible location as well) on
+ * serialization if compression is enabled. In the old H5C code,
+ * this happened on a flush, and occasioned a rename in the midst
+ * of the flush. To avoid this in H5C, the serialize callback
+ * will return the new base address, length, and image pointer to
+ * the caller when necessary. The caller must then update the
* metadata cache's internal structures accordingly.
*
* The typedef for the serialize callback is as follows:
@@ -237,19 +237,19 @@ typedef struct H5C_t H5C_t;
* void * image_ptr,
* void * thing,
* unsigned * flags_ptr,
- * haddr_t * new_addr_ptr,
- * size_t * new_len_ptr,
+ * haddr_t * new_addr_ptr,
+ * size_t * new_len_ptr,
* void ** new_image_ptr_ptr);
*
* The parameters of the serialize callback are as follows:
*
* f: File pointer -- needed if other metadata cache entries
- * must be modified in the process of serializing the
+ * must be modified in the process of serializing the
* target entry.
*
- * dxpl_id: dxpl_id passed with the file pointer to the cache, and
- * passed on to the callback. Necessary as some callbacks
- * revise the size and location of the target entry, or
+ * dxpl_id: dxpl_id passed with the file pointer to the cache, and
+ * passed on to the callback. Necessary as some callbacks
+ * revise the size and location of the target entry, or
* possibly other entries on serialize.
*
* addr: Base address in file of the entry to be serialized.
@@ -267,157 +267,157 @@ typedef struct H5C_t H5C_t;
* mode, but the parameter may be unused when compiled in
* production mode.
*
- * image_ptr: Pointer to a buffer of length len bytes into which a
- * serialized image of the target metadata cache entry is
+ * image_ptr: Pointer to a buffer of length len bytes into which a
+ * serialized image of the target metadata cache entry is
* to be written.
*
- * Note that this buffer will not in general be initialized
- * to any particular value. Thus the serialize function may
- * not assume any initial value and must set each byte in
+ * Note that this buffer will not in general be initialized
+ * to any particular value. Thus the serialize function may
+ * not assume any initial value and must set each byte in
* the buffer.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry.
- * This is the same pointer returned by a protect of the
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry.
+ * This is the same pointer returned by a protect of the
* addr and len given above.
*
- * flags_ptr: Pointer to an unsigned integer used to return flags
- * indicating whether the resize function resized or renamed
- * the entry. If the entry was neither resized or renamed,
- * the serialize function must set *flags_ptr to zero.
- * H5C__SERIALIZE_RESIZED_FLAG and H5C__SERIALIZE_RENAMED_FLAG
+ * flags_ptr: Pointer to an unsigned integer used to return flags
+ * indicating whether the resize function resized or renamed
+ * the entry. If the entry was neither resized or renamed,
+ * the serialize function must set *flags_ptr to zero.
+ * H5C__SERIALIZE_RESIZED_FLAG and H5C__SERIALIZE_RENAMED_FLAG
* must be set to indicate a resize and a rename respectively.
*
- * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
- * and image pointer must be stored in *new_len_ptr and
- * *new_image_ptr_ptr respectively.
- *
- * If the H5C__SERIALIZE_RENAMED_FLAG flag is also set, the
- * new image base address must be stored in *new_addr_ptr.
- * Observe that the H5C__SERIALIZE_RENAMED_FLAG must not
- * appear without the H5C__SERIALIZE_RESIZED_FLAG.
- *
- * Except as noted above, the locations pointed to by the
- * remaining parameters are undefined, and should be ignored
- * by the caller.
- *
- * new_addr_ptr: Pointer to haddr_t. If the entry is renamed by
- * the serialize function, the new on disk base address must
- * be stored in *new_addr_ptr. If the entry is not renamed
- * by the serialize function, *new_addr_ptr is undefined.
- *
- * new_len_ptr: Pointer to size_t. If the entry is resized by the
- * serialize function, the new length of the on disk image
- * must be stored in *new_len_ptr. If the entry is not
- * resized by the serialize function, *new_len_ptr is
- * undefined.
- *
- * new_image_ptr_ptr: Pointer to pointer to void. If the entry is
- * resized by the serialize function, the pointer to the
- * new buffer containing the on disk image must be stored
- * in *new_image_ptr_ptr. If the entry is not resized by
+ * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
+ * and image pointer must be stored in *new_len_ptr and
+ * *new_image_ptr_ptr respectively.
+ *
+ * If the H5C__SERIALIZE_RENAMED_FLAG flag is also set, the
+ * new image base address must be stored in *new_addr_ptr.
+ * Observe that the H5C__SERIALIZE_RENAMED_FLAG must not
+ * appear without the H5C__SERIALIZE_RESIZED_FLAG.
+ *
+ * Except as noted above, the locations pointed to by the
+ * remaining parameters are undefined, and should be ignored
+ * by the caller.
+ *
+ * new_addr_ptr: Pointer to haddr_t. If the entry is renamed by
+ * the serialize function, the new on disk base address must
+ * be stored in *new_addr_ptr. If the entry is not renamed
+ * by the serialize function, *new_addr_ptr is undefined.
+ *
+ * new_len_ptr: Pointer to size_t. If the entry is resized by the
+ * serialize function, the new length of the on disk image
+ * must be stored in *new_len_ptr. If the entry is not
+ * resized by the serialize function, *new_len_ptr is
+ * undefined.
+ *
+ * new_image_ptr_ptr: Pointer to pointer to void. If the entry is
+ * resized by the serialize function, the pointer to the
+ * new buffer containing the on disk image must be stored
+ * in *new_image_ptr_ptr. If the entry is not resized by
* the serialize function, *new_image_ptr_ptr is undefined.
*
- * Processing in the serialize function should proceed as follows:
+ * Processing in the serialize function should proceed as follows:
*
- * The serialize function must examine the in core representation
- * indicated by the thing parameter, and write a serialized image
- * of its contents into the provided buffer.
+ * The serialize function must examine the in core representation
+ * indicated by the thing parameter, and write a serialized image
+ * of its contents into the provided buffer.
*
- * If the serialize function does not change the size or location
- * of the on disk image, it must set *flags_ptr to zero.
+ * If the serialize function does not change the size or location
+ * of the on disk image, it must set *flags_ptr to zero.
*
- * If the size of the on disk image must be changed, the serialize
- * function must free the old image buffer (base address in image_ptr),
- * allocate a new one, load the image into the new buffer, load the
- * base address of the new buffer into *new_image_ptr_ptr, load the
- * length of the new image into *new_len_ptr, and set the
- * H5C__SERIALIZE_RESIZED_FLAG in *flags_ptr.
+ * If the size of the on disk image must be changed, the serialize
+ * function must free the old image buffer (base address in image_ptr),
+ * allocate a new one, load the image into the new buffer, load the
+ * base address of the new buffer into *new_image_ptr_ptr, load the
+ * length of the new image into *new_len_ptr, and set the
+ * H5C__SERIALIZE_RESIZED_FLAG in *flags_ptr.
*
- * If in addition, the base address of the on disk image must
- * be changed, the serialize function must also set *new_addr_ptr
- * to the new base address, and set the H5C__SERIALIZE_RENAMED_FLAG
+ * If in addition, the base address of the on disk image must
+ * be changed, the serialize function must also set *new_addr_ptr
+ * to the new base address, and set the H5C__SERIALIZE_RENAMED_FLAG
* in *flags_ptr.
*
- * If it is successful, the function must return SUCCEED.
+ * If it is successful, the function must return SUCCEED.
*
* If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
+ * push error information on the error stack with the error API
* routines.
*
*
* free_icr: Pointer to the free ICR Callback.
*
- * The free ICR callback is invoked by the metadata cache when it
- * wishes to evict an entry, and needs the client to free the memory
- * allocated for the in core representation.
+ * The free ICR callback is invoked by the metadata cache when it
+ * wishes to evict an entry, and needs the client to free the memory
+ * allocated for the in core representation.
*
- * The typedef for the free ICR callback is as follows:
+ * The typedef for the free ICR callback is as follows:
*
- * typedef herr_t (*N5C_free_icr_func_t)(haddr_t addr,
+ * typedef herr_t (*N5C_free_icr_func_t)(haddr_t addr,
* size_t len,
* void * thing);
- *
- * The parameters of the free ICR callback are as follows:
*
- * addr: Base address in file of the entry being evicted.
+ * The parameters of the free ICR callback are as follows:
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * addr: Base address in file of the entry being evicted.
*
- * len: Length of the in file image of the entry being evicted
- * in bytes.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * len: Length of the in file image of the entry being evicted
+ * in bytes.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry. This
- * is the same pointer that would be returned by a protect
- * of the addr and len above.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * Processing in the free ICR function should proceed as follows:
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry. This
+ * is the same pointer that would be returned by a protect
+ * of the addr and len above.
*
- * The free ICR function must free all memory allocated to the
- * in core representation.
+ * Processing in the free ICR function should proceed as follows:
*
- * If the function is successful, it must return SUCCEED.
+ * The free ICR function must free all memory allocated to the
+ * in core representation.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If the function is successful, it must return SUCCEED.
*
- * At least when compiled with debug, it would be useful if the
- * free ICR call would fail if the in core representation has been
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
+ *
+ * At least when compiled with debug, it would be useful if the
+ * free ICR call would fail if the in core representation has been
* modified since the last serialize of clear callback.
*
*
* clear_dirty_bits: Pointer to the clear dirty bits callback.
*
- * For sanity checking purposes, it will be useful if cache clients
- * track whether an in core representation has been modified since
- * the last time it was serialized. This data is used to flag an
- * error if the cache attempts to free an in core representation
- * that has not been serialized since the last time it was modified.
+ * For sanity checking purposes, it will be useful if cache clients
+ * track whether an in core representation has been modified since
+ * the last time it was serialized. This data is used to flag an
+ * error if the cache attempts to free an in core representation
+ * that has not been serialized since the last time it was modified.
*
- * If this happens, either the client forgot to tell the cache that
- * an entry is dirty, or the cache forgot to flush a dirty entry
- * before evicting it. In either case we want to know before we
- * get file corruption complaints.
+ * If this happens, either the client forgot to tell the cache that
+ * an entry is dirty, or the cache forgot to flush a dirty entry
+ * before evicting it. In either case we want to know before we
+ * get file corruption complaints.
*
- * However, in some cases, we want to mark an entry as clean even
- * though it has not been flushed to disk -- most particularly in
- * the parallel case. Thus we need some way to tell the client
- * that a free of the associated ICR is OK even though it has
- * been modified since the last serialization. Hence the clear
- * dirty bits callback.
+ * However, in some cases, we want to mark an entry as clean even
+ * though it has not been flushed to disk -- most particularly in
+ * the parallel case. Thus we need some way to tell the client
+ * that a free of the associated ICR is OK even though it has
+ * been modified since the last serialization. Hence the clear
+ * dirty bits callback.
*
- * Since the clear dirty bits callback is purely for sanity checking,
- * it is called only when we compile with debug.
+ * Since the clear dirty bits callback is purely for sanity checking,
+ * it is called only when we compile with debug.
*
* The typedef for the clear callback is as follows:
*
@@ -425,27 +425,27 @@ typedef struct H5C_t H5C_t;
* size_t len,
* void * thing);
*
- * The parameters of the clear callback are as follows:
+ * The parameters of the clear callback are as follows:
*
- * addr: Base address in file of the entry whose dirty bits
- * are being cleared
+ * addr: Base address in file of the entry whose dirty bits
+ * are being cleared
*
- * len: Length in bytes of the in file image of the entry
- * whose dirty bits are being cleared.
+ * len: Length in bytes of the in file image of the entry
+ * whose dirty bits are being cleared.
*
- * thing: Pointer to void containing the address of the in
- * core representation of the target metadata cache entry.
- * This is the same pointer that would be returned by a
- * protect of the addr and len above.
+ * thing: Pointer to void containing the address of the in
+ * core representation of the target metadata cache entry.
+ * This is the same pointer that would be returned by a
+ * protect of the addr and len above.
*
- * Processing in the clear callback function should proceed as follows:
+ * Processing in the clear callback function should proceed as follows:
*
- * The function must clear any dirty bits associated with the ICR.
+ * The function must clear any dirty bits associated with the ICR.
*
- * If successful, the function must return SUCCEED.
+ * If successful, the function must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
* routines.
*
***************************************************************************/
@@ -454,7 +454,7 @@ typedef void *(*H5C_deserialize_func_t)(haddr_t addr,
const void * image_ptr,
void * udata_ptr,
hbool_t * dirty_ptr);
-
+
typedef herr_t (*H5C_image_len_func_t)(const void *thing,
size_t *image_len_ptr);
@@ -467,12 +467,12 @@ typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f,
size_t len,
void * image_ptr,
void * thing,
- unsigned * flags_ptr,
- haddr_t * new_addr_ptr,
- size_t * new_len_ptr,
+ unsigned * flags_ptr,
+ haddr_t * new_addr_ptr,
+ size_t * new_len_ptr,
void ** new_image_ptr_ptr);
-typedef herr_t (*H5C_free_icr_func_t)(haddr_t addr,
+typedef herr_t (*H5C_free_icr_func_t)(haddr_t addr,
size_t len,
void * thing);
@@ -543,23 +543,23 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
*
* JRM - 4/26/04
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C__H5C_CACHE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
*
- * This is necessary, as the LRU list can be changed out
+ * This is necessary, as the LRU list can be changed out
* from under H5C_make_space_in_cache() by the serialize
* callback which may change the size of an existing entry,
* and/or load a new entry while serializing the target entry.
*
- * This in turn can cause a recursive call to
+ * This in turn can cause a recursive call to
* H5C_make_space_in_cache() which may either flush or evict
* the next entry that the first invocation of that function
* was about to examine.
*
* The magic field allows H5C_make_space_in_cache() to
- * detect this case, and re-start its scan from the bottom
+ * detect this case, and re-start its scan from the bottom
* of the LRU when this situation occurs.
*
* cache_ptr: Pointer to the cache that this entry is contained within.
@@ -580,8 +580,8 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* block of memory on disk. The image of this block (i.e.
* the on disk image) is stored in *image_ptr (discussed below).
*
- * image_ptr: Pointer to void. When not NULL, this field points to a
- * dynamically allocated block of size bytes in which the
+ * image_ptr: Pointer to void. When not NULL, this field points to a
+ * dynamically allocated block of size bytes in which the
* on disk image of the metadata cache entry is stored.
*
* If the entry is dirty, the serialize callback must be used
@@ -645,20 +645,20 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* Note that protected entries are removed from the LRU lists
* and inserted on the protected list.
*
- * is_read_only: Boolean flag that is only meaningful if is_protected is
- * TRUE. In this circumstance, it indicates whether the
+ * is_read_only: Boolean flag that is only meaningful if is_protected is
+ * TRUE. In this circumstance, it indicates whether the
* entry has been protected read only, or read/write.
*
* If the entry has been protected read only (i.e. is_protected
- * and is_read_only are both TRUE), we allow the entry to be
+ * and is_read_only are both TRUE), we allow the entry to be
* protected more than once.
*
- * In this case, the number of readers is maintained in the
+ * In this case, the number of readers is maintained in the
* ro_ref_count field (see below), and unprotect calls simply
* decrement that field until it drops to zero, at which point
* the entry is actually unprotected.
*
- * ro_ref_count: Integer field used to maintain a count of the number of
+ * ro_ref_count: Integer field used to maintain a count of the number of
* outstanding read only protects on this entry. This field
* must be zero whenever either is_protected or is_read_only
* are TRUE.
@@ -720,7 +720,7 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* is in the process of being flushed. This allows the cache
* to detect when a call is the result of a flush callback.
*
- * destroy_in_progress: Boolean flag that is set to true iff the entry
+ * destroy_in_progress: Boolean flag that is set to true iff the entry
* is in the process of being flushed and destroyed.
*
*
@@ -811,24 +811,24 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
* the specified transaction has made it to disk, we will
* reset this field to zero as well.
*
- * We must maintain this field, as to avoid messages from
- * the future, we must not flush a dirty entry to disk
- * until the last transaction in which it was dirtied
+ * We must maintain this field, as to avoid messages from
+ * the future, we must not flush a dirty entry to disk
+ * until the last transaction in which it was dirtied
* has made it to disk in the journal file.
*
- * trans_next: Next pointer in the entries modified in the current
+ * trans_next: Next pointer in the entries modified in the current
* transaction list. This field should always be null
- * unless journaling is enabled, the entry is dirty,
+ * unless journaling is enabled, the entry is dirty,
* and last_trans field contains the current transaction
- * number. Even if all these conditions are fulfilled,
- * the field will still be NULL if this is the last
+ * number. Even if all these conditions are fulfilled,
+ * the field will still be NULL if this is the last
* entry on the list.
*
- * trans_prev: Previous pointer in the entries modified in the current
+ * trans_prev: Previous pointer in the entries modified in the current
* transaction list. This field should always be null
- * unless journaling is enabled, the entry is dirty,
+ * unless journaling is enabled, the entry is dirty,
* and last_trans field contains the current transaction
- * number. Even if all these conditions are fulfilled,
+ * number. Even if all these conditions are fulfilled,
* the field will still be NULL if this is the first
* entry on the list.
*
@@ -863,12 +863,12 @@ typedef struct H5C_cache_entry_t
#ifndef NDEBUG
uint32_t magic;
#endif /* NDEBUG */
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
haddr_t addr;
size_t size;
void * image_ptr;
hbool_t image_up_to_date;
- const H5C_class_t * type;
+ const H5C_class_t * type;
hbool_t is_dirty;
hbool_t dirtied;
hbool_t is_protected;
@@ -1045,7 +1045,7 @@ typedef struct H5C_cache_entry_t
*
*
* With a little thought, it should be obvious that the above flash
- * cache size increase algorithm is not sufficient for all
+ * cache size increase algorithm is not sufficient for all
* circumstances -- for example, suppose the user round robins through
* (1/flash_threshold) +1 groups, adding one data set to each on each
* pass. Then all will increase in size at about the same time, requiring
@@ -1062,11 +1062,11 @@ typedef struct H5C_cache_entry_t
* flash_incr_mode section. This field is ignored unless flash_incr_mode
* is H5C_flash_incr__add_space.
*
- * flash_threshold: Double containing the factor by which current max cache
- * size is multiplied to obtain the size threshold for the add_space
- * flash increment algorithm. The field is ignored unless
+ * flash_threshold: Double containing the factor by which current max cache
+ * size is multiplied to obtain the size threshold for the add_space
+ * flash increment algorithm. The field is ignored unless
* flash_incr_mode is H5C_flash_incr__add_space.
- *
+ *
*
* Cache size decrease control fields:
*
@@ -1181,8 +1181,8 @@ typedef struct H5C_cache_entry_t
#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5
#define H5C__DEF_AR_INCREMENT 2.0
#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
-#define H5C__DEF_AR_FLASH_MULTIPLE 1.0
-#define H5C__DEV_AR_FLASH_THRESHOLD 0.25
+#define H5C__DEF_AR_FLASH_MULTIPLE 1.0
+#define H5C__DEV_AR_FLASH_THRESHOLD 0.25
#define H5C__DEF_AR_DECREMENT 0.9
#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
#define H5C__DEF_AR_EPCHS_B4_EVICT 3
@@ -1199,15 +1199,15 @@ typedef struct H5C_cache_entry_t
enum H5C_resize_status
{
- in_spec2,
- increase2,
- flash_increase2,
- decrease2,
- at_max_size2,
- at_min_size2,
- increase_disabled2,
- decrease_disabled2,
- not_full2
+ in_spec,
+ increase,
+ flash_increase,
+ decrease,
+ at_max_size,
+ at_min_size,
+ increase_disabled,
+ decrease_disabled,
+ not_full
}; /* enum H5C_resize_conditions */
typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t * cache_ptr,
@@ -1246,7 +1246,7 @@ typedef struct H5C_auto_size_ctl_t
hbool_t apply_max_increment;
size_t max_increment;
- enum H5C_cache_flash_incr_mode flash_incr_mode;
+ enum H5C_cache_flash_incr_mode flash_incr_mode;
double flash_multiple;
double flash_threshold;
@@ -1273,14 +1273,14 @@ typedef struct H5C_auto_size_ctl_t
*
* structure H5C_mdj_config_t
*
- * H5C_mdj_config_t is a structure intended for use in comminicating
- * metadata journaling configuration data to and from the metadata
- * cache.
+ * H5C_mdj_config_t is a structure intended for use in comminicating
+ * metadata journaling configuration data to and from the metadata
+ * cache.
*
* In its initial incarnation, it is identical to the H5AC_jnl_config_t
- * structure less ther version, and journal_recovered fields. However,
- * in the future we may support other types of journaling -- which will
- * likely require modification or replacement of the H5AC_jnl_config_t
+ * structure less ther version, and journal_recovered fields. However,
+ * in the future we may support other types of journaling -- which will
+ * likely require modification or replacement of the H5AC_jnl_config_t
* structure.
*
* The fields of the structure are discussed individually below. Note
@@ -1300,7 +1300,7 @@ typedef struct H5C_auto_size_ctl_t
*
* At present, the length of the journal file path is restricted to
* no more than H5C__MAX_JOURNAL_FILE_NAME_LEN (which must equal
- * H5AC__MAX_JOURNAL_FILE_NAME_LEN).
+ * H5AC__MAX_JOURNAL_FILE_NAME_LEN).
*
* jbrb_buf_size: size_t containing the size of each individual buffer
* in the journal buffer ring buffer. This size should be chosen
@@ -1406,112 +1406,111 @@ typedef herr_t (*H5C_mdj_status_change_func_t)(const H5C_mdj_config_t * config_p
#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x0200
#define H5C__READ_ONLY_FLAG 0x0400
-H5_DLL H5C_t * H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
- const char * (* type_name_table_ptr),
- H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
- H5C_log_flush_func_t log_flush,
- void * aux_ptr);
+H5_DLL H5C_t * H5C_create(size_t max_cache_size,
+ size_t min_clean_size,
+ int max_type_id,
+ const char * (* type_name_table_ptr),
+ H5C_write_permitted_func_t check_write_permitted,
+ hbool_t write_permitted,
+ H5C_log_flush_func_t log_flush,
+ void * aux_ptr);
H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
- int32_t version,
- double hit_rate,
- enum H5C_resize_status status,
- size_t old_max_cache_size,
- size_t new_max_cache_size,
- size_t old_min_clean_size,
- size_t new_min_clean_size);
+ int32_t version,
+ double hit_rate,
+ enum H5C_resize_status status,
+ size_t old_max_cache_size,
+ size_t new_max_cache_size,
+ size_t old_min_clean_size,
+ size_t new_min_clean_size);
H5_DLL herr_t H5C_dest(H5F_t * f,
- hid_t dxpl_id);
+ hid_t dxpl_id);
H5_DLL herr_t H5C_dest_empty(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr);
+H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr);
H5_DLL herr_t H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags);
H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
- hid_t dxpl_id);
+ hid_t dxpl_id);
H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
- size_t * max_size_ptr,
- size_t * min_clean_size_ptr,
- size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr);
+ size_t * max_size_ptr,
+ size_t * min_clean_size_ptr,
+ size_t * cur_size_ptr,
+ int32_t * cur_num_entries_ptr);
H5_DLL herr_t H5C_get_cache_hit_rate(H5C_t * cache_ptr,
double * hit_rate_ptr);
-H5_DLL herr_t H5C_get_entry_status(const H5F_t * f,
- haddr_t addr,
- size_t * size_ptr,
- hbool_t * in_cache_ptr,
- hbool_t * is_dirty_ptr,
- hbool_t * is_protected_ptr,
- hbool_t * is_pinned_ptr);
+H5_DLL herr_t H5C_get_entry_status(const H5F_t *f,
+ haddr_t addr,
+ size_t * size_ptr,
+ hbool_t * in_cache_ptr,
+ hbool_t * is_dirty_ptr,
+ hbool_t * is_protected_ptr,
+ hbool_t * is_pinned_ptr);
H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t * cache_ptr,
- hbool_t * evictions_enabled_ptr);
+ hbool_t * evictions_enabled_ptr);
H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr,
FILE **trace_file_ptr_ptr);
H5_DLL herr_t H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
- FILE ** trace_file_ptr_ptr);
+ FILE **trace_file_ptr_ptr);
-H5_DLL herr_t H5C_insert_entry(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * thing,
- unsigned int flags);
+H5_DLL herr_t H5C_insert_entry(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * thing,
+ unsigned int flags);
H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t * f,
- hid_t dxpl_id,
- int32_t ce_array_len,
- haddr_t * ce_array_ptr);
+ hid_t dxpl_id,
+ int32_t ce_array_len,
+ haddr_t *ce_array_ptr);
H5_DLL herr_t H5C_mark_pinned_entry_dirty(void * thing,
hbool_t size_changed,
size_t new_size);
-H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(void * thing);
+H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5C_rename_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t old_addr,
haddr_t new_addr);
-H5_DLL herr_t H5C_pin_protected_entry(void * thing);
+H5_DLL herr_t H5C_pin_protected_entry(void *thing);
-H5_DLL void * H5C_protect(H5F_t * f,
- hid_t dxpl_id,
- const H5C_class_t * type,
- haddr_t addr,
- size_t len,
- void * udata,
- unsigned flags);
+H5_DLL void * H5C_protect(H5F_t * f,
+ hid_t dxpl_id,
+ const H5C_class_t * type,
+ haddr_t addr,
+ size_t len,
+ void * udata,
+ unsigned flags);
H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_resize_pinned_entry(void * thing,
- size_t new_size);
+H5_DLL herr_t H5C_resize_pinned_entry(void *thing, size_t new_size);
-H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
- H5C_auto_size_ctl_t *config_ptr);
+H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
+ H5C_auto_size_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t * cache_ptr,
- hbool_t evictions_enabled);
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
+ hbool_t evictions_enabled);
H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix);
@@ -1528,15 +1527,15 @@ H5_DLL herr_t H5C_stats(H5C_t * cache_ptr,
H5_DLL void H5C_stats__reset(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_unpin_entry(void * thing);
+H5_DLL herr_t H5C_unpin_entry(void *thing);
H5_DLL herr_t H5C_unprotect(H5F_t * f,
- hid_t dxpl_id,
+ hid_t dxpl_id,
const H5C_class_t * type,
- haddr_t addr,
- void * thing,
- unsigned int flags,
- size_t new_size);
+ haddr_t addr,
+ void * thing,
+ unsigned int flags,
+ size_t new_size);
H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
unsigned int tests);
@@ -1547,37 +1546,37 @@ H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
/**************************************************************************/
H5_DLL herr_t H5C_begin_journaling(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- H5C_mdj_config_t * config_ptr);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr,
+ H5C_mdj_config_t * config_ptr);
H5_DLL herr_t H5C_begin_transaction(H5C_t * cache_ptr,
- uint64_t * trans_num_ptr,
- const char * api_call_name);
+ uint64_t * trans_num_ptr,
+ const char * api_call_name);
H5_DLL herr_t H5C_end_journaling(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr);
H5_DLL herr_t H5C_end_transaction(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- uint64_t trans_num,
- const char * api_call_name);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr,
+ uint64_t trans_num,
+ const char * api_call_name);
H5_DLL herr_t H5C_get_journal_config(H5C_t * cache_ptr,
- H5C_mdj_config_t * config_ptr);
+ H5C_mdj_config_t * config_ptr);
H5_DLL herr_t H5C_journal_post_flush(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- hbool_t cache_is_clean);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr,
+ hbool_t cache_is_clean);
H5_DLL herr_t H5C_journal_pre_flush(H5C_t * cache_ptr);
H5_DLL herr_t H5C_journal_transaction(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr);
H5_DLL herr_t H5C_update_for_new_last_trans_on_disk(H5C_t * cache_ptr,
uint64_t new_last_trans_on_disk);
@@ -1589,9 +1588,9 @@ H5_DLL herr_t H5C_update_for_new_last_trans_on_disk(H5C_t * cache_ptr,
typedef struct H5C_jbrb_t H5C_jbrb_t;
-/* Note that H5C_jb_aio_await_completion_of_all_async_fsyncs() and
+/* Note that H5C_jb_aio_await_completion_of_all_async_fsyncs() and
* H5C_jb_aio__await_completion_of_all_pending_writes() are declared
- * in this header file purely for testing purposes -- they should not be
+ * in this header file purely for testing purposes -- they should not be
* called outside test/cache_journal.c
*/
H5_DLL herr_t H5C_jb_aio__await_completion_of_all_async_fsyncs(
@@ -1602,44 +1601,44 @@ H5_DLL herr_t H5C_jb_aio__await_completion_of_all_pending_writes(
H5_DLL herr_t H5C_jb__bin2hex(const uint8_t * buf,
- char * hexdata,
- size_t * hexlength,
- size_t buf_size);
+ char * hexdata,
+ size_t * hexlength,
+ size_t buf_size);
H5_DLL herr_t H5C_jb__comment(H5C_jbrb_t * struct_ptr,
- const char * comment_ptr);
+ const char * comment_ptr);
H5_DLL herr_t H5C_jb__end_transaction(H5C_jbrb_t * struct_ptr,
- uint64_t trans_num);
+ uint64_t trans_num);
H5_DLL herr_t H5C_jb__eoa(H5C_jbrb_t * struct_ptr,
- haddr_t eoa);
+ haddr_t eoa);
H5_DLL herr_t H5C_jb__get_last_transaction_on_disk(H5C_jbrb_t * struct_ptr,
- uint64_t * trans_num_ptr);
+ uint64_t * trans_num_ptr);
H5_DLL herr_t H5C_jb__flush(H5C_jbrb_t * struct_ptr);
H5_DLL herr_t H5C_jb__journal_entry(H5C_jbrb_t * struct_ptr,
- uint64_t trans_num,
- haddr_t base_addr,
- size_t length,
- const uint8_t * body);
+ uint64_t trans_num,
+ haddr_t base_addr,
+ size_t length,
+ const uint8_t * body);
H5_DLL herr_t H5C_jb__init(H5C_jbrb_t * struct_ptr,
- const int32_t journal_magic,
- const char * HDF5_file_name,
- const char * journal_file_name,
- size_t buf_size,
- int num_bufs,
- hbool_t use_aio,
- hbool_t human_readable,
- size_t sizeof_addr,
- size_t sizeof_size);
+ const int32_t journal_magic,
+ const char * HDF5_file_name,
+ const char * journal_file_name,
+ size_t buf_size,
+ int num_bufs,
+ hbool_t use_aio,
+ hbool_t human_readable,
+ size_t sizeof_addr,
+ size_t sizeof_size);
H5_DLL herr_t H5C_jb__start_transaction(H5C_jbrb_t * struct_ptr,
- uint64_t trans_num);
+ uint64_t trans_num);
H5_DLL herr_t H5C_jb__takedown(H5C_jbrb_t * struct_ptr);
@@ -1647,20 +1646,20 @@ H5_DLL herr_t H5C_jb__trunc(H5C_jbrb_t * struct_ptr);
H5_DLL herr_t H5C_jb__write_header_entry(H5C_jbrb_t * struct_ptr);
-H5_DLL herr_t H5C_jb__write_to_buffer(H5C_jbrb_t * struct_ptr,
- size_t size,
- const char * data,
- hbool_t is_end_trans,
- uint64_t trans_num);
+H5_DLL herr_t H5C_jb__write_to_buffer(H5C_jbrb_t * struct_ptr,
+ size_t size,
+ const char * data,
+ hbool_t is_end_trans,
+ uint64_t trans_num);
/*****************************************************************************/
/***** superblock journaling message management function definitions: ********/
/*****************************************************************************/
H5_DLL herr_t H5C_check_for_journaling(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr,
- hbool_t journal_recovered);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr,
+ hbool_t journal_recovered);
H5_DLL herr_t H5C_mark_journaling_in_progress(H5F_t * f,
hid_t dxpl_id,
@@ -1668,8 +1667,8 @@ H5_DLL herr_t H5C_mark_journaling_in_progress(H5F_t * f,
const char * journal_file_name_ptr);
H5_DLL herr_t H5C_unmark_journaling_in_progress(H5F_t * f,
- hid_t dxpl_id,
- H5C_t * cache_ptr);
+ hid_t dxpl_id,
+ H5C_t * cache_ptr);
/**************************************************************************/
@@ -1677,12 +1676,12 @@ H5_DLL herr_t H5C_unmark_journaling_in_progress(H5F_t * f,
/**************************************************************************/
H5_DLL herr_t H5C_deregister_mdjsc_callback(H5C_t * cache_ptr,
- int32_t idx);
+ int32_t idx);
H5_DLL herr_t H5C_register_mdjsc_callback(H5C_t * cache_ptr,
- H5C_mdj_status_change_func_t fcn_ptr,
- void * data_ptr,
- int32_t * idx_ptr);
+ H5C_mdj_status_change_func_t fcn_ptr,
+ void * data_ptr,
+ int32_t * idx_ptr);
#endif /* !_H5Cprivate_H */
diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h
index 9ade25c..39ebbe3 100644
--- a/src/H5Cpublic.h
+++ b/src/H5Cpublic.h
@@ -47,7 +47,6 @@ enum H5C_cache_flash_incr_mode
H5C_flash_incr__add_space
};
-
enum H5C_cache_decr_mode
{
H5C_decr__off,
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 803694d..292748b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -29,6 +29,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5Dpkg.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5FOprivate.h" /* File objects */
#include "H5HLprivate.h" /* Local heaps */
#include "H5Iprivate.h" /* IDs */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 94c7646..4b24d4e 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -34,7 +34,6 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 9f7a0fc..a67f6aa 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -23,7 +23,6 @@
#define H5O_PACKAGE /*suppress error about including H5Opkg */
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index a256f3d..0c0a7fe 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -25,6 +25,7 @@
/* Other private headers needed by this file */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/* Object header macros */
#define H5O_NMESGS 8 /*initial number of messages */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 2ee2802..645ed1c 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -38,6 +38,7 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppkg.h" /* Property lists */