*
* Userspace RCU library - Stack with with wait-free push, blocking traversal.
*
- * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See wfstack.h for linking
- * dynamically with the userspace rcu library.
+ * TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu/wfstack.h for
+ * linking dynamically with the userspace rcu library.
*
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Stack implementing push, pop, pop_all operations, as well as iterator
* on the stack head returned by pop_all.
*
- * Wait-free operations: cds_wfs_push, __cds_wfs_pop_all.
- * Blocking operations: cds_wfs_pop, cds_wfs_pop_all, iteration on stack
- * head returned by pop_all.
+ * Wait-free operations: cds_wfs_push, __cds_wfs_pop_all, cds_wfs_empty,
+ * cds_wfs_first.
+ * Blocking operations: cds_wfs_pop, cds_wfs_pop_all, cds_wfs_next,
+ * iteration on stack head returned by pop_all.
*
* Synchronization table:
*
}
/*
- * cds_wfs_first_blocking: get first node of a popped stack.
+ * cds_wfs_first: get first node of a popped stack.
*
* Content written into the node before enqueue is guaranteed to be
* consistent, but no other memory ordering is ensured.
* Used by for-like iteration macros in urcu/wfstack.h:
* cds_wfs_for_each_blocking()
* cds_wfs_for_each_blocking_safe()
+ *
+ * Returns NULL if popped stack is empty, top stack node otherwise.
*/
static inline struct cds_wfs_node *
-_cds_wfs_first_blocking(struct cds_wfs_head *head)
+_cds_wfs_first(struct cds_wfs_head *head)
{
if (___cds_wfs_end(head))
return NULL;
* Used by for-like iteration macros in urcu/wfstack.h:
* cds_wfs_for_each_blocking()
* cds_wfs_for_each_blocking_safe()
+ *
+ * Returns NULL if reached end of popped stack, non-NULL next stack
+ * node otherwise.
*/
static inline struct cds_wfs_node *
_cds_wfs_next_blocking(struct cds_wfs_node *node)