summaryrefslogtreecommitdiffstats
path: root/src/H5HFbtree2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-12-29 17:06:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-12-29 17:06:36 (GMT)
commitb5504be6cc6f61b5a8ce78f243b81b6afe9d13c9 (patch)
tree34c12b398509a0b7585009bd10f4e22982ad9cdb /src/H5HFbtree2.c
parent6d8b831b3125ce66e23aba1f3ec16a03e00b5b82 (diff)
downloadhdf5-b5504be6cc6f61b5a8ce78f243b81b6afe9d13c9.zip
hdf5-b5504be6cc6f61b5a8ce78f243b81b6afe9d13c9.tar.gz
hdf5-b5504be6cc6f61b5a8ce78f243b81b6afe9d13c9.tar.bz2
[svn-r28742] Description:
Add 'update' operation to v2 B-trees, which will insert a new record, or modify an existing one, depending on if the record exists or not. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5HFbtree2.c')
-rw-r--r--src/H5HFbtree2.c57
1 files changed, 4 insertions, 53 deletions
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index d82de93..a79bf58 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -71,7 +71,6 @@ typedef struct H5HF_huge_bt2_ctx_t {
/* Common callbacks */
static void *H5HF__huge_bt2_crt_context(void *udata);
static herr_t H5HF__huge_bt2_dst_context(void *ctx);
-static void *H5HF__huge_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
/* Callbacks for indirect objects */
static herr_t H5HF__huge_bt2_indir_store(void *native, const void *udata);
@@ -127,9 +126,7 @@ const H5B2_class_t H5HF_HUGE_BT2_INDIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_indir_compare, /* Record comparison callback */
H5HF__huge_bt2_indir_encode, /* Record encoding callback */
H5HF__huge_bt2_indir_decode, /* Record decoding callback */
- H5HF__huge_bt2_indir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for indirectly accessed, filtered 'huge' objects */
@@ -143,9 +140,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_filt_indir_compare, /* Record comparison callback */
H5HF__huge_bt2_filt_indir_encode, /* Record encoding callback */
H5HF__huge_bt2_filt_indir_decode, /* Record decoding callback */
- H5HF__huge_bt2_filt_indir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_filt_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed 'huge' objects */
@@ -159,9 +154,7 @@ const H5B2_class_t H5HF_HUGE_BT2_DIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_dir_compare, /* Record comparison callback */
H5HF__huge_bt2_dir_encode, /* Record encoding callback */
H5HF__huge_bt2_dir_decode, /* Record decoding callback */
- H5HF__huge_bt2_dir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_dir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed, filtered 'huge' objects */
@@ -175,9 +168,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_filt_dir_compare, /* Record comparison callback */
H5HF__huge_bt2_filt_dir_encode, /* Record encoding callback */
H5HF__huge_bt2_filt_dir_decode, /* Record decoding callback */
- H5HF__huge_bt2_filt_dir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_filt_dir_debug /* Record debugging callback */
}};
/*****************************/
@@ -270,46 +261,6 @@ H5HF__huge_bt2_dst_context(void *_ctx)
/*-------------------------------------------------------------------------
- * Function: H5HF__huge_bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5HF__huge_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value = NULL; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
- ctx->sizeof_size = H5F_SIZEOF_SIZE(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF__huge_bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5HF__huge_bt2_indir_found
*
* Purpose: Retrieve record for indirectly accessed 'huge' object, when