projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: add missing destroy functions to queues/stack APIs
[userspace-rcu.git]
/
urcu
/
static
/
wfstack.h
diff --git
a/urcu/static/wfstack.h
b/urcu/static/wfstack.h
index db0d5b8b1abda178f7cf0e14a0530d5bae43f8aa..9efba0ee6185051c41d2816b0653d2b4191c78e3 100644
(file)
--- a/
urcu/static/wfstack.h
+++ b/
urcu/static/wfstack.h
@@
-77,7
+77,8
@@
void _cds_wfs_node_init(struct cds_wfs_node *node)
}
/*
}
/*
- * cds_wfs_init: initialize wait-free stack.
+ * cds_wfs_init: initialize wait-free stack. Pair with
+ * cds_wfs_destroy().
*/
static inline
void _cds_wfs_init(struct cds_wfs_stack *s)
*/
static inline
void _cds_wfs_init(struct cds_wfs_stack *s)
@@
-89,6
+90,17
@@
void _cds_wfs_init(struct cds_wfs_stack *s)
assert(!ret);
}
assert(!ret);
}
+/*
+ * cds_wfs_destroy: destroy wait-free stack. Pair with
+ * cds_wfs_init().
+ */
+static inline
+void _cds_wfs_destroy(struct cds_wfs_stack *s)
+{
+ int ret = pthread_mutex_destroy(&s->lock);
+ assert(!ret);
+}
+
static inline bool ___cds_wfs_end(void *node)
{
return node == CDS_WFS_END;
static inline bool ___cds_wfs_end(void *node)
{
return node == CDS_WFS_END;
This page took
0.02329 seconds
and
4
git commands to generate.