diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2012-09-18 21:10:36 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2012-09-18 21:10:36 (GMT) |
commit | 3427f6b172a675d7fa25c11aa3b7ec6b284e9534 (patch) | |
tree | c20003d1dfae5c1fbef57d4cbc66e1ae3008ad5f /src/H5FA.c | |
parent | 495b8de00214c9f99d6f10fd91de0feef55cefa8 (diff) | |
download | hdf5-3427f6b172a675d7fa25c11aa3b7ec6b284e9534.zip hdf5-3427f6b172a675d7fa25c11aa3b7ec6b284e9534.tar.gz hdf5-3427f6b172a675d7fa25c11aa3b7ec6b284e9534.tar.bz2 |
[svn-r22784] Purpose:
Add flush dependencies to the fixed array code.
Description:
Added basic flush dependency wiring to the fixed array code. Does not
include the test code, which will be added soon.
NOTE: The Makefile.in change in test/ is not due to any changes made
here. It appears to be from a missing bin/reconfigure in a prior
checkin.
Tested:
jam (there is an existing flush/refresh test error)
Diffstat (limited to 'src/H5FA.c')
-rw-r--r-- | src/H5FA.c | 85 |
1 files changed, 85 insertions, 0 deletions
@@ -738,3 +738,88 @@ CATCH END_FUNC(PRIV) /* end H5FA_iterate() */ + +/*------------------------------------------------------------------------- + * Function: H5FA_depend + * + * Purpose: Make a child flush dependency between the fixed array's + * header and another piece of metadata in the file. + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * derobins@hdfgroup.org + * Fall 2012 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(PRIV, ERR, +herr_t, SUCCEED, FAIL, +H5FA_depend(H5AC_info_t *parent_entry, H5FA_t *fa)) + + /* Local variables */ + H5FA_hdr_t *hdr = fa->hdr; /* Header for FA */ + +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ + + /* + * Check arguments. + */ + HDassert(fa); + HDassert(hdr); + + /* Set the shared array header's file context for this operation */ + hdr->f = fa->f; + + /* Set up flush dependency between parent entry and extensible array header */ + if(H5FA__create_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0) + H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency on file metadata") + +CATCH + +END_FUNC(PRIV) /* end H5FA_depend() */ + + +/*------------------------------------------------------------------------- + * Function: H5FA_undepend + * + * Purpose: Remove a child flush dependency between the fixed array's + * header and another piece of metadata in the file. + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * derobins@hdfgroup.org + * Fall 2012 + * + *------------------------------------------------------------------------- + */ +BEGIN_FUNC(PRIV, ERR, +herr_t, SUCCEED, FAIL, +H5FA_undepend(H5AC_info_t *parent_entry, H5FA_t *fa)) + + /* Local variables */ + H5FA_hdr_t *hdr = fa->hdr; /* Header for FA */ + +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ + + /* + * Check arguments. + */ + HDassert(fa); + HDassert(hdr); + + /* Set the shared array header's file context for this operation */ + hdr->f = fa->f; + + /* Remove flush dependency between parent entry and extensible array header */ + if(H5FA__destroy_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0) + H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency on file metadata") + +CATCH + +END_FUNC(PRIV) /* end H5FA_undepend() */ |