mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-24 17:51:25 +08:00
[svn-r27083] Description:
Clean up H5SM interface, to align w/v3 metadata cache changes Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel Linux/32 2.6.* (jam) w/serial & parallel
This commit is contained in:
parent
197fa23dae
commit
20aa560825
@ -13,6 +13,17 @@
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5SMcache.c
|
||||
* Nov 13 2006
|
||||
* James Laird <jlaird@hdfgroup.org>
|
||||
*
|
||||
* Purpose: Implement shared message metadata cache methods.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* Module Setup */
|
||||
/****************/
|
||||
@ -68,6 +79,7 @@ static herr_t H5SM_list_size(const H5F_t *f, const H5SM_list_t UNUSED *list, siz
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
/*********************/
|
||||
|
||||
/* H5SM inherits cache-like properties from H5AC */
|
||||
const H5AC_class_t H5AC_SOHM_TABLE[1] = {{
|
||||
H5AC_SOHM_TABLE_ID,
|
||||
@ -363,7 +375,7 @@ H5SM_table_dest(H5F_t UNUSED *f, H5SM_master_table_t* table)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/* Sanity check */
|
||||
/* Check arguments */
|
||||
HDassert(table);
|
||||
HDassert(table->indexes);
|
||||
|
||||
@ -429,7 +441,7 @@ H5SM_table_size(const H5F_t UNUSED *f, const H5SM_master_table_t *table, size_t
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
/* check arguments */
|
||||
/* Check arguments */
|
||||
HDassert(f);
|
||||
HDassert(table);
|
||||
HDassert(size_ptr);
|
||||
@ -470,7 +482,7 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/* Sanity check */
|
||||
/* Check arguments */
|
||||
HDassert(udata->header);
|
||||
|
||||
/* Allocate space for the SOHM list data structure */
|
||||
@ -479,9 +491,8 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
|
||||
HDmemset(&list->cache_info, 0, sizeof(H5AC_info_t));
|
||||
|
||||
/* Allocate list in memory as an array*/
|
||||
if((list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)) == NULL)
|
||||
if(NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)))
|
||||
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list")
|
||||
|
||||
list->header = udata->header;
|
||||
|
||||
/* Wrap the local buffer for serialized list index info */
|
||||
@ -701,9 +712,7 @@ H5SM_list_clear(H5F_t *f, H5SM_list_t *list, hbool_t destroy)
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/*
|
||||
* Check arguments.
|
||||
*/
|
||||
/* Check arguments */
|
||||
HDassert(list);
|
||||
|
||||
/* Reset the dirty flag. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user