summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-28 18:17:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-28 18:17:12 (GMT)
commitca912c389e4e641cfbae6facced950ad05578d65 (patch)
tree6bd8604f6a587ee07013ad40daa3c0c7f4b31c26 /src/H5T.c
parent893cf5899c2b724aa438b66a275967b1f5ad0342 (diff)
downloadhdf5-ca912c389e4e641cfbae6facced950ad05578d65.zip
hdf5-ca912c389e4e641cfbae6facced950ad05578d65.tar.gz
hdf5-ca912c389e4e641cfbae6facced950ad05578d65.tar.bz2
[svn-r5467] Purpose:
Code cleanup. Description: Took Robb's recent ideas for improving the FUNC_ENTER/FUNC_LEAVE macros equivalents in the SAF library and adapted them to our library. I added an additional macro which is equivalent to FUNC_ENTER: FUNC_ENTER_NOINIT - Has the API tracing code, etc. from FUNC_ENTER but none of the library or interface initialization code. This is to be used _only_ for static functions and those which explicitly cannot have the library or interface initialization code enabled (like the API termination routines, etc.). This allowed many more of the functions in the library [but not all yet :-(] to be wrapped with FUNC_ENTER[_NOINIT]/FUNC_LEAVE pairs. It also reduced the size of the library and executables (by cutting out a bunch of code which was never executed), I'll e-mail the exact results when I've finished editing it. Platforms tested: IRIX64 6.5 (modi4)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 3c06b78..421ec44 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -279,7 +279,7 @@ H5T_init_interface(void)
herr_t status;
herr_t ret_value=SUCCEED;
- FUNC_ENTER(H5T_init_interface, FAIL);
+ FUNC_ENTER_NOINIT(H5T_init_interface);
/* Initialize the atom group for the file IDs */
if (H5I_init_group(H5I_DATATYPE, H5I_DATATYPEID_HASHSIZE, H5T_RESERVED_ATOMS, (H5I_free_t)H5T_close)<0)
@@ -1930,11 +1930,13 @@ H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void UNUSED *key)
{
H5T_t *dt = (H5T_t *)_dt;
- FUNC_ENTER (H5T_unlock_cb, FAIL);
+ FUNC_ENTER_NOINIT(H5T_unlock_cb);
+
assert (dt);
if (H5T_STATE_IMMUTABLE==dt->state) {
dt->state = H5T_STATE_RDONLY;
}
+
FUNC_LEAVE (0);
}
@@ -1965,6 +1967,8 @@ H5T_term_interface(void)
int i, nprint=0, n=0;
H5T_path_t *path = NULL;
+ FUNC_ENTER_NOINIT(H5T_term_interface);
+
if (interface_initialize_g) {
/* Unregister all conversion functions */
for (i=0; i<H5T_g.npaths; i++) {
@@ -2101,7 +2105,7 @@ H5T_term_interface(void)
interface_initialize_g = 0;
n = 1; /*H5I*/
}
- return n;
+ FUNC_LEAVE(n);
}
@@ -4709,7 +4713,7 @@ H5T_vlen_create(H5T_t *base)
H5T_t *dt = NULL; /*new VL data type */
H5T_t *ret_value = NULL; /*return value */
- FUNC_ENTER(H5T_vlen_create, NULL);
+ FUNC_ENTER_NOINIT(H5T_vlen_create);
/* Check args */
assert(base);
@@ -4901,7 +4905,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
int i; /*counter */
herr_t ret_value=SUCCEED; /*return value */
- FUNC_ENTER(H5T_register, FAIL);
+ FUNC_ENTER_NOINIT(H5T_register);
/* Check args */
assert(src);
@@ -8105,7 +8109,7 @@ H5T_print_stats(H5T_path_t * UNUSED path, int * UNUSED nprint/*in,out*/)
char bandwidth[32];
#endif
- FUNC_ENTER(H5T_print_stats, FAIL);
+ FUNC_ENTER_NOINIT(H5T_print_stats);
#ifdef H5T_DEBUG
if (H5DEBUG(T) && path->stats.ncalls>0) {