X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=rculfqueue.c;h=c579e75a759e4e25d0f1780ecabd5c0b1bcd3e2a;hb=7618919ae496bda84a2efa4f2ad0abe569892a9e;hp=c8445256d09dc7e2534992a683592942c2e1259c;hpb=d9b52143813e104eeee1e3d90061042230b7b5bf;p=userspace-rcu.git diff --git a/rculfqueue.c b/rculfqueue.c index c844525..c579e75 100644 --- a/rculfqueue.c +++ b/rculfqueue.c @@ -21,13 +21,19 @@ */ #define _LGPL_SOURCE -/* Use the urcu symbols to select the appropriate rcu flavor at link time */ -#include "urcu.h" + +#ifdef RCU_QSBR +# include "urcu-qsbr.h" +#elif defined(RCU_BP) +# include "urcu-bp.h" +#else +# include "urcu.h" +#endif #undef _LGPL_SOURCE /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ #include "urcu/rculfqueue.h" -#include "urcu/rculfqueue-static.h" +#include "urcu/static/rculfqueue.h" /* * library wrappers to be used by non-LGPL compatible source code. @@ -38,10 +44,14 @@ 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 (*release)(struct urcu_ref *ref)) +void cds_lfq_init_rcu(struct cds_lfq_queue_rcu *q) +{ + _cds_lfq_init_rcu(q); +} + +int cds_lfq_destroy_rcu(struct cds_lfq_queue_rcu *q) { - _cds_lfq_init_rcu(q, release); + return _cds_lfq_destroy_rcu(q); } void cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu *node)