summaryrefslogtreecommitdiffstats
path: root/src/H5HP.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-11-27 16:07:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-11-27 16:07:44 (GMT)
commitb2f85c54f3b95c76457242fa095b0375b86a9211 (patch)
treee922bf4fcb6458430a562a6605fd1f56a9c5ae23 /src/H5HP.c
parent0a27d163bcfee73f32d52e673fb4b2fe038bddfe (diff)
downloadhdf5-b2f85c54f3b95c76457242fa095b0375b86a9211.zip
hdf5-b2f85c54f3b95c76457242fa095b0375b86a9211.tar.gz
hdf5-b2f85c54f3b95c76457242fa095b0375b86a9211.tar.bz2
[svn-r9582] Purpose:
Add new internal data structure Description: Add an implementation of skip lists to the library (see comment in src/H5SL.c for references to the papers describing them) as a potential replacement for our current threaded, balanced binary tree container. Skip lists are much simpler to implement and should be faster to use. Also, added new error codes to release branch, so bump the minor version number to indicate that the library is no longer perfectly compatible with the 1.6.3 release. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require further testing (the skip lists aren't actually used by any library code yet)
Diffstat (limited to 'src/H5HP.c')
-rw-r--r--src/H5HP.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/H5HP.c b/src/H5HP.c
index bfcce4e..26b6f39 100644
--- a/src/H5HP.c
+++ b/src/H5HP.c
@@ -20,15 +20,16 @@
*
*/
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5HP_mask
+
/* Private headers needed */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5HPprivate.h" /* Heap routines */
#include "H5FLprivate.h" /* Memory management functions */
-/* Pablo information */
-#define PABLO_MASK H5HP_mask
-
/* Interface initialization? */
static int interface_initialize_g = 0;
#define INTERFACE_INIT NULL
@@ -710,21 +711,21 @@ H5HP_change(H5HP_t *heap, int val, void *_obj)
if(val<old_val) {
if(heap->type==H5HP_MAX_HEAP) {
if(H5HP_sink_max(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
if(H5HP_swim_min(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
} /* end if */
else {
if(heap->type==H5HP_MAX_HEAP) {
if(H5HP_swim_max(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
if(H5HP_sink_min(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
} /* end else */
@@ -793,11 +794,11 @@ H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
/* Restore heap condition */
if(heap->type==H5HP_MAX_HEAP) {
if(H5HP_swim_max(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
if(H5HP_sink_min(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
done:
@@ -865,11 +866,11 @@ H5HP_decr(H5HP_t *heap, unsigned amt, void *_obj)
/* Restore heap condition */
if(heap->type==H5HP_MAX_HEAP) {
if(H5HP_sink_max(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
if(H5HP_swim_min(heap,obj_loc)<0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTCHANGE, FAIL, "unable to restore heap condition");
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
done: