summaryrefslogtreecommitdiffstats
path: root/src/H5ACproxy_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5ACproxy_entry.c')
-rw-r--r--src/H5ACproxy_entry.c222
1 files changed, 103 insertions, 119 deletions
diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c
index 498d023..76e885f 100644
--- a/src/H5ACproxy_entry.c
+++ b/src/H5ACproxy_entry.c
@@ -25,40 +25,35 @@
/****************/
/* Module Setup */
/****************/
-#include "H5ACmodule.h" /* This source code file is part of the H5AC module */
+#include "H5ACmodule.h" /* This source code file is part of the H5AC module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACpkg.h" /* Metadata cache */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MFprivate.h" /* File memory management */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACpkg.h" /* Metadata cache */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MFprivate.h" /* File memory management */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
/* Metadata cache (H5AC) callbacks */
static herr_t H5AC__proxy_entry_image_len(const void *thing, size_t *image_len);
-static herr_t H5AC__proxy_entry_serialize(const H5F_t *f, void *image_ptr,
- size_t len, void *thing);
+static herr_t H5AC__proxy_entry_serialize(const H5F_t *f, void *image_ptr, size_t len, void *thing);
static herr_t H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *thing);
static herr_t H5AC__proxy_entry_free_icr(void *thing);
@@ -68,28 +63,26 @@ static herr_t H5AC__proxy_entry_free_icr(void *thing);
/* H5AC proxy entries inherit cache-like properties from H5AC */
const H5AC_class_t H5AC_PROXY_ENTRY[1] = {{
- H5AC_PROXY_ENTRY_ID, /* Metadata client ID */
- "Proxy entry", /* Metadata client name (for debugging) */
- H5FD_MEM_SUPER, /* File space memory type for client */
- 0, /* Client class behavior flags */
- NULL, /* 'get_initial_load_size' callback */
- NULL, /* 'get_final_load_size' callback */
- NULL, /* 'verify_chksum' callback */
- NULL, /* 'deserialize' callback */
- H5AC__proxy_entry_image_len, /* 'image_len' callback */
- NULL, /* 'pre_serialize' callback */
- H5AC__proxy_entry_serialize, /* 'serialize' callback */
- H5AC__proxy_entry_notify, /* 'notify' callback */
- H5AC__proxy_entry_free_icr, /* 'free_icr' callback */
- NULL, /* 'fsf_size' callback */
+ H5AC_PROXY_ENTRY_ID, /* Metadata client ID */
+ "Proxy entry", /* Metadata client name (for debugging) */
+ H5FD_MEM_SUPER, /* File space memory type for client */
+ 0, /* Client class behavior flags */
+ NULL, /* 'get_initial_load_size' callback */
+ NULL, /* 'get_final_load_size' callback */
+ NULL, /* 'verify_chksum' callback */
+ NULL, /* 'deserialize' callback */
+ H5AC__proxy_entry_image_len, /* 'image_len' callback */
+ NULL, /* 'pre_serialize' callback */
+ H5AC__proxy_entry_serialize, /* 'serialize' callback */
+ H5AC__proxy_entry_notify, /* 'notify' callback */
+ H5AC__proxy_entry_free_icr, /* 'free_icr' callback */
+ NULL, /* 'fsf_size' callback */
}};
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
@@ -97,8 +90,6 @@ const H5AC_class_t H5AC_PROXY_ENTRY[1] = {{
/* Declare a free list to manage H5AC_proxy_entry_t objects */
H5FL_DEFINE_STATIC(H5AC_proxy_entry_t);
-
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_create
*
@@ -115,13 +106,13 @@ H5FL_DEFINE_STATIC(H5AC_proxy_entry_t);
H5AC_proxy_entry_t *
H5AC_proxy_entry_create(void)
{
- H5AC_proxy_entry_t *pentry = NULL; /* Pointer to new proxy entry */
- H5AC_proxy_entry_t *ret_value = NULL; /* Return value */
+ H5AC_proxy_entry_t *pentry = NULL; /* Pointer to new proxy entry */
+ H5AC_proxy_entry_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
/* Allocate new proxy entry */
- if(NULL == (pentry = H5FL_CALLOC(H5AC_proxy_entry_t)))
+ if (NULL == (pentry = H5FL_CALLOC(H5AC_proxy_entry_t)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "can't allocate proxy entry")
/* Set non-zero fields */
@@ -132,14 +123,13 @@ H5AC_proxy_entry_create(void)
done:
/* Release resources on error */
- if(!ret_value)
- if(pentry)
+ if (!ret_value)
+ if (pentry)
pentry = H5FL_FREE(H5AC_proxy_entry_t, pentry);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_create() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_add_parent
*
@@ -155,8 +145,8 @@ done:
herr_t
H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
{
- H5AC_info_t *parent = (H5AC_info_t *)_parent; /* Parent entry's cache info */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_info_t *parent = (H5AC_info_t *)_parent; /* Parent entry's cache info */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -165,20 +155,21 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent)
HDassert(pentry);
/* Add parent to the list of parents */
- if(NULL == pentry->parents)
- if(NULL == (pentry->parents = H5SL_create(H5SL_TYPE_HADDR, NULL)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to create skip list for parents of proxy entry")
+ if (NULL == pentry->parents)
+ if (NULL == (pentry->parents = H5SL_create(H5SL_TYPE_HADDR, NULL)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL,
+ "unable to create skip list for parents of proxy entry")
/* Insert parent address into skip list */
- if(H5SL_insert(pentry->parents, parent, &parent->addr) < 0)
+ if (H5SL_insert(pentry->parents, parent, &parent->addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to insert parent into proxy's skip list")
/* Add flush dependency on parent */
- if(pentry->nchildren > 0) {
+ if (pentry->nchildren > 0) {
/* Sanity check */
HDassert(H5F_addr_defined(pentry->addr));
- if(H5AC_create_flush_dependency(parent, pentry) < 0)
+ if (H5AC_create_flush_dependency(parent, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry")
} /* end if */
@@ -186,7 +177,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_add_parent() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_remove_parent
*
@@ -202,9 +192,9 @@ done:
herr_t
H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
{
- H5AC_info_t *parent = (H5AC_info_t *)_parent; /* Pointer to the parent entry */
- H5AC_info_t *rem_parent; /* Pointer to the removed parent entry */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_info_t *parent = (H5AC_info_t *)_parent; /* Pointer to the parent entry */
+ H5AC_info_t *rem_parent; /* Pointer to the removed parent entry */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -214,31 +204,30 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent)
HDassert(parent);
/* Remove parent from skip list */
- if(NULL == (rem_parent = (H5AC_info_t *)H5SL_remove(pentry->parents, &parent->addr)))
+ if (NULL == (rem_parent = (H5AC_info_t *)H5SL_remove(pentry->parents, &parent->addr)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry parent from skip list")
- if(!H5F_addr_eq(rem_parent->addr, parent->addr))
+ if (!H5F_addr_eq(rem_parent->addr, parent->addr))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "removed proxy entry parent not the same as real parent")
/* Shut down the skip list, if this is the last parent */
- if(0 == H5SL_count(pentry->parents)) {
+ if (0 == H5SL_count(pentry->parents)) {
/* Sanity check */
HDassert(0 == pentry->nchildren);
- if(H5SL_close(pentry->parents) < 0)
+ if (H5SL_close(pentry->parents) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CLOSEERROR, FAIL, "can't close proxy parent skip list")
pentry->parents = NULL;
} /* end if */
/* Remove flush dependency between the proxy entry and a parent */
- if(pentry->nchildren > 0)
- if(H5AC_destroy_flush_dependency(parent, pentry) < 0)
+ if (pentry->nchildren > 0)
+ if (H5AC_destroy_flush_dependency(parent, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on proxy entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_remove_parent() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_add_child_cb
*
@@ -256,21 +245,21 @@ done:
static int
H5AC__proxy_entry_add_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5AC_info_t *parent = (H5AC_info_t *)_item; /* Pointer to the parent entry */
- H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
- int ret_value = H5_ITER_CONT; /* Callback return value */
+ H5AC_info_t * parent = (H5AC_info_t *)_item; /* Pointer to the parent entry */
+ H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
+ int ret_value = H5_ITER_CONT; /* Callback return value */
FUNC_ENTER_STATIC
/* Add flush dependency on parent for proxy entry */
- if(H5AC_create_flush_dependency(parent, pentry) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, H5_ITER_ERROR, "unable to set flush dependency for virtual entry")
+ if (H5AC_create_flush_dependency(parent, pentry) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, H5_ITER_ERROR,
+ "unable to set flush dependency for virtual entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC__proxy_entry_add_child_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_add_child
*
@@ -286,7 +275,7 @@ done:
herr_t
H5AC_proxy_entry_add_child(H5AC_proxy_entry_t *pentry, H5F_t *f, void *child)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -295,32 +284,34 @@ H5AC_proxy_entry_add_child(H5AC_proxy_entry_t *pentry, H5F_t *f, void *child)
HDassert(child);
/* Check for first child */
- if(0 == pentry->nchildren) {
+ if (0 == pentry->nchildren) {
/* Get an address, if the proxy doesn't already have one */
- if(!H5F_addr_defined(pentry->addr))
- if(HADDR_UNDEF == (pentry->addr = H5MF_alloc_tmp(f, 1)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "temporary file space allocation failed for proxy entry")
+ if (!H5F_addr_defined(pentry->addr))
+ if (HADDR_UNDEF == (pentry->addr = H5MF_alloc_tmp(f, 1)))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL,
+ "temporary file space allocation failed for proxy entry")
/* Insert the proxy entry into the cache */
- if(H5AC_insert_entry(f, H5AC_PROXY_ENTRY, pentry->addr, pentry, H5AC__PIN_ENTRY_FLAG) < 0)
+ if (H5AC_insert_entry(f, H5AC_PROXY_ENTRY, pentry->addr, pentry, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to cache proxy entry")
/* Proxies start out clean (insertions are automatically marked dirty) */
- if(H5AC_mark_entry_clean(pentry) < 0)
+ if (H5AC_mark_entry_clean(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean")
/* Proxies start out serialized (insertions are automatically marked unserialized) */
- if(H5AC_mark_entry_serialized(pentry) < 0)
+ if (H5AC_mark_entry_serialized(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry clean")
- /* If there are currently parents, iterate over the list of parents, creating flush dependency on them */
- if(pentry->parents)
- if(H5SL_iterate(pentry->parents, H5AC__proxy_entry_add_child_cb, pentry) < 0)
+ /* If there are currently parents, iterate over the list of parents, creating flush dependency on them
+ */
+ if (pentry->parents)
+ if (H5SL_iterate(pentry->parents, H5AC__proxy_entry_add_child_cb, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents")
} /* end if */
/* Add flush dependency on proxy entry */
- if(H5AC_create_flush_dependency(pentry, child) < 0)
+ if (H5AC_create_flush_dependency(pentry, child) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry")
/* Increment count of children */
@@ -330,7 +321,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_add_child() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_remove_child_cb
*
@@ -348,21 +338,21 @@ done:
static int
H5AC__proxy_entry_remove_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
{
- H5AC_info_t *parent = (H5AC_info_t *)_item; /* Pointer to the parent entry */
- H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
- int ret_value = H5_ITER_CONT; /* Callback return value */
+ H5AC_info_t * parent = (H5AC_info_t *)_item; /* Pointer to the parent entry */
+ H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_udata; /* Pointer to the proxy entry */
+ int ret_value = H5_ITER_CONT; /* Callback return value */
FUNC_ENTER_STATIC
/* Remove flush dependency on parent for proxy entry */
- if(H5AC_destroy_flush_dependency(parent, pentry) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, H5_ITER_ERROR, "unable to remove flush dependency for proxy entry")
+ if (H5AC_destroy_flush_dependency(parent, pentry) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, H5_ITER_ERROR,
+ "unable to remove flush dependency for proxy entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC__proxy_entry_remove_child_cb() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_remove_child
*
@@ -378,7 +368,7 @@ done:
herr_t
H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -387,26 +377,26 @@ H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child)
HDassert(child);
/* Remove flush dependency on proxy entry */
- if(H5AC_destroy_flush_dependency(pentry, child) < 0)
+ if (H5AC_destroy_flush_dependency(pentry, child) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on proxy entry")
/* Decrement count of children */
pentry->nchildren--;
/* Check for last child */
- if(0 == pentry->nchildren) {
+ if (0 == pentry->nchildren) {
/* Check for flush dependencies on proxy's parents */
- if(pentry->parents)
+ if (pentry->parents)
/* Iterate over the list of parents, removing flush dependency on them */
- if(H5SL_iterate(pentry->parents, H5AC__proxy_entry_remove_child_cb, pentry) < 0)
+ if (H5SL_iterate(pentry->parents, H5AC__proxy_entry_remove_child_cb, pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents")
/* Unpin proxy */
- if(H5AC_unpin_entry(pentry) < 0)
+ if (H5AC_unpin_entry(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin proxy entry")
/* Remove proxy entry from cache */
- if(H5AC_remove_entry(pentry) < 0)
+ if (H5AC_remove_entry(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry")
} /* end if */
@@ -414,7 +404,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_remove_child() */
-
/*-------------------------------------------------------------------------
* Function: H5AC_proxy_entry_dest
*
@@ -430,7 +419,7 @@ done:
herr_t
H5AC_proxy_entry_dest(H5AC_proxy_entry_t *pentry)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -448,7 +437,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_proxy_entry_dest() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_image_len
*
@@ -475,7 +463,6 @@ H5AC__proxy_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t *image_len)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5AC__proxy_entry_image_len() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_serialize
*
@@ -492,19 +479,18 @@ H5AC__proxy_entry_image_len(const void H5_ATTR_UNUSED *thing, size_t *image_len)
*/
static herr_t
H5AC__proxy_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *image,
- size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing)
+ size_t H5_ATTR_UNUSED len, void H5_ATTR_UNUSED *thing)
{
FUNC_ENTER_STATIC_NOERR /* Yes, even though this pushes an error on the stack */
- /* Should never be invoked */
- HDassert(0 && "Invalid callback?!?");
+ /* Should never be invoked */
+ HDassert(0 && "Invalid callback?!?");
HERROR(H5E_CACHE, H5E_CANTSERIALIZE, "called unreachable fcn.");
FUNC_LEAVE_NOAPI(FAIL)
} /* end H5AC__proxy_entry_serialize() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_notify
*
@@ -520,33 +506,33 @@ H5AC__proxy_entry_serialize(const H5F_t H5_ATTR_UNUSED *f, void H5_ATTR_UNUSED *
static herr_t
H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
{
- H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Sanity check */
HDassert(pentry);
- switch(action) {
+ switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
- break;
+ break;
- case H5AC_NOTIFY_ACTION_AFTER_LOAD:
+ case H5AC_NOTIFY_ACTION_AFTER_LOAD:
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
-#else /* NDEBUG */
+#else /* NDEBUG */
HDassert(0 && "Invalid action?!?");
#endif /* NDEBUG */
break;
- case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
+ case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache")
-#else /* NDEBUG */
+#else /* NDEBUG */
HDassert(0 && "Invalid action?!?");
#endif /* NDEBUG */
- break;
+ break;
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
/* Sanity checks */
@@ -575,8 +561,8 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
pentry->ndirty_children++;
/* Check for first dirty child */
- if(1 == pentry->ndirty_children)
- if(H5AC_mark_entry_dirty(pentry) < 0)
+ if (1 == pentry->ndirty_children)
+ if (H5AC_mark_entry_dirty(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDIRTY, FAIL, "can't mark proxy entry dirty")
break;
@@ -588,8 +574,8 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
pentry->ndirty_children--;
/* Check for last dirty child */
- if(0 == pentry->ndirty_children)
- if(H5AC_mark_entry_clean(pentry) < 0)
+ if (0 == pentry->ndirty_children)
+ if (H5AC_mark_entry_clean(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean")
break;
@@ -598,8 +584,8 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
pentry->nunser_children++;
/* Check for first unserialized child */
- if(1 == pentry->nunser_children)
- if(H5AC_mark_entry_unserialized(pentry) < 0)
+ if (1 == pentry->nunser_children)
+ if (H5AC_mark_entry_unserialized(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNSERIALIZE, FAIL, "can't mark proxy entry unserialized")
break;
@@ -611,24 +597,23 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing)
pentry->nunser_children--;
/* Check for last unserialized child */
- if(0 == pentry->nunser_children)
- if(H5AC_mark_entry_serialized(pentry) < 0)
+ if (0 == pentry->nunser_children)
+ if (H5AC_mark_entry_serialized(pentry) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry serialized")
break;
default:
#ifdef NDEBUG
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache")
-#else /* NDEBUG */
+#else /* NDEBUG */
HDassert(0 && "Unknown action?!?");
#endif /* NDEBUG */
- } /* end switch */
+ } /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC__proxy_entry_notify() */
-
/*-------------------------------------------------------------------------
* Function: H5AC__proxy_entry_free_icr
*
@@ -645,16 +630,15 @@ done:
static herr_t
H5AC__proxy_entry_free_icr(void *_thing)
{
- H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5AC_proxy_entry_t *pentry = (H5AC_proxy_entry_t *)_thing;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
/* Destroy the proxy entry */
- if(H5AC_proxy_entry_dest(pentry) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to destroy proxy entry")
+ if (H5AC_proxy_entry_dest(pentry) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to destroy proxy entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC__proxy_entry_free_icr() */
-