diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-02 21:17:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-02 21:17:26 (GMT) |
commit | b941208aa1dab642491d9b856e8e1d4912273ffc (patch) | |
tree | e74c72bb0c8be7b0106801692df3fc5a76ebf157 /src/H5EA.c | |
parent | bae373c32236ad99425154f5fcec4cb185e583d0 (diff) | |
download | hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.zip hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.tar.gz hdf5-b941208aa1dab642491d9b856e8e1d4912273ffc.tar.bz2 |
[svn-r16998] Description:
Bring r16982:16997 from trunk into revise_chunks branch.
Tested on:
Mac OS X/32 10.5.7 (amazon)
h5committest not needed on this branch
Diffstat (limited to 'src/H5EA.c')
-rw-r--r-- | src/H5EA.c | 100 |
1 files changed, 93 insertions, 7 deletions
@@ -781,8 +781,94 @@ END_FUNC(PRIV) /* end H5EA_get() */ /*------------------------------------------------------------------------- * Function: H5EA_depend * - * Purpose: Create a flush dependency on the array metadata that contains - * the element for an array index. + * Purpose: Make a child flush dependency between the extensible array's + * header and another piece of metadata in the file. + * + * Return: SUCCEED/FAIL + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 27 2009 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(PRIV, ERR, +herr_t, SUCCEED, FAIL, +H5EA_depend(H5AC_info_t *parent_entry, H5EA_t *ea)) + + /* Local variables */ + H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */ + +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ + + /* + * Check arguments. + */ + HDassert(ea); + HDassert(hdr); + + /* Set the shared array header's file context for this operation */ + hdr->f = ea->f; + + /* Set up flush dependency between child_entry and metadata array 'thing' */ + if(H5EA__create_flush_depend(hdr, parent_entry, (H5AC_info_t *)hdr) < 0) + H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency on file metadata") + +CATCH + +END_FUNC(PRIV) /* end H5EA_depend() */ + + +/*------------------------------------------------------------------------- + * Function: H5EA_undepend + * + * Purpose: Remove a child flush dependency between the extensible array's + * header and another piece of metadata in the file. + * + * Return: SUCCEED/FAIL + * + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * May 27 2009 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(PRIV, ERR, +herr_t, SUCCEED, FAIL, +H5EA_undepend(H5AC_info_t *parent_entry, H5EA_t *ea)) + + /* Local variables */ + H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */ + +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ + + /* + * Check arguments. + */ + HDassert(ea); + HDassert(hdr); + + /* Set the shared array header's file context for this operation */ + hdr->f = ea->f; + + /* Remove flush dependency between child_entry and metadata array 'thing' */ + if(H5EA__destroy_flush_depend(hdr, parent_entry, (H5AC_info_t *)hdr) < 0) + H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency on file metadata") + +CATCH + +END_FUNC(PRIV) /* end H5EA_undepend() */ + + +/*------------------------------------------------------------------------- + * Function: H5EA_support + * + * Purpose: Create a child flush dependency on the array metadata that + * contains the element for an array index. * * Return: SUCCEED/FAIL * @@ -794,7 +880,7 @@ END_FUNC(PRIV) /* end H5EA_get() */ */ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, -H5EA_depend(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry)) +H5EA_support(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry)) /* Local variables */ H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */ @@ -835,11 +921,11 @@ CATCH if(thing && (thing_unprot_func)(thing, dxpl_id, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array metadata") -END_FUNC(PRIV) /* end H5EA_depend() */ +END_FUNC(PRIV) /* end H5EA_support() */ /*------------------------------------------------------------------------- - * Function: H5EA_undepend + * Function: H5EA_unsupport * * Purpose: Remove a flush dependency on the array metadata that contains * the element for an array index. @@ -854,7 +940,7 @@ END_FUNC(PRIV) /* end H5EA_depend() */ */ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, -H5EA_undepend(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry)) +H5EA_unsupport(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, H5AC_info_t *child_entry)) /* Local variables */ H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */ @@ -895,7 +981,7 @@ CATCH if(thing && (thing_unprot_func)(thing, dxpl_id, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array metadata") -END_FUNC(PRIV) /* end H5EA_undepend() */ +END_FUNC(PRIV) /* end H5EA_unsupport() */ /*------------------------------------------------------------------------- |