summaryrefslogtreecommitdiffstats
path: root/src/H5FSsection.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-10-18 21:27:58 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-10-18 21:27:58 (GMT)
commit395c1c7db532897452716615889ad882c4ee935a (patch)
tree1625604f48f8d78b13efe29909fd1eff801fb766 /src/H5FSsection.c
parentaca9bf5cf3039fa0179067c1ee8877870350e819 (diff)
downloadhdf5-395c1c7db532897452716615889ad882c4ee935a.zip
hdf5-395c1c7db532897452716615889ad882c4ee935a.tar.gz
hdf5-395c1c7db532897452716615889ad882c4ee935a.tar.bz2
[svn-r21603] Purpose: Add generic skip list implementation
Description: Added new H5SL_TYPE_GENERIC skip list type, which uses void *'s as keys and a client-supplied callback for key comparison. This was added to support the upcoming "merge named datatype" feature for H5Ocopy, but may be used in other places as well. Also added testing. Also fixed a potential bug with the H5SL_TYPE_OBJ implementation, and added testing for that. Tested: jam, koala, heiwa (h5committest), durandal
Diffstat (limited to 'src/H5FSsection.c')
-rw-r--r--src/H5FSsection.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 9fb34df..7d18003 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -967,7 +967,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
bin = H5V_log2_gen(sect->size);
HDassert(bin < sinfo->nbins);
if(sinfo->bins[bin].bin_list == NULL) {
- if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE)))
+ if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
} /* end if */
else {
@@ -985,7 +985,7 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
/* Initialize the free list size node */
fspace_node->sect_size = sect->size;
fspace_node->serial_count = fspace_node->ghost_count = 0;
- if(NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
/* Insert new free space size node into bin's list */
@@ -1072,7 +1072,7 @@ H5FS_sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")
@@ -2187,7 +2187,7 @@ HDfprintf(stderr, "%s: to_mergable = %u\n", FUNC, to_mergable);
HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
- if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR)))
+ if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
if(H5SL_insert(fspace->sinfo->merge_list, sect, &sect->addr) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into merging skip list")