Fix: add missing destroy functions to queues/stack APIs
[urcu.git] / urcu / lfstack.h
index 11a63d95cd3322a00c052a79080f1f93dd99e31c..5a9bca368775db300cbd1bac44e5fbcd51c6ce47 100644 (file)
@@ -95,6 +95,7 @@ typedef union {
 
 #define cds_lfs_node_init              _cds_lfs_node_init
 #define cds_lfs_init                   _cds_lfs_init
+#define cds_lfs_destroy                        _cds_lfs_destroy
 #define __cds_lfs_init                 ___cds_lfs_init
 #define cds_lfs_empty                  _cds_lfs_empty
 #define cds_lfs_push                   _cds_lfs_push
@@ -119,12 +120,20 @@ typedef union {
 extern void cds_lfs_node_init(struct cds_lfs_node *node);
 
 /*
- * cds_lfs_init: initialize lock-free stack.
+ * cds_lfs_init: initialize lock-free stack (with locking). Pair with
+ * cds_lfs_destroy().
  */
 extern void cds_lfs_init(struct cds_lfs_stack *s);
 
 /*
- * __cds_lfs_init: initialize lock-free stack.
+ * cds_lfs_destroy: destroy lock-free stack (with lock). Pair with
+ * cds_lfs_init().
+ */
+extern void cds_lfs_destroy(struct cds_lfs_stack *s);
+
+/*
+ * __cds_lfs_init: initialize lock-free stack (without lock).
+ * Don't pair with any destroy function.
  */
 extern void __cds_lfs_init(struct __cds_lfs_stack *s);
 
This page took 0.02284 seconds and 4 git commands to generate.