summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-05 02:07:08 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-05 02:07:08 (GMT)
commite251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1 (patch)
tree99ce978bac2ceec3646a60753b437d874a92de29 /src/H5C.c
parent6a3cb617d3aa57f439065118fbc68afcb1465a54 (diff)
downloadhdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.zip
hdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.tar.gz
hdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.tar.bz2
[svn-r13] ./src/H5.c
Added an `_g' to the end of library_initialize, thread_initialize, and interface_initialize to abide by the naming convention. Removed setting of these variables from the various initialization functions since it happens in the FUNC_ENTER() macro now. Defined PABLO_MASK. Removed `CONSTR(FUNC,"function_name")' everywhere since it's handled by the various FUNC_ENTER macros. Fixed calls to FUNC_ENTER(), FUNC_LEAVE(), and HRETURN_ERROR() so they don't need so many arguments. Changed PABLO_TRACE_ON() to FUNC_ENTER() since there is no longer any danger of infinite recursion. H5_term_library() now returns SUCCEED/FAIL and uses FUNC_ENTER/FUNC_EXIT macros. ./src/H5A.c Changes similar to H5.c. Most (all?) of the functions called PABLO_TRACE_ON() and the package doesn't have an interface initializer that I can see, so the second argument to FUNC_ENTER() is always NULL. H5A_release_atom_node() returns SUCCEED/FAIL. ./src/H5AC.c Added error handling. Arguments for internal functions are checked with assert(). ./src/H5C.c Changes similar to H5.c Fixed the FUNC variable in H5C_get_default_atom() since it was initialized to the wrong name. ./src/H5D.c Changes similar to H5.c ./src/H5E.c Changes similar to H5.c Changed the pablo mask from H5_mask to H5E_mask in H5E_init_interface(). H5Eclear(), H5E_store(), and H5Epush() return SUCCEED/FAIL. Changed PABLO_TRACE_OFF() calls to FUNC_LEAVE() calls in the same functions. ./src/H5Eprivate.h ./src/H5Eproto.h Added additional error symbols for the H5AC package. Changed prototypes for H5Eclear() and H5Epush(). Changes to HRETURN_ERROR() and HGOTO_ERROR() to reduce the number of arguments. ./src/H5F.c Changes similr to H5.c Changed the pablo mask from H5_mask to H5F_mask for the FUNC_LEAVE() call of H5F_init_interface(). Added FUNC_ENTER() and FUNC_LEAVE() calls to some functions that didn't have them. ./src/H5M.c Changes similar to H5.c Fixed the FUNC variable in H5M_init_interface() since it was initialized to the wrong name. ./src/H5P.c Changes similar to H5.c ./src/H5T.c Changes similar to H5.c ./src/hdf5gen.c Changes to FUNC_ENTER() and FUNC_EXIT() to reduce the number of arguments. FUNC_ENTER() is now safe from infinite recursion since it updates the library_initialize_g, thread_initialize_g, or interface_initialize_g variables before calling the appropriate initialize function.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c57
1 files changed, 25 insertions, 32 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 847f3b5..501b873 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -38,10 +38,12 @@ static char RcsId[] = "@(#)$Revision$";
#include "H5private.h" /* Generic Functions */
#include "H5Cprivate.h" /* Template information */
+#define PABLO_MASK H5C_mask
+
/*--------------------- Locally scoped variables -----------------------------*/
/* Whether we've installed the library termination function yet for this interface */
-static intn interface_initialize = FALSE;
+static intn interface_initialize_g = FALSE;
/* Define the library's default file creation template (constants in hdf5lims.h) */
const file_create_temp_t default_file_create={
@@ -74,21 +76,14 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t H5C_init_interface(void)
{
-#ifdef LATER
- CONSTR(FUNC, "H5C_init_interface"); /* For HERROR */
-#endif /* LATER */
herr_t ret_value = SUCCEED;
- /* Don't use "FUNC_ENTER" macro, to avoid potential infinite recursion */
- PABLO_TRACE_ON(H5C_mask, ID_H5C_init_interface);
-
- /* Don't call this routine again... */
- interface_initialize = TRUE;
+ FUNC_ENTER (H5C_init_interface, NULL, FAIL);
/* Initialize the atom group for the file IDs */
ret_value=H5Ainit_group(H5_TEMPLATE,HDF5_TEMPID_HASHSIZE,0);
- FUNC_LEAVE(H5C_mask, ID_H5C_init_interface, ret_value);
+ FUNC_LEAVE(ret_value);
} /* H5C_init_interface */
/*--------------------------------------------------------------------------
@@ -104,14 +99,18 @@ static herr_t H5C_init_interface(void)
success, FAIL on failure
DESCRIPTION
This is function retrieves atoms for the default templates for the
- different types of HDF5 templates.
+ different types of HDF5 templates.
+
+ MODIFICATIONS
+ Robb Matzke, 4 Aug 1997
+ The `FUNC' auto variable was changed from `H5C_create' to
+ `H5C_get_default_atom'.
--------------------------------------------------------------------------*/
hatom_t H5C_get_default_atom(hobjtype_t type)
{
- CONSTR(FUNC, "H5C_create"); /* for HERROR */
hatom_t ret_value = FAIL;
- FUNC_ENTER(H5C_mask, ID_H5C_get_default_atom, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5C_get_default_atom, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -139,7 +138,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5C_get_default_atom, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5C_get_default_atom() */
/*--------------------------------------------------------------------------
@@ -159,11 +158,10 @@ done:
--------------------------------------------------------------------------*/
herr_t H5C_init(hatom_t dst_atm, const file_create_temp_t *src)
{
- CONSTR(FUNC, "H5C_init"); /* for HERROR */
file_create_temp_t *dst; /* destination template */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER(H5C_mask, ID_H5C_init, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5C_init, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -185,7 +183,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5C_init, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5C_init() */
/*--------------------------------------------------------------------------
@@ -206,10 +204,9 @@ done:
--------------------------------------------------------------------------*/
hatom_t H5C_create(hatom_t owner_id, hobjtype_t type, const char *name)
{
- CONSTR(FUNC, "H5C_create"); /* for HERROR */
hatom_t ret_value = FAIL; /* atom for template object to return */
- FUNC_ENTER(H5C_mask, ID_H5C_create, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5C_create, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -239,7 +236,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5C_create, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5C_create() */
/*--------------------------------------------------------------------------
@@ -257,11 +254,10 @@ done:
--------------------------------------------------------------------------*/
herr_t H5C_release(hatom_t oid)
{
- CONSTR(FUNC, "H5C_release"); /* for HERROR */
file_create_temp_t *template; /* template to destroy */
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5C_mask, ID_H5C_release, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5C_release, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -279,7 +275,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5C_release, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5C_release() */
/*--------------------------------------------------------------------------
@@ -300,11 +296,10 @@ done:
--------------------------------------------------------------------------*/
herr_t H5Cgetparm(hatom_t tid, file_create_param_t parm, VOIDP buf)
{
- CONSTR(FUNC, "H5Cgetparm"); /* for HERROR */
file_create_temp_t *template; /* template to query */
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5C_mask, ID_H5Cgetparm, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5Cgetparm, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -365,7 +360,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5Cgetparm, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5Cgetparm() */
/*--------------------------------------------------------------------------
@@ -385,11 +380,10 @@ done:
--------------------------------------------------------------------------*/
herr_t H5Csetparm(hatom_t tid, file_create_param_t parm, const VOIDP buf)
{
- CONSTR(FUNC, "H5Csetparm"); /* for HERROR */
file_create_temp_t *template; /* template to query */
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5C_mask, ID_H5Csetparm, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5Csetparm, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -450,7 +444,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5Csetparm, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5Csetparm() */
/*--------------------------------------------------------------------------
@@ -469,11 +463,10 @@ done:
--------------------------------------------------------------------------*/
hatom_t H5C_copy(hatom_t tid)
{
- CONSTR(FUNC, "H5C_copy"); /* for HERROR */
file_create_temp_t *template, *new_template; /* template to query */
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5C_mask, ID_H5C_copy, H5C_init_interface, FAIL);
+ FUNC_ENTER(H5C_copy, H5C_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -501,6 +494,6 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5C_mask, ID_H5C_copy, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5C_copy() */