X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Frculfqueue.h;h=01c2092610350155247b87cadd6149aa3b26b4b1;hp=09e5d41ea0db7b7f40032419b070ed55daecdfdd;hb=0e2e9380d93d73c246abdeef52c7a97b01deecca;hpb=23086b720b7edf8b402f22a899568bc6cbcb8235 diff --git a/urcu/rculfqueue.h b/urcu/rculfqueue.h index 09e5d41..01c2092 100644 --- a/urcu/rculfqueue.h +++ b/urcu/rculfqueue.h @@ -1,3 +1,6 @@ +#ifndef _URCU_RCULFQUEUE_H +#define _URCU_RCULFQUEUE_H + /* * rculfqueue.h * @@ -23,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 @@ -108,8 +115,9 @@ void rcu_lfq_enqueue(struct rcu_lfq_queue *q, struct rcu_lfq_node *node) * 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 re-used before the - * reference count reaches zero. + * 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 *)) @@ -137,3 +145,9 @@ rcu_lfq_dequeue(struct rcu_lfq_queue *q, void (*release)(struct urcu_ref *)) } } } + +#ifdef __cplusplus +} +#endif + +#endif /* _URCU_RCULFQUEUE_H */