summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/H5I.c b/src/H5I.c
index dfceb41..fa79b72 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -65,7 +65,7 @@ static char RcsId[] = "@(#)$Revision$";
/* Interface initialialization? */
#define PABLO_MASK H5I_mask
-static hbool_t interface_initialize_g = FALSE;
+static intn interface_initialize_g = 0;
#define INTERFACE_INIT H5I_init_interface
static herr_t H5I_init_interface(void);
@@ -161,9 +161,6 @@ H5I_init_interface(void)
*/
assert(H5I_MAXID<=(1<<GROUP_BITS));
- /* Registers the cleanup routine with the exit chain */
- ret_value = H5_add_exit(&H5I_term_interface);
-
FUNC_LEAVE(ret_value);
}
@@ -920,28 +917,28 @@ H5I_release_id_node(H5I_id_info_t *id)
REVISION LOG
--------------------------------------------------------------------------*/
void
-H5I_term_interface(void)
+H5I_term_interface(intn status)
{
- H5I_id_info_t *curr;
- intn i;
+ H5I_id_info_t *curr;
+ intn i;
- /* Release the free-list if it exists */
- if (id_free_list != NULL) {
- while (id_free_list != NULL) {
+ if (interface_initialize_g>0) {
+ /* Release the free-list */
+ while (id_free_list) {
curr = id_free_list;
id_free_list = id_free_list->next;
HDfree(curr);
}
- }
- /* Release all groups */
- for (i = 0; i < (intn) H5I_MAXID; i++) {
- if (id_group_list[i] != NULL) {
- HDfree(id_group_list[i]);
- id_group_list[i] = NULL;
+ /* Release all groups */
+ for (i = 0; i < (intn) H5I_MAXID; i++) {
+ if (id_group_list[i] != NULL) {
+ HDfree(id_group_list[i]);
+ id_group_list[i] = NULL;
+ }
}
}
-
- /* Indicate interface closed */
- interface_initialize_g = FALSE;
+
+ /* Indicate interface status */
+ interface_initialize_g = status;
}