uatomic/x86: Remove redundant memory barriers
[urcu.git] / src / lfstack.c
CommitLineData
acdb82a2
MJ
1// SPDX-FileCopyrightText: 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
d3bfcb24 5/*
d3bfcb24 6 * Userspace RCU library - Lock-Free Stack
d3bfcb24
MD
7 */
8
9/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
10#undef _LGPL_SOURCE
11#include "urcu/lfstack.h"
12#define _LGPL_SOURCE
13#include "urcu/static/lfstack.h"
14
15/*
16 * library wrappers to be used by non-LGPL compatible source code.
17 */
18
19void cds_lfs_node_init(struct cds_lfs_node *node)
20{
21 _cds_lfs_node_init(node);
22}
23
24void cds_lfs_init(struct cds_lfs_stack *s)
25{
26 _cds_lfs_init(s);
27}
28
200d100e
MD
29void cds_lfs_destroy(struct cds_lfs_stack *s)
30{
31 _cds_lfs_destroy(s);
32}
33
48a8832b
MD
34void __cds_lfs_init(struct __cds_lfs_stack *s)
35{
36 ___cds_lfs_init(s);
37}
38
39bool cds_lfs_empty(cds_lfs_stack_ptr_t s)
7294103b
MD
40{
41 return _cds_lfs_empty(s);
42}
43
48a8832b 44bool cds_lfs_push(cds_lfs_stack_ptr_t s, struct cds_lfs_node *node)
d3bfcb24
MD
45{
46 return _cds_lfs_push(s, node);
47}
48
7294103b
MD
49struct cds_lfs_node *cds_lfs_pop_blocking(struct cds_lfs_stack *s)
50{
51 return _cds_lfs_pop_blocking(s);
52}
53
54struct cds_lfs_head *cds_lfs_pop_all_blocking(struct cds_lfs_stack *s)
55{
56 return _cds_lfs_pop_all_blocking(s);
57}
58
59void cds_lfs_pop_lock(struct cds_lfs_stack *s)
60{
61 _cds_lfs_pop_lock(s);
62}
63
64void cds_lfs_pop_unlock(struct cds_lfs_stack *s)
65{
66 _cds_lfs_pop_unlock(s);
67}
68
48a8832b 69struct cds_lfs_node *__cds_lfs_pop(cds_lfs_stack_ptr_t s)
7294103b
MD
70{
71 return ___cds_lfs_pop(s);
72}
73
48a8832b 74struct cds_lfs_head *__cds_lfs_pop_all(cds_lfs_stack_ptr_t s)
d3bfcb24 75{
7294103b 76 return ___cds_lfs_pop_all(s);
d3bfcb24 77}
This page took 0.040932 seconds and 4 git commands to generate.