*/
#include <urcu/uatomic.h>
-#include <urcu/wfstack.h>
+#include <urcu/lfstack.h>
#include <urcu/futex.h>
/*
};
struct urcu_wait_node {
- struct cds_wfs_node node;
+ struct cds_lfs_node node;
int32_t state; /* enum urcu_wait_state */
};
struct urcu_wait_node name
struct urcu_wait_queue {
- struct __cds_wfs_stack stack;
+ struct __cds_lfs_stack stack;
};
#define URCU_WAIT_QUEUE_HEAD_INIT(name) \
- { .stack.head = CDS_WFS_END, }
+ { .stack.head = CDS_LFS_END, }
#define DECLARE_URCU_WAIT_QUEUE(name) \
struct urcu_wait_queue name
static inline
void urcu_wait_queue_init(struct urcu_wait_queue *queue)
{
- __cds_wfs_init(&queue->stack);
+ __cds_lfs_init(&queue->stack);
}
struct urcu_waiters {
- struct cds_wfs_head *head;
+ struct cds_lfs_head *head;
};
/*
bool urcu_wait_add(struct urcu_wait_queue *queue,
struct urcu_wait_node *node)
{
- return cds_wfs_push(&queue->stack, &node->node);
+ return cds_lfs_push(&queue->stack, &node->node);
}
/*
void urcu_move_waiters(struct urcu_waiters *waiters,
struct urcu_wait_queue *queue)
{
- waiters->head = __cds_wfs_pop_all(&queue->stack);
+ waiters->head = __cds_lfs_pop_all(&queue->stack);
}
static inline
enum urcu_wait_state state)
{
urcu_wait_set_state(node, state);
- cds_wfs_node_init(&node->node);
+ cds_lfs_node_init(&node->node);
}
/*
static inline
int urcu_dequeue_wake_single(struct urcu_wait_queue *queue)
{
- struct cds_wfs_node *node;
+ struct cds_lfs_node *node;
struct urcu_wait_node *wait_node;
int ret = 0;
- node = __cds_wfs_pop_blocking(&queue->stack);
+ node = __cds_lfs_pop(&queue->stack);
if (!node)
return -ENOENT;
wait_node = caa_container_of(node, struct urcu_wait_node, node);
static inline
int urcu_wake_all_waiters(struct urcu_waiters *waiters)
{
- struct cds_wfs_node *iter, *iter_n;
+ struct cds_lfs_node *iter, *iter_n;
int nr_wakeup = 0;
/* Wake all waiters in our stack head */
- cds_wfs_for_each_blocking_safe(waiters->head, iter, iter_n) {
+ cds_lfs_for_each_safe(waiters->head, iter, iter_n) {
struct urcu_wait_node *wait_node =
caa_container_of(iter, struct urcu_wait_node, node);
*/
#include <urcu/uatomic.h>
-#include <urcu/wfstack.h>
+#include <urcu/lfstack.h>
#include <urcu/waitqueue-lifo.h>
#include <urcu/wfcqueue.h>
#include <urcu/rculist.h>
* NULL next pointer. We are therefore not in
* the queue.
*/
- cds_wfs_node_init(&worker->wait_node.node);
+ cds_lfs_node_init(&worker->wait_node.node);
/* Protect stack dequeue against ABA */
synchronize_rcu();
was_empty = !urcu_wait_add(&queue->waitqueue,