summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 6cf77c2..f5b331f 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -46,6 +46,7 @@
#include "H5FDprivate.h" /* File drivers */
#include "H5Iprivate.h" /* IDs */
#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip Lists */
/****************/
@@ -412,6 +413,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "H5C_set_prefix() failed")
#endif /* H5_HAVE_PARALLEL */
+ /* Set the cache parameters */
if(H5AC_set_cache_auto_resize_config(f->shared->cache, config_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "auto resize configuration failed")
@@ -596,7 +598,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id)
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -807,7 +809,7 @@ H5AC_mark_entry_dirty(void *thing)
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -875,7 +877,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t *aux_ptr;
#endif /* H5_HAVE_PARALLEL */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -960,6 +962,7 @@ H5AC_pin_protected_entry(void *thing)
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
+ /* Pin entry */
if(H5C_pin_protected_entry(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry")
@@ -1008,6 +1011,7 @@ H5AC_create_flush_dependency(void * parent_thing, void * child_thing)
(unsigned long)(((H5C_cache_entry_t *)child_thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
+ /* Create the flush dependency */
if(H5C_create_flush_dependency(parent_thing, child_thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "H5C_create_flush_dependency() failed.")
@@ -1049,12 +1053,12 @@ void *
H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
void *udata, unsigned flags)
{
- void * thing; /* Pointer to native data structure for entry */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
size_t trace_entry_size = 0;
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ void * thing = NULL; /* Pointer to native data structure for entry */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -1134,7 +1138,7 @@ H5AC_resize_entry(void *thing, size_t new_size)
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1152,6 +1156,7 @@ H5AC_resize_entry(void *thing, size_t new_size)
(int)new_size);
#endif /* H5AC__TRACE_FILE_ENABLED */
+ /* Resize the entry */
if(H5C_resize_entry(thing, new_size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry")
@@ -1214,6 +1219,7 @@ H5AC_unpin_entry(void *thing)
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
+ /* Unpin the entry */
if(H5C_unpin_entry(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry")
@@ -1261,6 +1267,7 @@ H5AC_destroy_flush_dependency(void * parent_thing, void * child_thing)
(unsigned long long)(((H5C_cache_entry_t *)child_thing)->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
+ /* Destroy the flush dependency */
if(H5C_destroy_flush_dependency(parent_thing, child_thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "H5C_destroy_flush_dependency() failed.")
@@ -1316,15 +1323,15 @@ herr_t
H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
void *thing, unsigned flags)
{
+#if H5AC__TRACE_FILE_ENABLED
+ char trace[128] = "";
+ FILE * trace_file_ptr = NULL;
+#endif /* H5AC__TRACE_FILE_ENABLED */
hbool_t dirtied;
hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
-#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(FAIL)
@@ -1658,12 +1665,12 @@ done:
herr_t
H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config_ptr)
{
- H5C_auto_size_ctl_t internal_config;
#if H5AC__TRACE_FILE_ENABLED
H5AC_cache_config_t trace_config = H5AC__DEFAULT_CACHE_CONFIG;
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_auto_size_ctl_t internal_config;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2258,8 +2265,8 @@ done:
herr_t
H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t *prev_tag)
{
- H5P_genplist_t *dxpl; /* dataset transfer property list */
- herr_t ret_value = SUCCEED;
+ H5P_genplist_t *dxpl; /* Dataset transfer property list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)