X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfqueue.c;h=09b858791d8a8babc0bff46741e188b423fd23ea;hp=0daee5dcf6d148b149b7773f752c8b6b01b20c08;hb=d4b99c015229978810319cfd42e1c9763772fad8;hpb=af7c2dbeac32c663b64ad05e4eca70e18784463b diff --git a/rculfqueue.c b/rculfqueue.c index 0daee5d..09b8587 100644 --- a/rculfqueue.c +++ b/rculfqueue.c @@ -21,8 +21,14 @@ */ #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 */ @@ -39,9 +45,15 @@ void cds_lfq_node_init_rcu(struct cds_lfq_node_rcu *node) } void cds_lfq_init_rcu(struct cds_lfq_queue_rcu *q, - void (*release)(struct urcu_ref *ref)) + void queue_call_rcu(struct rcu_head *head, + void (*func)(struct rcu_head *head))) +{ + _cds_lfq_init_rcu(q, queue_call_rcu); +} + +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)