From: Mathieu Desnoyers Date: Tue, 13 Jul 2010 21:12:49 +0000 (-0400) Subject: RCU wait-free stack: add _blocking in pop() primitive name X-Git-Tag: v0.4.7~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7ab587e26cf2474852b1f19189a958c31a5c6980;p=urcu.git RCU wait-free stack: add _blocking in pop() primitive name Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_wfs.c b/tests/test_urcu_wfs.c index 4802ee7..73655c1 100644 --- a/tests/test_urcu_wfs.c +++ b/tests/test_urcu_wfs.c @@ -218,7 +218,7 @@ void *thr_dequeuer(void *_count) smp_mb(); for (;;) { - struct rcu_wfs_node *node = rcu_wfs_pop(&s); + struct rcu_wfs_node *node = rcu_wfs_pop_blocking(&s); if (node) { defer_rcu(free, node); @@ -249,7 +249,7 @@ void test_end(struct rcu_wfs_stack *s, unsigned long long *nr_dequeues) struct rcu_wfs_node *node; do { - node = rcu_wfs_pop(s); + node = rcu_wfs_pop_blocking(s); if (node) { free(node); (*nr_dequeues)++; diff --git a/urcu/rcuwfstack.h b/urcu/rcuwfstack.h index f9a45b2..300c95e 100644 --- a/urcu/rcuwfstack.h +++ b/urcu/rcuwfstack.h @@ -29,7 +29,7 @@ #error "Dynamic loader LGPL wrappers not implemented yet" #endif -#define RCU_WF_STACK_END ((void *)0x1UL) +#define RCU_WF_STACK_END ((void *)0x1UL) struct rcu_wfs_node { struct rcu_wfs_node *next; @@ -83,7 +83,7 @@ void rcu_wfs_push(struct rcu_wfs_stack *s, struct rcu_wfs_node *node) * loops. Better for UP. */ struct rcu_wfs_node * -rcu_wfs_pop(struct rcu_wfs_stack *s) +rcu_wfs_pop_blocking(struct rcu_wfs_stack *s) { for (;;) { struct rcu_wfs_node *head;