4 * Userspace RCU library - Concurrent Queue with Wait-Free Enqueue/Blocking Dequeue
6 * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 * Copyright 2011-2012 - Lai Jiangshan <laijs@cn.fujitsu.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
25 #include "urcu/wfcqueue.h"
26 #include "urcu/static/wfcqueue.h"
29 * library wrappers to be used by non-LGPL compatible source code.
32 void cds_wfcq_node_init(struct cds_wfcq_node
*node
)
34 _cds_wfcq_node_init(node
);
37 void cds_wfcq_init(struct cds_wfcq_head
*head
,
38 struct cds_wfcq_tail
*tail
)
40 _cds_wfcq_init(head
, tail
);
43 bool cds_wfcq_empty(struct cds_wfcq_head
*head
,
44 struct cds_wfcq_tail
*tail
)
47 return _cds_wfcq_empty(head
, tail
);
50 bool cds_wfcq_enqueue(struct cds_wfcq_head
*head
,
51 struct cds_wfcq_tail
*tail
,
52 struct cds_wfcq_node
*node
)
54 return _cds_wfcq_enqueue(head
, tail
, node
);
57 void cds_wfcq_dequeue_lock(struct cds_wfcq_head
*head
,
58 struct cds_wfcq_tail
*tail
)
60 _cds_wfcq_dequeue_lock(head
, tail
);
63 void cds_wfcq_dequeue_unlock(struct cds_wfcq_head
*head
,
64 struct cds_wfcq_tail
*tail
)
66 _cds_wfcq_dequeue_unlock(head
, tail
);
69 struct cds_wfcq_node
*cds_wfcq_dequeue_blocking(
70 struct cds_wfcq_head
*head
,
71 struct cds_wfcq_tail
*tail
)
73 return _cds_wfcq_dequeue_blocking(head
, tail
);
76 enum cds_wfcq_ret
cds_wfcq_splice_blocking(
77 struct cds_wfcq_head
*dest_q_head
,
78 struct cds_wfcq_tail
*dest_q_tail
,
79 struct cds_wfcq_head
*src_q_head
,
80 struct cds_wfcq_tail
*src_q_tail
)
82 return _cds_wfcq_splice_blocking(dest_q_head
, dest_q_tail
,
83 src_q_head
, src_q_tail
);
86 struct cds_wfcq_node
*__cds_wfcq_dequeue_blocking(
87 struct cds_wfcq_head
*head
,
88 struct cds_wfcq_tail
*tail
)
90 return ___cds_wfcq_dequeue_blocking(head
, tail
);
93 struct cds_wfcq_node
*__cds_wfcq_dequeue_nonblocking(
94 struct cds_wfcq_head
*head
,
95 struct cds_wfcq_tail
*tail
)
97 return ___cds_wfcq_dequeue_nonblocking(head
, tail
);
100 enum cds_wfcq_ret
__cds_wfcq_splice_blocking(
101 struct cds_wfcq_head
*dest_q_head
,
102 struct cds_wfcq_tail
*dest_q_tail
,
103 struct cds_wfcq_head
*src_q_head
,
104 struct cds_wfcq_tail
*src_q_tail
)
106 return ___cds_wfcq_splice_blocking(dest_q_head
, dest_q_tail
,
107 src_q_head
, src_q_tail
);
110 enum cds_wfcq_ret
__cds_wfcq_splice_nonblocking(
111 struct cds_wfcq_head
*dest_q_head
,
112 struct cds_wfcq_tail
*dest_q_tail
,
113 struct cds_wfcq_head
*src_q_head
,
114 struct cds_wfcq_tail
*src_q_tail
)
116 return ___cds_wfcq_splice_nonblocking(dest_q_head
, dest_q_tail
,
117 src_q_head
, src_q_tail
);
120 struct cds_wfcq_node
*__cds_wfcq_first_blocking(
121 struct cds_wfcq_head
*head
,
122 struct cds_wfcq_tail
*tail
)
124 return ___cds_wfcq_first_blocking(head
, tail
);
127 struct cds_wfcq_node
*__cds_wfcq_first_nonblocking(
128 struct cds_wfcq_head
*head
,
129 struct cds_wfcq_tail
*tail
)
131 return ___cds_wfcq_first_nonblocking(head
, tail
);
134 struct cds_wfcq_node
*__cds_wfcq_next_blocking(
135 struct cds_wfcq_head
*head
,
136 struct cds_wfcq_tail
*tail
,
137 struct cds_wfcq_node
*node
)
139 return ___cds_wfcq_next_blocking(head
, tail
, node
);
142 struct cds_wfcq_node
*__cds_wfcq_next_nonblocking(
143 struct cds_wfcq_head
*head
,
144 struct cds_wfcq_tail
*tail
,
145 struct cds_wfcq_node
*node
)
147 return ___cds_wfcq_next_nonblocking(head
, tail
, node
);
This page took 0.03127 seconds and 4 git commands to generate.