diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-02-10 02:16:52 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-02-10 02:16:52 (GMT) |
commit | 3d9e0b86acb27b4aeb21371407b145c692dfd606 (patch) | |
tree | c7fa93f746a80557709affe90fc5fd21d2cd7d2b /src/H5private.h | |
parent | eca8a50511a2d5c99dde851190e688cd611113cd (diff) | |
download | hdf5-3d9e0b86acb27b4aeb21371407b145c692dfd606.zip hdf5-3d9e0b86acb27b4aeb21371407b145c692dfd606.tar.gz hdf5-3d9e0b86acb27b4aeb21371407b145c692dfd606.tar.bz2 |
[svn-r21923] Description:
Add FUNC_ENTER macros for package-private routines and begin process of
switching package routines to use them. All H5G routines are currently
finished.
Tested on:
Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index 539b39d..e01edd2 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1891,6 +1891,30 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); FUNC_ENTER_NOAPI_INIT(err) \ { +/* Use this macro for all "normal" package-level functions */ +#define FUNC_ENTER_PACKAGE { \ + FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for package-level functions which propgate errors, but don't issue them */ +#define FUNC_ENTER_PACKAGE_NOERR { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ + H5_PUSH_FUNC \ + { + +/* Use the following macro as replacement for the FUNC_ENTER_PACKAGE + * macro when the function needs to set up a metadata tag. */ +#define FUNC_ENTER_PACKAGE_TAG(dxpl_id, tag, err) { \ + haddr_t prev_tag = HADDR_UNDEF; \ + hid_t tag_dxpl_id = dxpl_id; \ + \ + FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + if(H5AC_tag(tag_dxpl_id, tag, &prev_tag) < 0) \ + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \ + H5_PUSH_FUNC \ + { + /* Use this macro for all non-API functions, which propagate errors, but don't issue them */ #define FUNC_ENTER_NOAPI_NOERR { \ FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \ |