| 1 | // SPDX-FileCopyrightText: 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 2 | // |
| 3 | // SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 | |
| 5 | /* |
| 6 | * Userspace RCU library - Queue with Wait-Free Enqueue/Blocking Dequeue |
| 7 | */ |
| 8 | |
| 9 | /* Remove deprecation warnings from LGPL wrapper build. */ |
| 10 | #define CDS_WFQ_DEPRECATED |
| 11 | |
| 12 | /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ |
| 13 | #include "urcu/wfqueue.h" |
| 14 | #include "urcu/static/wfqueue.h" |
| 15 | |
| 16 | /* |
| 17 | * library wrappers to be used by non-LGPL compatible source code. |
| 18 | */ |
| 19 | |
| 20 | void cds_wfq_node_init(struct cds_wfq_node *node) |
| 21 | { |
| 22 | _cds_wfq_node_init(node); |
| 23 | } |
| 24 | |
| 25 | void cds_wfq_init(struct cds_wfq_queue *q) |
| 26 | { |
| 27 | _cds_wfq_init(q); |
| 28 | } |
| 29 | |
| 30 | void cds_wfq_destroy(struct cds_wfq_queue *q) |
| 31 | { |
| 32 | _cds_wfq_destroy(q); |
| 33 | } |
| 34 | |
| 35 | void cds_wfq_enqueue(struct cds_wfq_queue *q, struct cds_wfq_node *node) |
| 36 | { |
| 37 | _cds_wfq_enqueue(q, node); |
| 38 | } |
| 39 | |
| 40 | struct cds_wfq_node *__cds_wfq_dequeue_blocking(struct cds_wfq_queue *q) |
| 41 | { |
| 42 | return ___cds_wfq_dequeue_blocking(q); |
| 43 | } |
| 44 | |
| 45 | struct cds_wfq_node *cds_wfq_dequeue_blocking(struct cds_wfq_queue *q) |
| 46 | { |
| 47 | return _cds_wfq_dequeue_blocking(q); |
| 48 | } |