summaryrefslogtreecommitdiffstats
path: root/src/H5SMbtree2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-12-19 20:18:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-12-19 20:18:26 (GMT)
commitde9088b6bb7969aade23f5af0d1e4e1806fcc0c4 (patch)
tree5f77b2172513805db28c2907f119abe513550295 /src/H5SMbtree2.c
parenta75186cc511760578d8a9de722a16873371b6570 (diff)
downloadhdf5-de9088b6bb7969aade23f5af0d1e4e1806fcc0c4.zip
hdf5-de9088b6bb7969aade23f5af0d1e4e1806fcc0c4.tar.gz
hdf5-de9088b6bb7969aade23f5af0d1e4e1806fcc0c4.tar.bz2
[svn-r13079] Description:
Add more tests for checking that writing to shared attributes works correctly. (Looks like it still has a bug when dense storage is used, which I'll correct shortly). Add testing routine to shared message code, to retrieve reference count for a shared message. Add fractal heap 'op' callback for efficiently computing the hash value of an existing encoded message in the shared message fractal heap. Various minor cleanups and warning placations. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5SMbtree2.c')
-rwxr-xr-xsrc/H5SMbtree2.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index c495f56..adfcaba 100755
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -17,28 +17,25 @@
/****************/
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Fpkg.h" /* File access */
#include "H5SMpkg.h" /* Shared object header messages */
-#include "H5B2private.h" /* v2 B-trees */
+
/****************/
/* Local Macros */
/****************/
+
/******************/
/* Local Typedefs */
/******************/
+
/********************/
/* Local Prototypes */
/********************/
@@ -91,8 +88,9 @@ H5SM_message_compare(const void *rec1, const void *rec2)
{
const H5SM_mesg_key_t *key = (const H5SM_mesg_key_t *) rec1;
const H5SM_sohm_t *mesg = (const H5SM_sohm_t *) rec2;
- int64_t hash_diff; /* Has to be able to hold two 32-bit values */
- herr_t ret_value=0;
+ int64_t hash_diff; /* Has to be able to hold two 32-bit values */
+ herr_t ret_value = 0;
+
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_message_compare)
hash_diff = key->hash;
@@ -116,7 +114,7 @@ H5SM_message_compare(const void *rec1, const void *rec2)
/* We need to see if this message is in fact the message stored
* in the heap. Read it from the heap and compare the two.
*/
- HDmemset(buf2, 0, H5O_MESG_MAX_SIZE);
+ HDmemset(buf2, 0, (size_t)H5O_MESG_MAX_SIZE);
ret = H5HF_read(key->fheap, H5AC_dxpl_id, &(mesg->fheap_id), &buf2);
HDassert(ret >= 0);
@@ -136,7 +134,6 @@ H5SM_message_compare(const void *rec1, const void *rec2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM_message_compare */
-
/*-------------------------------------------------------------------------
* Function: H5SM_message_store
@@ -163,7 +160,6 @@ H5SM_message_store(void *native, const void *udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM_message_store */
-
/*-------------------------------------------------------------------------
* Function: H5SM_message_retrieve
@@ -192,7 +188,6 @@ H5SM_message_retrieve(void *udata, const void *native)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM_message_retrieve */
-
/*-------------------------------------------------------------------------
* Function: H5SM_message_encode
@@ -252,7 +247,6 @@ H5SM_message_decode(const H5F_t UNUSED *f, const uint8_t *raw, void *_nrecord)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM_message_decode */
-
/*-------------------------------------------------------------------------
* Function: H5SM_message_debug
@@ -303,6 +297,7 @@ herr_t
H5SM_incr_ref(void *record, void *op_data, hbool_t *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *) record;
+
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_incr_ref)
HDassert(record);
@@ -318,7 +313,6 @@ H5SM_incr_ref(void *record, void *op_data, hbool_t *changed)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
/*-------------------------------------------------------------------------
* Function: H5SM_decr_ref
@@ -343,6 +337,7 @@ herr_t
H5SM_decr_ref(void *record, void *op_data, hbool_t *changed)
{
H5SM_sohm_t *message = (H5SM_sohm_t *) record;
+
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_decr_ref)
HDassert(record);
@@ -359,7 +354,6 @@ H5SM_decr_ref(void *record, void *op_data, hbool_t *changed)
}
-
/*-------------------------------------------------------------------------
* Function: H5SM_convert_to_list_op
*
@@ -382,6 +376,7 @@ H5SM_convert_to_list_op(const void * record, void *op_data)
const H5SM_sohm_t *message = (const H5SM_sohm_t *) record;
const H5SM_list_t *list = (const H5SM_list_t *) op_data;
hsize_t x;
+
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5SM_convert_to_list_op)
HDassert(record);
@@ -402,3 +397,4 @@ H5SM_convert_to_list_op(const void * record, void *op_data)
FUNC_LEAVE_NOAPI(SUCCEED)
}
+