X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Frculfqueue.h;h=d5c74288831d32e810a045fc068c668e7d60347f;hp=b712998c07a929cfa5d49da370bd0c676c72ecdb;hb=eaf2c3f4b9041d2a6a85d7f9e56f6014603367d4;hpb=c91b00b73226a431d5f7d8e262950fd3e83f40f1 diff --git a/urcu/rculfqueue.h b/urcu/rculfqueue.h index b712998..d5c7428 100644 --- a/urcu/rculfqueue.h +++ b/urcu/rculfqueue.h @@ -26,6 +26,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #if (!defined(_GNU_SOURCE) && !defined(_LGPL_SOURCE)) #error "Dynamic loader LGPL wrappers not implemented yet" #endif @@ -109,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 *)) @@ -142,4 +147,8 @@ rcu_lfq_dequeue(struct rcu_lfq_queue *q, void (*release)(struct urcu_ref *)) } } +#ifdef __cplusplus +} +#endif + #endif /* _URCU_RCULFQUEUE_H */