summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
commit7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch)
tree6bd24199653eff3e99f312d748ba4909686bef61 /src/H5AC.c
parent8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff)
parent2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff)
downloadhdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2
[svn-r28636] merge from trunk.
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index ea535dd..52e7e58 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -464,6 +464,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")
@@ -652,7 +653,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)
@@ -867,7 +868,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)
@@ -935,7 +936,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)
@@ -1020,6 +1021,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")
@@ -1068,6 +1070,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.")
@@ -1109,12 +1112,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)
@@ -1194,7 +1197,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)
@@ -1212,6 +1215,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")
@@ -1274,6 +1278,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")
@@ -1321,6 +1326,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.")
@@ -1376,15 +1382,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)
@@ -1718,12 +1724,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)
@@ -2318,8 +2324,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)