summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
commita07c8f924703bdf3d1654b59cabf847f5d0f2683 (patch)
tree976dad3d894cfab9b88972a9e85d6bdfcf248f0d /src/H5private.h
parentbdb6e538ac8c4eae6413b2a7583289644dc9c90f (diff)
downloadhdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.zip
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.gz
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.bz2
[svn-r22287] Description:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 37480cb..76d8a05 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1917,6 +1917,30 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
H5_PUSH_FUNC \
{
+/* Use this macro for all "normal" staticly-scoped functions */
+#define FUNC_ENTER_STATIC { \
+ FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
+ {
+
+/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */
+#define FUNC_ENTER_STATIC_NOERR { \
+ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
+ {
+
+/* Use the following macro as replacement for the FUNC_ENTER_STATIC
+ * macro when the function needs to set up a metadata tag. */
+#define FUNC_ENTER_STATIC_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)); \
@@ -2160,11 +2184,11 @@ extern hbool_t H5_api_entered_g; /* Has library already been entered through
{{{
/* Macros for substituting the package name */
-#define FUNC_ENTER_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
-#define FUNC_ENTER_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
-#define FUNC_ENTER_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENT_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENT_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
+#define FUNC_ENT_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENT_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENT_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
/* Macros for substituting a function prefix */
#define FUNC_PREFIX_STATIC static
@@ -2190,7 +2214,7 @@ func \
{ \
ret_typ ret_value = ret_init; \
H5_GLUE(FUNC_ERR_VAR_, use_err)(ret_typ, err) \
- H5_GLUE(FUNC_ENTER_, scope)
+ H5_GLUE(FUNC_ENT_, scope)
/* Macros for label when a function initialization can fail */
#define H5_PRIV_YES_FUNC_INIT_FAILED func_init_failed: