summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5FA.c138
-rw-r--r--src/H5FAcache.c34
-rw-r--r--src/H5FAdbg.c132
-rw-r--r--src/H5FAdblkpage.c62
-rw-r--r--src/H5FAdblock.c108
-rw-r--r--src/H5FAhdr.c106
-rw-r--r--src/H5FApkg.h110
-rw-r--r--src/H5FAprivate.h45
-rw-r--r--src/H5FAstat.c18
-rw-r--r--src/H5FAtest.c91
10 files changed, 417 insertions, 427 deletions
diff --git a/src/H5FA.c b/src/H5FA.c
index b0d13ec..1be3f2e 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -15,12 +15,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FA.c
- * April 2009
- * Vailin Choi <vchoi@hdfgroup.org>
+ * Created: H5FA.c
+ * April 2009
+ * Vailin Choi <vchoi@hdfgroup.org>
*
- * Purpose: Implements a Fixed Array for storing elements
- * of datasets with fixed dimensions
+ * Purpose: Implements a Fixed Array for storing elements
+ * of datasets with fixed dimensions.
*
*-------------------------------------------------------------------------
*/
@@ -96,19 +96,19 @@ const H5FA_class_t *const H5FA_client_class_g[] = {
H5FL_DEFINE_STATIC(H5FA_t);
/* Declare a PQ free list to manage the element */
-H5FL_BLK_DEFINE(native_elmt);
+H5FL_BLK_DEFINE(fa_native_elmt);
/*-------------------------------------------------------------------------
- * Function: H5FA_create
+ * Function: H5FA_create
*
- * Purpose: Creates a new fixed array (header) in the file.
+ * Purpose: Creates a new fixed array (header) in the file.
*
- * Return: Pointer to fixed array wrapper on success
+ * Return: Pointer to fixed array wrapper on success
* NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -137,24 +137,24 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Create fixed array header */
if(HADDR_UNDEF == (fa_addr = H5FA__hdr_create(f, dxpl_id, cparam, ctx_udata)))
- H5E_THROW(H5E_CANTINIT, "can't create fixed array header")
+ H5E_THROW(H5E_CANTINIT, "can't create fixed array header")
/* Allocate fixed array wrapper */
if(NULL == (fa = H5FL_MALLOC(H5FA_t)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array info")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array info")
/* Lock the array header into memory */
if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Point fixed array wrapper at header and bump it's ref count */
fa->hdr = hdr;
if(H5FA__hdr_incr(fa->hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
/* Increment # of files using this array header */
if(H5FA__hdr_fuse_incr(fa->hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment file reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment file reference count on shared array header")
/* Set file pointer for this array open context */
fa->f = f;
@@ -165,7 +165,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
CATCH
if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
if(!ret_value)
if(fa && H5FA_close(fa, dxpl_id) < 0)
H5E_THROW(H5E_CLOSEERROR, "unable to close fixed array")
@@ -174,14 +174,14 @@ END_FUNC(PRIV) /* end H5FA_create() */
/*-------------------------------------------------------------------------
- * Function: H5FA_open
+ * Function: H5FA_open
*
- * Purpose: Opens an existing fixed array in the file.
+ * Purpose: Opens an existing fixed array in the file.
*
- * Return: Pointer to array wrapper on success
+ * Return: Pointer to array wrapper on success
* NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -242,13 +242,13 @@ END_FUNC(PRIV) /* end H5FA_open() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get_nelmts
+ * Function: H5FA_get_nelmts
*
- * Purpose: Query the current number of elements in array
+ * Purpose: Query the current number of elements in array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -276,13 +276,13 @@ END_FUNC(PRIV) /* end H5FA_get_nelmts() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get_addr
+ * Function: H5FA_get_addr
*
- * Purpose: Query the address of the array
+ * Purpose: Query the address of the array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -311,13 +311,13 @@ END_FUNC(PRIV) /* end H5FA_get_addr() */
/*-------------------------------------------------------------------------
- * Function: H5FA_set
+ * Function: H5FA_set
*
- * Purpose: Set an element of a fixed array
+ * Purpose: Set an element of a fixed array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -363,13 +363,13 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx
/* Protect data block */
if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC__NO_FLAGS_SET)))
- H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr)
+ H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr)
/* Check for paging data block */
if(!dblock->npages) {
- /* Set element in data block */
- HDmemcpy(((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), elmt, hdr->cparam.cls->nat_elmt_size);
- dblock_cache_flags |= H5AC__DIRTIED_FLAG;
+ /* Set element in data block */
+ HDmemcpy(((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), elmt, hdr->cparam.cls->nat_elmt_size);
+ dblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
else { /* paging */
size_t page_idx; /* Index of page within data block */
@@ -382,20 +382,20 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx
elmt_idx = (size_t)(idx % dblock->dblk_page_nelmts);
/* Get the address of the data block page */
- dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock) +
+ dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock) +
((hsize_t)page_idx * dblock->dblk_page_size);
/* Check for using last page, to set the number of elements on the page */
- if((page_idx + 1) == dblock->npages)
- dblk_page_nelmts = dblock->last_page_nelmts;
- else
- dblk_page_nelmts = dblock->dblk_page_nelmts;
+ if((page_idx + 1) == dblock->npages)
+ dblk_page_nelmts = dblock->last_page_nelmts;
+ else
+ dblk_page_nelmts = dblock->dblk_page_nelmts;
/* Check if the page has been created yet */
if(!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
- /* Create the data block page */
- if(H5FA__dblk_page_create(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts) < 0)
- H5E_THROW(H5E_CANTCREATE, "unable to create data block page")
+ /* Create the data block page */
+ if(H5FA__dblk_page_create(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts) < 0)
+ H5E_THROW(H5E_CANTCREATE, "unable to create data block page")
/* Mark data block page as initialized in data block */
H5VM_bit_set(dblock->dblk_page_init, page_idx, TRUE);
@@ -407,8 +407,8 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr)
/* Set the element in the data block page */
- HDmemcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
- dblk_page_cache_flags |= H5AC__DIRTIED_FLAG;
+ HDmemcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
+ dblk_page_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end else */
CATCH
@@ -427,13 +427,13 @@ END_FUNC(PRIV) /* end H5FA_set() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get
+ * Function: H5FA_get
*
- * Purpose: Get an element of a fixed array
+ * Purpose: Get an element of a fixed array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -529,13 +529,13 @@ END_FUNC(PRIV) /* end H5FA_get() */
/*-------------------------------------------------------------------------
- * Function: H5FA_close
+ * Function: H5FA_close
*
- * Purpose: Close a fixed array
+ * Purpose: Close a fixed array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -630,13 +630,13 @@ END_FUNC(PRIV) /* end H5FA_close() */
/*-------------------------------------------------------------------------
- * Function: H5FA_delete
+ * Function: H5FA_delete
*
- * Purpose: Delete a fixed array
+ * Purpose: Delete a fixed array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -684,16 +684,16 @@ END_FUNC(PRIV) /* end H5FA_delete() */
/*-------------------------------------------------------------------------
- * Function: H5FA_iterate
+ * Function: H5FA_iterate
*
- * Purpose: Iterate over the elements of a fixed array
+ * Purpose: Iterate over the elements of a fixed array
*
- * Note: This is not very efficient, we should be iterating directly
- * over the fixed array's direct block [pages].
+ * Note: This is not very efficient, we should be iterating directly
+ * over the fixed array's direct block [pages].
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -703,8 +703,8 @@ herr_t, SUCCEED, FAIL,
H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata))
/* Local variables */
- uint8_t *elmt = NULL;
- hsize_t u;
+ uint8_t *elmt = NULL;
+ hsize_t u;
/*
* Check arguments.
@@ -714,8 +714,8 @@ H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata))
HDassert(udata);
/* Allocate space for a native array element */
- if(NULL == (elmt = H5FL_BLK_MALLOC(native_elmt, fa->hdr->cparam.cls->nat_elmt_size)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array element")
+ if(NULL == (elmt = H5FL_BLK_MALLOC(fa_native_elmt, fa->hdr->cparam.cls->nat_elmt_size)))
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array element")
/* Iterate over all elements in array */
for(u = 0; u < fa->hdr->stats.nelmts; u++) {
@@ -735,7 +735,7 @@ H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata))
CATCH
if(elmt)
- elmt = H5FL_BLK_FREE(native_elmt, elmt);
+ elmt = H5FL_BLK_FREE(fa_native_elmt, elmt);
END_FUNC(PRIV) /* end H5FA_iterate() */
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index f3396be..1d4afa4 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -15,11 +15,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAcache.c
- * Jul 2 2009
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5FAcache.c
+ * Jul 2 2009
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Implement fixed array metadata cache methods.
+ * Purpose: Implement fixed array metadata cache methods.
*
*-------------------------------------------------------------------------
*/
@@ -205,7 +205,7 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_get_load_size() */
*
* Purpose: Loads a data structure from the disk.
*
- * Return: Success: Pointer to a new B-tree.
+ * Return: Success: Pointer to a new Fixed array
* Failure: NULL
*
* Programmer: Quincey Koziol
@@ -234,24 +234,24 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t len,
/* Allocate space for the fixed array data structure */
if(NULL == (hdr = H5FA__hdr_alloc(udata->f)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array shared header")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array shared header")
/* Set the fixed array header's address */
hdr->addr = udata->addr;
/* Magic number */
if(HDmemcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- H5E_THROW(H5E_BADVALUE, "wrong fixed array header signature")
+ H5E_THROW(H5E_BADVALUE, "wrong fixed array header signature")
image += H5_SIZEOF_MAGIC;
/* Version */
if(*image++ != H5FA_HDR_VERSION)
- H5E_THROW(H5E_VERSION, "wrong fixed array header version")
+ H5E_THROW(H5E_VERSION, "wrong fixed array header version")
/* Fixed array class */
id = (H5FA_cls_id_t)*image++;
if(id >= H5FA_NUM_CLS_ID)
- H5E_THROW(H5E_BADTYPE, "incorrect fixed array class")
+ H5E_THROW(H5E_BADTYPE, "incorrect fixed array class")
hdr->cparam.cls = H5FA_client_class_g[id];
/* General array creation/configuration information */
@@ -418,7 +418,7 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_serialize() */
* Purpose: Destroy/release an "in core representation" of a data
* structure
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
@@ -529,7 +529,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t len,
/* Allocate the fixed array data block */
if(NULL == (dblock = H5FA__dblock_alloc(udata->hdr)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
HDassert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock)))
|| (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock)));
@@ -539,21 +539,21 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t len,
/* Magic number */
if(HDmemcmp(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- H5E_THROW(H5E_BADVALUE, "wrong fixed array data block signature")
+ H5E_THROW(H5E_BADVALUE, "wrong fixed array data block signature")
image += H5_SIZEOF_MAGIC;
/* Version */
if(*image++ != H5FA_DBLOCK_VERSION)
- H5E_THROW(H5E_VERSION, "wrong fixed array data block version")
+ H5E_THROW(H5E_VERSION, "wrong fixed array data block version")
/* Fixed array type */
if(*image++ != (uint8_t)udata->hdr->cparam.cls->id)
- H5E_THROW(H5E_BADTYPE, "incorrect fixed array class")
+ H5E_THROW(H5E_BADTYPE, "incorrect fixed array class")
/* Address of header for array that owns this block (just for file integrity checks) */
H5F_addr_decode(udata->hdr->f, &image, &arr_addr);
if(H5F_addr_ne(arr_addr, udata->hdr->addr))
- H5E_THROW(H5E_BADVALUE, "wrong fixed array header address")
+ H5E_THROW(H5E_BADVALUE, "wrong fixed array header address")
/* Page initialization flags */
if(dblock->npages > 0) {
@@ -717,7 +717,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_serialize() */
* Purpose: Destroy/release an "in core representation" of a data
* structure
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
@@ -936,7 +936,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
*
* Purpose: Flushes a dirty object to disk.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c
index 2f8fda2..2dc51c5 100644
--- a/src/H5FAdbg.c
+++ b/src/H5FAdbg.c
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAdbg.c
+ * Created: H5FAdbg.c
*
- * Purpose: Dump debugging information about a fixed array.
+ * Purpose: Dump debugging information about a fixed array.
*
*-------------------------------------------------------------------------
*/
@@ -80,13 +80,13 @@
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_debug
+ * Function: H5FA__hdr_debug
*
- * Purpose: Prints debugging info about a fixed array header.
+ * Purpose: Prints debugging info about a fixed array header.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -97,8 +97,8 @@ H5FA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
int fwidth, const H5FA_class_t *cls, haddr_t obj_addr))
/* Local variables */
- H5FA_hdr_t *hdr = NULL; /* Shared fixed array header */
- void *dbg_ctx = NULL; /* Fixed array debugging context */
+ H5FA_hdr_t *hdr = NULL; /* Shared fixed array header */
+ void *dbg_ctx = NULL; /* Fixed array debugging context */
/* Check arguments */
HDassert(f);
@@ -113,58 +113,58 @@ H5FA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
if(cls->crt_dbg_ctx) {
/* Create debugging context */
if(NULL == (dbg_ctx = cls->crt_dbg_ctx(f, dxpl_id, obj_addr)))
- H5E_THROW(H5E_CANTGET, "unable to create fixed array debugging context")
+ H5E_THROW(H5E_CANTGET, "unable to create fixed array debugging context")
} /* end if */
/* Load the fixed array header */
if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Print opening message */
HDfprintf(stream, "%*sFixed Array Header...\n", indent, "");
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Header size:",
- hdr->size);
+ "Header size:",
+ hdr->size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Raw Element Size:",
- (unsigned)hdr->cparam.raw_elmt_size);
+ "Raw Element Size:",
+ (unsigned)hdr->cparam.raw_elmt_size);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Native Element Size (on this platform):",
- hdr->cparam.cls->nat_elmt_size);
+ "Native Element Size (on this platform):",
+ hdr->cparam.cls->nat_elmt_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Max. # of elements in data block page:",
- (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
+ "Max. # of elements in data block page:",
+ (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits));
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of elements in Fixed Array:", hdr->stats.nelmts);
+ "Number of elements in Fixed Array:", hdr->stats.nelmts);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Fixed Array Data Block Address:", hdr->dblk_addr);
+ "Fixed Array Data Block Address:", hdr->dblk_addr);
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
- H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
+ H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PKG) /* end H5FA__hdr_debug() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_debug
+ * Function: H5FA__dblock_debug
*
- * Purpose: Prints debugging info about a fixed array data block.
+ * Purpose: Prints debugging info about a fixed array data block.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -177,7 +177,7 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
/* Local variables */
H5FA_hdr_t *hdr = NULL; /* Shared fixed array header */
H5FA_dblock_t *dblock = NULL; /* Fixed array data block */
- void *dbg_ctx = NULL; /* Fixed array context */
+ void *dbg_ctx = NULL; /* Fixed array context */
size_t u; /* Local index variable */
/* Check arguments */
@@ -194,12 +194,12 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
if(cls->crt_dbg_ctx) {
/* Create debugging context */
if(NULL == (dbg_ctx = cls->crt_dbg_ctx(f, dxpl_id, obj_addr)))
- H5E_THROW(H5E_CANTGET, "unable to create fixed array debugging context")
+ H5E_THROW(H5E_CANTGET, "unable to create fixed array debugging context")
} /* end if */
/* Load the fixed array header */
if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
- H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
+ H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Protect data block */
if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, addr, H5AC__READ_ONLY_FLAG)))
@@ -210,26 +210,26 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
/* Print the values */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Array class ID:", hdr->cparam.cls->name);
+ "Array class ID:", hdr->cparam.cls->name);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of Data Block:", dblock->addr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data Block size:", dblock->size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of elements in Data Block:", hdr->cparam.nelmts);
+ "Number of elements in Data Block:", hdr->cparam.nelmts);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of pages in Data Block:", dblock->npages);
+ "Number of pages in Data Block:", dblock->npages);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
+ "Number of elements per Data Block page:", dblock->dblk_page_nelmts);
if(dblock->npages) { /* paging */
- size_t dblk_page_nelmts; /* # of elements in a data block page */
+ size_t dblk_page_nelmts; /* # of elements in a data block page */
haddr_t dblk_page_addr; /* Address of a data block page */
size_t page_idx; /* Page index within data block */
- HDfprintf(stream, "%*sPaging:\n", indent, "");
+ HDfprintf(stream, "%*sPaging:\n", indent, "");
- /* Iterate over the pages */
- dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock);
- dblk_page_nelmts = dblock->dblk_page_nelmts;
+ /* Iterate over the pages */
+ dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock);
+ dblk_page_nelmts = dblock->dblk_page_nelmts;
/* Read and print each page's elements in the data block */
for(page_idx = 0; page_idx < dblock->npages; page_idx++) {
@@ -237,51 +237,49 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
HDfprintf(stream, "%*s%-*s %Hu %s\n", indent, "", fwidth,
"Page %Zu:", page_idx, "empty");
- } /* end if */
+ } /* end if */
else { /* get the page */
H5FA_dblk_page_t *dblk_page; /* Pointer to a data block page */
- hsize_t nelmts_left; /* Remaining elements in the last data block page */
+ hsize_t nelmts_left; /* Remaining elements in the last data block page */
/* Check for last page */
- if(((page_idx + 1) == dblock->npages) && (nelmts_left = hdr->cparam.nelmts % dblock->dblk_page_nelmts))
- dblk_page_nelmts = (size_t)nelmts_left;
+ if(((page_idx + 1) == dblock->npages) && (nelmts_left = hdr->cparam.nelmts % dblock->dblk_page_nelmts))
+ dblk_page_nelmts = (size_t)nelmts_left;
if(NULL == (dblk_page = H5FA__dblk_page_protect(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts, H5AC__READ_ONLY_FLAG)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr)
- HDfprintf(stream, "%*sElements in page %Zu:\n", indent, "", page_idx);
- for(u = 0; u < dblk_page_nelmts; u++) {
- /* Call the class's 'debug' callback */
- if((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
- ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0)
- H5E_THROW(H5E_CANTGET, "can't get element for debugging")
- } /* end for */
- if(H5FA__dblk_page_unprotect(dblk_page, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array data block page")
-
- /* Advance to next page address */
- dblk_page_addr += dblock->dblk_page_size;
- } /* paging */
- } /* end for npages */
+ HDfprintf(stream, "%*sElements in page %Zu:\n", indent, "", page_idx);
+ for(u = 0; u < dblk_page_nelmts; u++) {
+ /* Call the class's 'debug' callback */
+ if((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0)
+ H5E_THROW(H5E_CANTGET, "can't get element for debugging")
+ } /* end for */
+ if(H5FA__dblk_page_unprotect(dblk_page, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array data block page")
+
+ /* Advance to next page address */
+ dblk_page_addr += dblock->dblk_page_size;
+ } /* paging */
+ } /* end for npages */
} /* end if */
else { /* not paging */
- /* Print the elements in the data block */
- HDfprintf(stream, "%*sElements:\n", indent, "");
- for(u = 0; u < hdr->cparam.nelmts; u++) {
- /* Call the class's 'debug' callback */
- if((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u,
- ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0)
- H5E_THROW(H5E_CANTGET, "can't get element for debugging")
- } /* end for */
+ /* Print the elements in the data block */
+ HDfprintf(stream, "%*sElements:\n", indent, "");
+ for(u = 0; u < hdr->cparam.nelmts; u++) {
+ /* Call the class's 'debug' callback */
+ if((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0)
+ H5E_THROW(H5E_CANTGET, "can't get element for debugging")
+ } /* end for */
} /* end else */
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
- H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
+ H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
if(dblock && H5FA__dblock_unprotect(dblock, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array data block")
if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PKG) /* end H5FA__dblock_debug() */
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index 00eb398..bba4439 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAdblkpage.c
+ * Created: H5FAdblkpage.c
*
- * Purpose: Data block page routines for fixed array.
+ * Purpose: Data block page routines for fixed array.
*
*-------------------------------------------------------------------------
*/
@@ -37,10 +37,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5FLprivate.h" /* Free Lists */
/****************/
@@ -86,13 +86,13 @@ H5FL_BLK_DEFINE(page_elmts);
/*-------------------------------------------------------------------------
- * Function: H5FA__dblk_page_alloc
+ * Function: H5FA__dblk_page_alloc
*
- * Purpose: Allocate fixed array data block page
+ * Purpose: Allocate fixed array data block page
*
- * Return: Non-NULL pointer to data block on success/NULL on failure
+ * Return: Non-NULL pointer to data block on success/NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -109,11 +109,11 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts))
/* Allocate memory for the data block */
if(NULL == (dblk_page = H5FL_CALLOC(H5FA_dblk_page_t)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block page")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block page")
/* Share common array information */
if(H5FA__hdr_incr(hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
dblk_page->hdr = hdr;
/* Set non-zero internal fields */
@@ -136,13 +136,13 @@ END_FUNC(PKG) /* end H5FA__dblk_page_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblk_page_create
+ * Function: H5FA__dblk_page_create
*
- * Purpose: Creates a new fixed array data block page in the file
+ * Purpose: Creates a new fixed array data block page in the file
*
- * Return: Valid file address on success/HADDR_UNDEF on failure
+ * Return: Valid file address on success/HADDR_UNDEF on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -163,7 +163,7 @@ HDfprintf(stderr, "%s: Called, addr = %a\n", FUNC, addr);
/* Allocate the data block page */
if(NULL == (dblk_page = H5FA__dblk_page_alloc(hdr, nelmts)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block page")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block page")
/* Set info about data block page on disk */
dblk_page->addr = addr;
@@ -178,7 +178,7 @@ HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", FUNC, dblk_page->size);
/* Cache the new fixed array data block page */
if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block page to cache")
+ H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block page to cache")
CATCH
if(ret_value < 0)
@@ -192,14 +192,14 @@ END_FUNC(PKG) /* end H5FA__dblk_page_create() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblk_page_protect
+ * Function: H5FA__dblk_page_protect
*
- * Purpose: Convenience wrapper around protecting fixed array data
+ * Purpose: Convenience wrapper around protecting fixed array data
* block page
*
- * Return: Non-NULL pointer to data block page on success/NULL on failure
+ * Return: Non-NULL pointer to data block page on success/NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -238,14 +238,14 @@ END_FUNC(PKG) /* end H5FA__dblk_page_protect() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblk_page_unprotect
+ * Function: H5FA__dblk_page_unprotect
*
- * Purpose: Convenience wrapper around unprotecting fixed array
+ * Purpose: Convenience wrapper around unprotecting fixed array
* data block page
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -274,13 +274,13 @@ END_FUNC(PKG) /* end H5FA__dblk_page_unprotect() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblk_page_dest
+ * Function: H5FA__dblk_page_dest
*
- * Purpose: Destroys a fixed array data block page in memory.
+ * Purpose: Destroys a fixed array data block page in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -297,7 +297,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page))
/* Check if buffer for data block page elements has been initialized */
if(dblk_page->elmts) {
/* Free buffer for data block page elements */
- dblk_page->elmts = H5FL_BLK_FREE(page_elmts, dblk_page->elmts);
+ dblk_page->elmts = H5FL_BLK_FREE(page_elmts, dblk_page->elmts);
} /* end if */
/* Decrement reference count on shared info */
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index 71b618c..95419f8 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAdblock.c
+ * Created: H5FAdblock.c
*
- * Purpose: Data block routines for fixed arrays.
+ * Purpose: Data block routines for fixed arrays.
*
*-------------------------------------------------------------------------
*/
@@ -37,11 +37,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File memory management */
/****************/
@@ -89,13 +89,13 @@ H5FL_BLK_DEFINE(fa_page_init);
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_alloc
+ * Function: H5FA__dblock_alloc
*
- * Purpose: Allocate fixed array data block
+ * Purpose: Allocate fixed array data block
*
- * Return: Non-NULL pointer to data block on success/NULL on failure
+ * Return: Non-NULL pointer to data block on success/NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -113,11 +113,11 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr))
/* Allocate memory for the data block */
if(NULL == (dblock = H5FL_CALLOC(H5FA_dblock_t)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
/* Share common array information */
if(H5FA__hdr_incr(hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
dblock->hdr = hdr;
/* Set non-zero internal fields */
@@ -131,19 +131,19 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr))
/* Safely assign the number of pages */
H5_CHECKED_ASSIGN(dblock->npages, size_t, npages, hsize_t);
- /* Sanity check that we have at least 1 page */
- HDassert(dblock->npages > 0);
+ /* Sanity check that we have at least 1 page */
+ HDassert(dblock->npages > 0);
/* Compute size of 'page init' flag array, in bytes */
- dblock->dblk_page_init_size = (dblock->npages + 7) / 8;
- HDassert(dblock->dblk_page_init_size > 0);
+ dblock->dblk_page_init_size = (dblock->npages + 7) / 8;
+ HDassert(dblock->dblk_page_init_size > 0);
- /* Allocate space for 'page init' flags */
- if(NULL == (dblock->dblk_page_init = H5FL_BLK_CALLOC(fa_page_init, dblock->dblk_page_init_size)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for page init bitmask")
+ /* Allocate space for 'page init' flags */
+ if(NULL == (dblock->dblk_page_init = H5FL_BLK_CALLOC(fa_page_init, dblock->dblk_page_init_size)))
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for page init bitmask")
- /* Compute data block page size */
- dblock->dblk_page_size = (dblock->dblk_page_nelmts * hdr->cparam.raw_elmt_size) + H5FA_SIZEOF_CHKSUM;
+ /* Compute data block page size */
+ dblock->dblk_page_size = (dblock->dblk_page_nelmts * hdr->cparam.raw_elmt_size) + H5FA_SIZEOF_CHKSUM;
/* Compute the # of elements on last page */
if(0 == hdr->cparam.nelmts % dblock->dblk_page_nelmts)
@@ -156,8 +156,8 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr))
/* Allocate buffer for elements in data block */
H5_CHECK_OVERFLOW(dblk_size, /* From: */hsize_t, /* To: */size_t);
- if(NULL == (dblock->elmts = H5FL_BLK_MALLOC(chunk_elmts, (size_t)dblk_size)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for data block element buffer")
+ if(NULL == (dblock->elmts = H5FL_BLK_MALLOC(chunk_elmts, (size_t)dblk_size)))
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for data block element buffer")
} /* end else */
/* Set the return value */
@@ -173,13 +173,13 @@ END_FUNC(PKG) /* end H5FA__dblock_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_create
+ * Function: H5FA__dblock_create
*
- * Purpose: Creates a fixed array data block in the file
+ * Purpose: Creates a fixed array data block in the file
*
- * Return: Valid file address on success/HADDR_UNDEF on failure
+ * Return: Valid file address on success/HADDR_UNDEF on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -202,7 +202,7 @@ HDfprintf(stderr, "%s: Called, hdr->stats.nelmts = %Zu, nelmts = %Zu\n", FUNC, h
/* Allocate the data block */
if(NULL == (dblock = H5FA__dblock_alloc(hdr)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
/* Set size of data block on disk */
hdr->stats.dblk_size = dblock->size = H5FA_DBLOCK_SIZE(dblock);
@@ -213,7 +213,7 @@ HDfprintf(stderr, "%s: dblock->size = %Zu\n", FUNC, dblock->size);
/* Allocate space for the data block on disk */
if(HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FARRAY_DBLOCK, dxpl_id, (hsize_t)dblock->size)))
- H5E_THROW(H5E_CANTALLOC, "file allocation failed for fixed array data block")
+ H5E_THROW(H5E_CANTALLOC, "file allocation failed for fixed array data block")
dblock->addr = dblock_addr;
/* Don't initialize elements if paged */
@@ -224,7 +224,7 @@ HDfprintf(stderr, "%s: dblock->size = %Zu\n", FUNC, dblock->size);
/* Cache the new fixed array data block */
if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block to cache")
+ H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block to cache")
/* Mark the header dirty (for updating statistics) */
*hdr_dirty = TRUE;
@@ -249,13 +249,13 @@ END_FUNC(PKG) /* end H5FA__dblock_create() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_protect
+ * Function: H5FA__dblock_protect
*
- * Purpose: Convenience wrapper around protecting fixed array data block
+ * Purpose: Convenience wrapper around protecting fixed array data block
*
- * Return: Non-NULL pointer to data block on success/NULL on failure
+ * Return: Non-NULL pointer to data block on success/NULL on failure
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -293,13 +293,13 @@ END_FUNC(PKG) /* end H5FA__dblock_protect() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_unprotect
+ * Function: H5FA__dblock_unprotect
*
- * Purpose: Convenience wrapper around unprotecting fixed array data block
+ * Purpose: Convenience wrapper around unprotecting fixed array data block
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -327,13 +327,13 @@ END_FUNC(PKG) /* end H5FA__dblock_unprotect() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_delete
+ * Function: H5FA__dblock_delete
*
- * Purpose: Delete a data block
+ * Purpose: Delete a data block
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -393,13 +393,13 @@ END_FUNC(PKG) /* end H5FA__dblock_delete() */
/*-------------------------------------------------------------------------
- * Function: H5FA__dblock_dest
+ * Function: H5FA__dblock_dest
*
- * Purpose: Destroys a fixed array data block in memory.
+ * Purpose: Destroys a fixed array data block in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -417,16 +417,16 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock))
if(dblock->elmts && !dblock->npages) {
/* Free buffer for data block elements */
HDassert(dblock->hdr->cparam.nelmts > 0);
- dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
+ dblock->elmts = H5FL_BLK_FREE(chunk_elmts, dblock->elmts);
} /* end if */
/* Check if data block is paged */
- if(dblock->npages) {
- /* Free buffer for 'page init' bitmask, if there is one */
- HDassert(dblock->dblk_page_init_size > 0);
- if(dblock->dblk_page_init)
- dblock->dblk_page_init = H5FL_BLK_FREE(fa_page_init, dblock->dblk_page_init);
- } /* end if */
+ if(dblock->npages) {
+ /* Free buffer for 'page init' bitmask, if there is one */
+ HDassert(dblock->dblk_page_init_size > 0);
+ if(dblock->dblk_page_init)
+ dblock->dblk_page_init = H5FL_BLK_FREE(fa_page_init, dblock->dblk_page_init);
+ } /* end if */
/* Decrement reference count on shared info */
if(H5FA__hdr_decr(dblock->hdr) < 0)
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 49d22f3..62b1837 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAhdr.c
+ * Created: H5FAhdr.c
*
- * Purpose: Array header routines for Fixed Array.
+ * Purpose: Array header routines for Fixed Array.
*
*-------------------------------------------------------------------------
*/
@@ -37,10 +37,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5MFprivate.h" /* File memory management */
/****************/
@@ -82,13 +82,13 @@ H5FL_DEFINE_STATIC(H5FA_hdr_t);
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_alloc
+ * Function: H5FA__hdr_alloc
*
- * Purpose: Allocate shared Fixed Array header
+ * Purpose: Allocate shared Fixed Array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -105,7 +105,7 @@ H5FA__hdr_alloc(H5F_t *f))
/* Allocate space for the shared information */
if(NULL == (hdr = H5FL_CALLOC(H5FA_hdr_t)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for Fixed Array shared header")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for Fixed Array shared header")
/* Set non-zero internal fields */
hdr->addr = HADDR_UNDEF;
@@ -127,13 +127,13 @@ END_FUNC(PKG) /* end H5FA__hdr_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_init
+ * Function: H5FA__hdr_init
*
- * Purpose: Initialize shared fixed array header
+ * Purpose: Initialize shared fixed array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, November 15, 2009
*
*-------------------------------------------------------------------------
@@ -165,13 +165,13 @@ END_FUNC(PKG) /* end H5FA__hdr_init() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_create
+ * Function: H5FA__hdr_create
*
- * Purpose: Creates a new Fixed Array header in the file
+ * Purpose: Creates a new Fixed Array header in the file
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -196,17 +196,17 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
{
/* Check for valid parameters */
if(cparam->raw_elmt_size == 0)
- H5E_THROW(H5E_BADVALUE, "element size must be greater than zero")
+ H5E_THROW(H5E_BADVALUE, "element size must be greater than zero")
if(cparam->max_dblk_page_nelmts_bits == 0)
- H5E_THROW(H5E_BADVALUE, "max. # of elements bits must be greater than zero")
+ H5E_THROW(H5E_BADVALUE, "max. # of elements bits must be greater than zero")
if(cparam->nelmts == 0)
- H5E_THROW(H5E_BADVALUE, "# of elements must be greater than zero")
+ H5E_THROW(H5E_BADVALUE, "# of elements must be greater than zero")
}
#endif /* NDEBUG */
/* Allocate space for the shared information */
if(NULL == (hdr = H5FA__hdr_alloc(f)))
- H5E_THROW(H5E_CANTALLOC, "memory allocation failed for Fixed Array shared header")
+ H5E_THROW(H5E_CANTALLOC, "memory allocation failed for Fixed Array shared header")
hdr->dblk_addr = HADDR_UNDEF;
@@ -215,15 +215,15 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Finish initializing fixed array header */
if(H5FA__hdr_init(hdr, ctx_udata) < 0)
- H5E_THROW(H5E_CANTINIT, "initialization failed for fixed array header")
+ H5E_THROW(H5E_CANTINIT, "initialization failed for fixed array header")
/* Allocate space for the header on disk */
if(HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_FARRAY_HDR, dxpl_id, (hsize_t)hdr->size)))
- H5E_THROW(H5E_CANTALLOC, "file allocation failed for Fixed Array header")
+ H5E_THROW(H5E_CANTALLOC, "file allocation failed for Fixed Array header")
/* Cache the new Fixed Array header */
if(H5AC_insert_entry(f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTINSERT, "can't add fixed array header to cache")
+ H5E_THROW(H5E_CANTINSERT, "can't add fixed array header to cache")
/* Set address of array header to return */
ret_value = hdr->addr;
@@ -244,13 +244,13 @@ END_FUNC(PKG) /* end H5FA__hdr_create() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_incr
+ * Function: H5FA__hdr_incr
*
- * Purpose: Increment component reference count on shared array header
+ * Purpose: Increment component reference count on shared array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -276,13 +276,13 @@ END_FUNC(PKG) /* end H5FA__hdr_incr() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_decr
+ * Function: H5FA__hdr_decr
*
- * Purpose: Decrement component reference count on shared array header
+ * Purpose: Decrement component reference count on shared array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -311,13 +311,13 @@ END_FUNC(PKG) /* end H5FA__hdr_decr() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_fuse_incr
+ * Function: H5FA__hdr_fuse_incr
*
- * Purpose: Increment file reference count on shared array header
+ * Purpose: Increment file reference count on shared array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -336,13 +336,13 @@ END_FUNC(PKG) /* end H5FA__hdr_fuse_incr() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_fuse_decr
+ * Function: H5FA__hdr_fuse_decr
*
- * Purpose: Decrement file reference count on shared array header
+ * Purpose: Decrement file reference count on shared array header
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -365,13 +365,13 @@ END_FUNC(PKG) /* end H5FA__hdr_fuse_decr() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_modified
+ * Function: H5FA__hdr_modified
*
- * Purpose: Mark a fixed array as modified
+ * Purpose: Mark a fixed array as modified
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -468,11 +468,11 @@ END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
/*-------------------------------------------------------------------------
* Function: H5FA__hdr_delete
*
- * Purpose: Delete a fixed array, starting with the header
+ * Purpose: Delete a fixed array, starting with the header
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -526,13 +526,13 @@ END_FUNC(PKG) /* end H5FA__hdr_delete() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_dest
+ * Function: H5FA__hdr_dest
*
- * Purpose: Destroys a fixed array header in memory.
+ * Purpose: Destroys a fixed array header in memory.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index ddf3a07..c29322a 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -16,9 +16,9 @@
/*
* Programmer:
*
- * Purpose: This file contains declarations which are visible only within
- * the H5FA package. Source files outside the H5FA package should
- * include H5FAprivate.h instead.
+ * Purpose: This file contains declarations which are visible only within
+ * the H5FA package. Source files outside the H5FA package should
+ * include H5FAprivate.h instead.
*/
#if !(defined(H5FA_FRIEND) | defined(H5FA_MODULE))
#error "Do not include this file outside the H5FA package!"
@@ -31,8 +31,8 @@
#include "H5FAprivate.h"
/* Other private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
@@ -52,11 +52,11 @@
#define H5FA_SIZEOF_CHKSUM 4
/* "Standard" size of prefix information for fixed array metadata */
-#define H5FA_METADATA_PREFIX_SIZE(c) ( \
- H5_SIZEOF_MAGIC /* Signature */ \
- + 1 /* Version */ \
- + 1 /* Array type */ \
- + ((c) ? H5FA_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \
+#define H5FA_METADATA_PREFIX_SIZE(c) ( \
+ H5_SIZEOF_MAGIC /* Signature */ \
+ + 1 /* Version */ \
+ + 1 /* Array type */ \
+ + ((c) ? H5FA_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \
)
/* Size of the Fixed Array header on disk */
@@ -86,25 +86,25 @@
)
/* Size of the Fixed Array data block prefix on disk */
-#define H5FA_DBLOCK_PREFIX_SIZE(d) ( \
- /* General metadata fields */ \
- H5FA_METADATA_PREFIX_SIZE(TRUE) \
- \
- /* Sanity-checking fields */ \
- + (d)->hdr->sizeof_addr /* File address of Fixed Array header owning the data block */ \
- \
- /* Fixed Array Data Block specific fields */ \
+#define H5FA_DBLOCK_PREFIX_SIZE(d) ( \
+ /* General metadata fields */ \
+ H5FA_METADATA_PREFIX_SIZE(TRUE) \
+ \
+ /* Sanity-checking fields */ \
+ + (d)->hdr->sizeof_addr /* File address of Fixed Array header owning the data block */ \
+ \
+ /* Fixed Array Data Block specific fields */ \
+ (d)->dblk_page_init_size /* Fixed array data block 'page init' bitmasks (can be 0 if no pages) */ \
)
/* Size of the Fixed Array data block on disk */
-#define H5FA_DBLOCK_SIZE(d) ( \
- /* Data block prefix size */ \
- H5FA_DBLOCK_PREFIX_SIZE(d) \
- \
- /* Fixed Array Elements|Pages of Elements*/ \
- + ((d)->hdr->cparam.nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) \
- + ((d)->npages * H5FA_SIZEOF_CHKSUM) /* Checksum */ \
+#define H5FA_DBLOCK_SIZE(d) ( \
+ /* Data block prefix size */ \
+ H5FA_DBLOCK_PREFIX_SIZE(d) \
+ \
+ /* Fixed Array Elements|Pages of Elements*/ \
+ + ((d)->hdr->cparam.nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) \
+ + ((d)->npages * H5FA_SIZEOF_CHKSUM) /* Checksum */ \
)
/* Size of the Fixed Array data block page on disk */
@@ -127,20 +127,20 @@ typedef struct H5FA_hdr_t {
H5FA_create_t cparam; /* Creation parameters for Fixed Array */
/* Fixed Array data block information (stored in header) */
- haddr_t dblk_addr; /* Address of Fixed Array Data block */
+ haddr_t dblk_addr; /* Address of Fixed Array Data block */
/* Statistics for Fixed Array (stored in header) */
H5FA_stat_t stats; /* Statistcs for Fixed Array */
/* Computed/cached values (not stored in header) */
- size_t rc; /* Reference count of the header */
- haddr_t addr; /* Address of header in file */
- size_t size; /* Size of header in file */
- H5F_t *f; /* Pointer to file for fixed array */
- size_t file_rc; /* Reference count of files using array header */
- hbool_t pending_delete; /* Array is pending deletion */
- size_t sizeof_addr; /* Size of file addresses */
- size_t sizeof_size; /* Size of file sizes */
+ size_t rc; /* Reference count of the header */
+ haddr_t addr; /* Address of header in file */
+ size_t size; /* Size of header in file */
+ H5F_t *f; /* Pointer to file for fixed array */
+ size_t file_rc; /* Reference count of files using array header */
+ hbool_t pending_delete; /* Array is pending deletion */
+ size_t sizeof_addr; /* Size of file addresses */
+ size_t sizeof_size; /* Size of file sizes */
/* Client information (not stored) */
void *cb_ctx; /* Callback context */
@@ -152,22 +152,22 @@ typedef struct H5FA_dblock_t {
H5AC_info_t cache_info;
/* Fixed array information (stored) */
- uint8_t *dblk_page_init;/* Bitmap of whether a data block page is initialized */
- void *elmts; /* Buffer for elements stored in data block */
+ uint8_t *dblk_page_init;/* Bitmap of whether a data block page is initialized */
+ void *elmts; /* Buffer for elements stored in data block */
/* Internal array information (not stored) */
- H5FA_hdr_t *hdr; /* Shared array header info */
+ H5FA_hdr_t *hdr; /* Shared array header info */
/* Computed/cached values (not stored) */
- haddr_t addr; /* Address of this data block on disk */
- hsize_t size; /* Size of data block on disk */
- size_t npages; /* Nummber of pages in data block (zero if not paged) */
- size_t last_page_nelmts; /* Nummber of elements in last page, if paged */
+ haddr_t addr; /* Address of this data block on disk */
+ hsize_t size; /* Size of data block on disk */
+ size_t npages; /* Nummber of pages in data block (zero if not paged) */
+ size_t last_page_nelmts; /* Nummber of elements in last page, if paged */
/* Fixed Array data block information (not stored) */
- size_t dblk_page_nelmts; /* # of elements per data block page */
- size_t dblk_page_size; /* Size of a data block page */
- size_t dblk_page_init_size; /* Size of 'page init' bitmask */
+ size_t dblk_page_nelmts; /* # of elements per data block page */
+ size_t dblk_page_size; /* Size of a data block page */
+ size_t dblk_page_init_size; /* Size of 'page init' bitmask */
} H5FA_dblock_t;
/* The fixed array data block page information */
@@ -179,18 +179,18 @@ typedef struct H5FA_dbk_page_t {
void *elmts; /* Buffer for elements stored in data block page */
/* Internal array information (not stored) */
- H5FA_hdr_t *hdr; /* Shared array header info */
+ H5FA_hdr_t *hdr; /* Shared array header info */
/* Computed/cached values (not stored) */
- haddr_t addr; /* Address of this data block page on disk */
- size_t size; /* Size of data block page on disk */
- size_t nelmts; /* Number of elements in data block page */
+ haddr_t addr; /* Address of this data block page on disk */
+ size_t size; /* Size of data block page on disk */
+ size_t nelmts; /* Number of elements in data block page */
} H5FA_dblk_page_t;
/* Fixed array */
struct H5FA_t {
- H5FA_hdr_t *hdr; /* Pointer to internal fixed array header info */
- H5F_t *f; /* Pointer to file for fixed array */
+ H5FA_hdr_t *hdr; /* Pointer to internal fixed array header info */
+ H5F_t *f; /* Pointer to file for fixed array */
};
@@ -205,14 +205,14 @@ typedef struct H5FA_hdr_cache_ud_t {
/* Info needed for loading data block */
typedef struct H5FA_dblock_cache_ud_t {
- H5FA_hdr_t *hdr; /* Shared fixed array information */
- haddr_t dblk_addr; /* Address of data block on disk */
+ H5FA_hdr_t *hdr; /* Shared fixed array information */
+ haddr_t dblk_addr; /* Address of data block on disk */
} H5FA_dblock_cache_ud_t;
/* Info needed for loading data block page */
typedef struct H5FA_dblk_page_cache_ud_t {
- H5FA_hdr_t *hdr; /* Shared fixed array information */
- size_t nelmts; /* Number of elements in data block page */
+ H5FA_hdr_t *hdr; /* Shared fixed array information */
+ size_t nelmts; /* Number of elements in data block page */
haddr_t dblk_page_addr; /* Address of data block page on disk */
} H5FA_dblk_page_cache_ud_t;
@@ -234,7 +234,7 @@ H5_DLLVAR const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1];
H5_DLLVAR const H5FA_class_t H5FA_CLS_TEST[1];
/* Array of fixed array client ID -> client class mappings */
-extern const H5FA_class_t *const H5FA_client_class_g[H5FA_NUM_CLS_ID];
+H5_DLLVAR const H5FA_class_t *const H5FA_client_class_g[H5FA_NUM_CLS_ID];
/******************************/
diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h
index 71a68c0..aa88003 100644
--- a/src/H5FAprivate.h
+++ b/src/H5FAprivate.h
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAprivate.h
+ * Created: H5FAprivate.h
*
- * Purpose: Private header for library accessible Fixed
+ * Purpose: Private header for library accessible Fixed
* Array routines.
*
*-------------------------------------------------------------------------
@@ -48,8 +48,8 @@
typedef enum H5FA_cls_id_t {
/* Start real class IDs at 0 -QAK */
/* (keep these last) */
- H5FA_CLS_TEST_ID, /* Fixed array is for testing (do not use for actual data) */
- H5FA_NUM_CLS_ID /* Number of Fixed Array class IDs (must be last) */
+ H5FA_CLS_TEST_ID, /* Fixed array is for testing (do not use for actual data) */
+ H5FA_NUM_CLS_ID /* Number of Fixed Array class IDs (must be last) */
} H5FA_cls_id_t;
/*
@@ -57,9 +57,9 @@ typedef enum H5FA_cls_id_t {
* variable of this type that contains class variables and methods.
*/
typedef struct H5FA_class_t {
- H5FA_cls_id_t id; /* ID of Fixed Array class, as found in file */
- const char *name; /* Name of class (for debugging) */
- size_t nat_elmt_size; /* Size of native (memory) element */
+ H5FA_cls_id_t id; /* ID of Fixed Array class, as found in file */
+ const char *name; /* Name of class (for debugging) */
+ size_t nat_elmt_size; /* Size of native (memory) element */
/* Fixed array client callback methods */
void *(*crt_context)(void *udata); /* Create context for other callbacks */
@@ -74,22 +74,23 @@ typedef struct H5FA_class_t {
/* Fixed array creation parameters */
typedef struct H5FA_create_t {
- const H5FA_class_t *cls; /* Class of Fixed Array to create */
- uint8_t raw_elmt_size; /* Element size in file (in bytes) */
+ const H5FA_class_t *cls; /* Class of Fixed Array to create */
+ uint8_t raw_elmt_size; /* Element size in file (in bytes) */
uint8_t max_dblk_page_nelmts_bits; /* Log2(Max. # of elements in a data block page) -
- i.e. # of bits needed to store max. # of elements
- in a data block page */
- hsize_t nelmts; /* # of elements in array */
+ * i.e. # of bits needed to store max. # of elements
+ * in a data block page
+ */
+ hsize_t nelmts; /* # of elements in array */
} H5FA_create_t;
/* Fixed array metadata statistics info */
typedef struct H5FA_stat_t {
/* Non-stored (i.e. computed) fields */
- hsize_t hdr_size; /* Size of header */
- hsize_t dblk_size; /* Size of data block */
+ hsize_t hdr_size; /* Size of header */
+ hsize_t dblk_size; /* Size of data block */
/* Stored fields */
- hsize_t nelmts; /* # of elements */
+ hsize_t nelmts; /* # of elements */
} H5FA_stat_t;
/* Fixed Array info (forward decl - defined in H5FApkg.h) */
@@ -111,14 +112,14 @@ typedef int (*H5FA_operator_t)(hsize_t idx, const void *_elmt, void *_udata);
/* General routines */
H5_DLL H5FA_t *H5FA_create(H5F_t *f, hid_t dxpl_id, const H5FA_create_t *cparam,
void *ctx_udata);
-H5_DLL H5FA_t *H5FA_open(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata);
-H5_DLL herr_t H5FA_get_nelmts(const H5FA_t *ea, hsize_t *nelmts);
-H5_DLL herr_t H5FA_get_addr(const H5FA_t *ea, haddr_t *addr);
-H5_DLL herr_t H5FA_set(const H5FA_t *ea, hid_t dxpl_id, hsize_t idx, const void *elmt);
-H5_DLL herr_t H5FA_get(const H5FA_t *ea, hid_t dxpl_id, hsize_t idx, void *elmt);
+H5_DLL H5FA_t *H5FA_open(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata);
+H5_DLL herr_t H5FA_get_nelmts(const H5FA_t *fa, hsize_t *nelmts);
+H5_DLL herr_t H5FA_get_addr(const H5FA_t *fa, haddr_t *addr);
+H5_DLL herr_t H5FA_set(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, const void *elmt);
+H5_DLL herr_t H5FA_get(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, void *elmt);
H5_DLL herr_t H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata);
-H5_DLL herr_t H5FA_close(H5FA_t *ea, hid_t dxpl_id);
-H5_DLL herr_t H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata);
+H5_DLL herr_t H5FA_close(H5FA_t *fa, hid_t dxpl_id);
+H5_DLL herr_t H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata);
/* Statistics routines */
H5_DLL herr_t H5FA_get_stats(const H5FA_t *ea, H5FA_stat_t *stats);
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 4ded4c1..72fa0de 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -15,9 +15,9 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FAstat.c
+ * Created: H5FAstat.c
*
- * Purpose: Fixed array metadata statistics functions.
+ * Purpose: Fixed array metadata statistics functions.
*
*-------------------------------------------------------------------------
*/
@@ -37,9 +37,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
/****************/
@@ -79,13 +79,13 @@
/*-------------------------------------------------------------------------
- * Function: H5FA_get_stats
+ * Function: H5FA_get_stats
*
- * Purpose: Query the metadata stats of an array
+ * Purpose: Query the metadata stats of an array
*
- * Return: SUCCEED/FAIL
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index 528f550..091f284 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -14,9 +14,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer:
- *
- * Purpose: Fixed array testing functions.
+ * Purpose: Fixed array testing functions.
*
*/
@@ -119,14 +117,14 @@ H5FL_DEFINE_STATIC(H5FA__test_ctx_t);
/*-------------------------------------------------------------------------
- * Function: H5FA__test_crt_context
+ * Function: H5FA__test_crt_context
*
- * Purpose: Create context for callbacks
+ * Purpose: Create context for callbacks
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -140,7 +138,7 @@ H5FA__test_crt_context(void H5_ATTR_UNUSED *udata))
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t)))
- H5E_THROW(H5E_CANTALLOC, "can't allocate fixed array client callback context")
+ H5E_THROW(H5E_CANTALLOC, "can't allocate fixed array client callback context")
/* Initialize the context */
ctx->bogus = H5FA__TEST_BOGUS_VAL;
@@ -154,14 +152,13 @@ END_FUNC(STATIC) /* end H5FA__test_crt_context() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_dst_context
+ * Function: H5FA__test_dst_context
*
- * Purpose: Destroy context for callbacks
+ * Purpose: Destroy context for callbacks
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -183,14 +180,13 @@ END_FUNC(STATIC) /* end H5FA__test_dst_context() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_fill
+ * Function: H5FA__test_fill
*
- * Purpose: Fill "missing elements" in block of elements
+ * Purpose: Fill "missing elements" in block of elements
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -212,14 +208,13 @@ END_FUNC(STATIC) /* end H5FA__test_fill() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_encode
+ * Function: H5FA__test_encode
*
- * Purpose: Encode an element from "native" to "raw" form
+ * Purpose: Encode an element from "native" to "raw" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -257,14 +252,13 @@ END_FUNC(STATIC) /* end H5FA__test_encode() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_decode
+ * Function: H5FA__test_decode
*
- * Purpose: Decode an element from "raw" to "native" form
+ * Purpose: Decode an element from "raw" to "native" form
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -303,14 +297,13 @@ END_FUNC(STATIC) /* end H5FA__test_decode() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_debug
+ * Function: H5FA__test_debug
*
- * Purpose: Display an element for debugging
+ * Purpose: Display an element for debugging
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -336,14 +329,14 @@ END_FUNC(STATIC) /* end H5FA__test_debug() */
/*-------------------------------------------------------------------------
- * Function: H5FA__test_crt_dbg_context
+ * Function: H5FA__test_crt_dbg_context
*
- * Purpose: Create context for debugging callback
+ * Purpose: Create context for debugging callback
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-NULL
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, December 1, 2009
*
*-------------------------------------------------------------------------
@@ -357,7 +350,7 @@ H5FA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id
/* Allocate new context structure */
if(NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t)))
- H5E_THROW(H5E_CANTALLOC, "can't allocate fixed array client callback context")
+ H5E_THROW(H5E_CANTALLOC, "can't allocate fixed array client callback context")
/* Initialize the context */
ctx->bogus = H5FA__TEST_BOGUS_VAL;
@@ -371,14 +364,13 @@ END_FUNC(STATIC) /* end H5FA__test_crt_dbg_context() */
/*-------------------------------------------------------------------------
- * Function: H5FA_get_cparam_test
+ * Function: H5FA_get_cparam_test
*
- * Purpose: Retrieve the parameters used to create the fixed array
+ * Purpose: Retrieve the parameters used to create the fixed array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------
@@ -399,14 +391,13 @@ END_FUNC(PRIV) /* end H5FA_get_cparam_test() */
/*-------------------------------------------------------------------------
- * Function: H5FA_cmp_cparam_test
+ * Function: H5FA_cmp_cparam_test
*
- * Purpose: Compare the parameters used to create the fixed array
+ * Purpose: Compare the parameters used to create the fixed array
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
* Thursday, April 30, 2009
*
*-------------------------------------------------------------------------