src: use SPDX identifiers
[urcu.git] / src / urcu-pointer.c
1 // SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 // SPDX-FileCopyrightText: 2009 Paul E. McKenney, IBM Corporation.
3 //
4 // SPDX-License-Identifier: LGPL-2.1-or-later
5
6 /*
7 * library wrappers to be used by non-LGPL compatible source code.
8 *
9 * IBM's contributions to this file may be relicensed under LGPLv2 or later.
10 */
11
12 #include <urcu/uatomic.h>
13
14 #include <urcu/static/pointer.h>
15 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
16 #include <urcu/pointer.h>
17
18 extern void synchronize_rcu(void);
19
20 void *rcu_dereference_sym(void *p)
21 {
22 return _rcu_dereference(p);
23 }
24
25 void *rcu_set_pointer_sym(void **p, void *v)
26 {
27 cmm_wmb();
28 uatomic_set(p, v);
29 return v;
30 }
31
32 void *rcu_xchg_pointer_sym(void **p, void *v)
33 {
34 cmm_wmb();
35 return uatomic_xchg(p, v);
36 }
37
38 void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
39 {
40 cmm_wmb();
41 return uatomic_cmpxchg(p, old, _new);
42 }
This page took 0.030878 seconds and 5 git commands to generate.