summaryrefslogtreecommitdiffstats
path: root/src/H5SMcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-06 19:53:37 (GMT)
commit9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56 (patch)
tree272a27a01c186fc139362893df0a5d81602b9e0b /src/H5SMcache.c
parent0f810834381a67595d8b61383184259e537e996c (diff)
downloadhdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.zip
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.gz
hdf5-9d9ce9fbd1c8e98225f2fb08db56e8ebc1e9ec56.tar.bz2
[svn-r18520] Description:
Bring r18519 from metadata journaling "merging" branch to trunk: Converge metadata_journaling branch and trunk: separate destroy routines for data structures from cache callbacks. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5SMcache.c')
-rw-r--r--src/H5SMcache.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 070b00e..428cd38 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -233,7 +233,8 @@ done:
if(wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
if(!ret_value && table)
- (void)H5SM_table_dest(f, table);
+ if(H5SM_table_free(table) < 0)
+ HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM_table_load() */
@@ -366,17 +367,20 @@ done:
static herr_t
H5SM_table_dest(H5F_t UNUSED *f, H5SM_master_table_t* table)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_table_dest)
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5SM_table_dest)
/* Sanity check */
HDassert(table);
HDassert(table->indexes);
- H5FL_ARR_FREE(H5SM_index_header_t, table->indexes);
+ /* Destroy Shared Object Header Message table */
+ if(H5SM_table_free(table) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message table")
- (void)H5FL_FREE(H5SM_master_table_t, table);
-
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM_table_dest() */
@@ -681,9 +685,9 @@ H5SM_list_dest(H5F_t *f, H5SM_list_t* list)
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "unable to free shared message list")
} /* end if */
- /* Release resources */
- H5FL_ARR_FREE(H5SM_sohm_t, list->messages);
- (void)H5FL_FREE(H5SM_list_t, list);
+ /* Destroy Shared Object Header Message list */
+ if(H5SM_list_free(list) < 0)
+ HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list")
done:
FUNC_LEAVE_NOAPI(ret_value)