From: Mathieu Desnoyers Date: Fri, 10 Jun 2011 00:42:26 +0000 (-0400) Subject: lfqueue: update comments, cleanup X-Git-Tag: v0.6.0~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a34df756f236349fc574f05ed3cf41c1c77771c6;p=userspace-rcu.git lfqueue: update comments, cleanup Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/rculfqueue-static.h b/urcu/rculfqueue-static.h index be6a4bc..410a4cf 100644 --- a/urcu/rculfqueue-static.h +++ b/urcu/rculfqueue-static.h @@ -109,14 +109,13 @@ void _cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, * Should be called under rcu read lock critical section. * * The entry returned by dequeue must be taken care of by doing a - * urcu_ref_put after a grace period passes. + * sequence of urcu_ref_put which release handler should do a call_rcu. * * In other words, the entry lfq node returned by dequeue must not be * modified/re-used/freed until the reference count reaches zero and a grace * period has elapsed. */ -struct cds_lfq_node_rcu * -_cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q) +struct cds_lfq_node_rcu *_cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q) { for (;;) { struct cds_lfq_node_rcu *head, *next; diff --git a/urcu/rculfqueue.h b/urcu/rculfqueue.h index 55f15f8..fa54ca5 100644 --- a/urcu/rculfqueue.h +++ b/urcu/rculfqueue.h @@ -59,7 +59,7 @@ struct cds_lfq_queue_rcu { #include -#define cds_lfq_node_init_rcu _cds_lfq_node_init_rcu +#define cds_lfq_node_init_rcu _cds_lfq_node_init_rcu #define cds_lfq_init_rcu _cds_lfq_init_rcu #define cds_lfq_enqueue_rcu _cds_lfq_enqueue_rcu #define cds_lfq_dequeue_rcu _cds_lfq_dequeue_rcu @@ -80,15 +80,14 @@ extern void cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, * Should be called under rcu read lock critical section. * * The entry returned by dequeue must be taken care of by doing a - * urcu_delayed_ref_put, which calls the release primitive after the - * reference count drops to zero _and_ a following grace period passes. + * sequence of urcu_ref_put which release handler should do a call_rcu. * * In other words, the entry lfq node returned by dequeue must not be * modified/re-used/freed until the reference count reaches zero and a grace * period has elapsed (after the refcount reached 0). */ -extern struct cds_lfq_node_rcu * -cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q); +extern +struct cds_lfq_node_rcu *cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q); #endif /* !_LGPL_SOURCE */