From c97740a3b28836ade49d266e0ef1420f348b0b7d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 18 Aug 2010 09:16:08 -0400 Subject: [PATCH] RCU lf queue/stack: update comments Signed-off-by: Mathieu Desnoyers --- urcu/rculfqueue.h | 11 ++++++----- urcu/rculfstack.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/urcu/rculfqueue.h b/urcu/rculfqueue.h index 01c2092..d5c7428 100644 --- a/urcu/rculfqueue.h +++ b/urcu/rculfqueue.h @@ -113,11 +113,12 @@ void rcu_lfq_enqueue(struct rcu_lfq_queue *q, struct rcu_lfq_node *node) /* * The entry returned by dequeue must be taken care of by doing a urcu_ref_put, * which calls the release primitive when the reference count drops to zero. A - * grace period must be waited before performing the actual memory reclamation - * in the release primitive. - * 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). + * grace period must be waited after execution of the release callback before + * performing the actual memory reclamation or modifying the rcu_lfq_node + * structure. + * 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). */ struct rcu_lfq_node * rcu_lfq_dequeue(struct rcu_lfq_queue *q, void (*release)(struct urcu_ref *)) diff --git a/urcu/rculfstack.h b/urcu/rculfstack.h index f80c7fe..8cf7d13 100644 --- a/urcu/rculfstack.h +++ b/urcu/rculfstack.h @@ -73,7 +73,7 @@ void rcu_lfs_push(struct rcu_lfs_stack *s, struct rcu_lfs_node *node) /* * The caller must wait for a grace period to pass before freeing the returned - * node. + * node or modifying the rcu_lfs_node structure. * Returns NULL if stack is empty. */ struct rcu_lfs_node * -- 2.34.1