X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfqueue.c;h=38eddcf3a4283c2b86d2d66ee5604bf3a57b2213;hp=508e05c1a271e2eadda37da85f3b259d526ed991;hb=92af1a30ca6a70945b167c31631c8598a626c71a;hpb=16aa9ee87cf4364921c36025359be01390338d87 diff --git a/rculfqueue.c b/rculfqueue.c index 508e05c..38eddcf 100644 --- a/rculfqueue.c +++ b/rculfqueue.c @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* Use the urcu symbols to select the appropriate rcu flavor at link time */ -#include "urcu.h" /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#undef _LGPL_SOURCE #include "urcu/rculfqueue.h" -#include "urcu/rculfqueue-static.h" +#define _LGPL_SOURCE +#include "urcu/static/rculfqueue.h" /* * library wrappers to be used by non-LGPL compatible source code. @@ -35,9 +35,16 @@ void cds_lfq_node_init_rcu(struct cds_lfq_node_rcu *node) _cds_lfq_node_init_rcu(node); } -void cds_lfq_init_rcu(struct cds_lfq_queue_rcu *q) +void cds_lfq_init_rcu(struct cds_lfq_queue_rcu *q, + void queue_call_rcu(struct rcu_head *head, + void (*func)(struct rcu_head *head))) { - _cds_lfq_init_rcu(q); + _cds_lfq_init_rcu(q, queue_call_rcu); +} + +int cds_lfq_destroy_rcu(struct cds_lfq_queue_rcu *q) +{ + return _cds_lfq_destroy_rcu(q); } void cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu *node) @@ -46,7 +53,7 @@ void cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu *n } struct cds_lfq_node_rcu * -cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q, void (*release)(struct urcu_ref *)) +cds_lfq_dequeue_rcu(struct cds_lfq_queue_rcu *q) { - return _cds_lfq_dequeue_rcu(q, release); + return _cds_lfq_dequeue_rcu(q); }