summaryrefslogtreecommitdiffstats
path: root/src/H5SLprivate.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-07-20 22:21:36 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-07-20 22:21:36 (GMT)
commitf550bc0cea1da09002118fe8dc4455b18fc26717 (patch)
treec397791fb1b551b6965fda53da307c385d559081 /src/H5SLprivate.h
parent74e4cd4d2146b61b9d0179e5e1dc8c9048be2e19 (diff)
downloadhdf5-f550bc0cea1da09002118fe8dc4455b18fc26717.zip
hdf5-f550bc0cea1da09002118fe8dc4455b18fc26717.tar.gz
hdf5-f550bc0cea1da09002118fe8dc4455b18fc26717.tar.bz2
[svn-r27415] Fix potential error with H5I_clear_type which could occur when a callback closed
a different ID in the same type. Added a new skiplist routine, H5SL_try_free_safe, which iterates over items, freeing some of them, and which intercepts and defers attempts to remove from the list outside of the main iteration. Changed H5I_clear_type to use this function. Tested: jam, koala, ostrich (h5committest); ummon
Diffstat (limited to 'src/H5SLprivate.h')
-rw-r--r--src/H5SLprivate.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h
index ce2f091..856099b 100644
--- a/src/H5SLprivate.h
+++ b/src/H5SLprivate.h
@@ -63,6 +63,10 @@ typedef int (*H5SL_cmp_t)(const void *key1, const void *key2);
typedef herr_t (*H5SL_operator_t)(void *item, void *key,
void *operator_data/*in,out*/);
+/* Typedef for H5SL_try_free_safe operation callback */
+typedef htri_t (*H5SL_try_free_op_t)(void *item, void *key,
+ void *operator_data/*in,out*/);
+
/********************/
/* Private routines */
/********************/
@@ -86,6 +90,8 @@ H5_DLL void *H5SL_item(H5SL_node_t *slist_node);
H5_DLL herr_t H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data);
H5_DLL herr_t H5SL_release(H5SL_t *slist);
H5_DLL herr_t H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data);
+H5_DLL herr_t H5SL_try_free_safe(H5SL_t *slist, H5SL_try_free_op_t op,
+ void *op_data);
H5_DLL herr_t H5SL_close(H5SL_t *slist);
H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data);
H5_DLL int H5SL_term_interface(void);