diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-28 18:17:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-28 18:17:12 (GMT) |
commit | ca912c389e4e641cfbae6facced950ad05578d65 (patch) | |
tree | 6bd8604f6a587ee07013ad40daa3c0c7f4b31c26 /src/H5I.c | |
parent | 893cf5899c2b724aa438b66a275967b1f5ad0342 (diff) | |
download | hdf5-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/H5I.c')
-rw-r--r-- | src/H5I.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -82,7 +82,8 @@ static herr_t H5I_init_interface(void) { herr_t ret_value = SUCCEED; - FUNC_ENTER(H5I_init_interface, FAIL); + + FUNC_ENTER_NOINIT(H5I_init_interface); /* * Make certain the ID types don't overflow the number of bits allocated @@ -119,6 +120,8 @@ H5I_term_interface(void) H5I_type_t grp; int n=0; + FUNC_ENTER_NOINIT(H5I_term_interface); + if (interface_initialize_g) { /* How many groups are still being used? */ for (grp=(H5I_type_t)0; grp<H5I_NGROUPS; H5_INC_ENUM(H5I_type_t,grp)) { @@ -138,7 +141,7 @@ H5I_term_interface(void) /* Mark interface closed */ interface_initialize_g = 0; } - return n; + FUNC_LEAVE(n); } @@ -1014,7 +1017,7 @@ H5I_find_id(hid_t id) int i; #endif - FUNC_ENTER(H5I_find_id, NULL); + FUNC_ENTER_NOINIT(H5I_find_id); /* Check arguments */ grp = H5I_GROUP(id); |