tests/unit: Remove urcu-signal unit tests
[userspace-rcu.git] / src / urcu-pointer.c
CommitLineData
acdb82a2
MJ
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
7e30abe3
MD
5
6/*
7e30abe3
MD
7 * library wrappers to be used by non-LGPL compatible source code.
8 *
7e30abe3
MD
9 * IBM's contributions to this file may be relicensed under LGPLv2 or later.
10 */
11
a2e7bf9c 12#include <urcu/uatomic.h>
49617de1 13
6cd23d47 14#include <urcu/static/pointer.h>
7e30abe3 15/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
6cd23d47 16#include <urcu/pointer.h>
7e30abe3
MD
17
18extern void synchronize_rcu(void);
19
2ff1db4a 20void *rcu_dereference_sym(void *p)
7e30abe3
MD
21{
22 return _rcu_dereference(p);
23}
24
25void *rcu_set_pointer_sym(void **p, void *v)
26{
d1854484 27 uatomic_store(p, v, CMM_RELEASE);
424d4ed5 28 return v;
7e30abe3
MD
29}
30
31void *rcu_xchg_pointer_sym(void **p, void *v)
32{
d1854484 33 return uatomic_xchg_mo(p, v, CMM_SEQ_CST);
7e30abe3
MD
34}
35
36void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
37{
d1854484 38 return uatomic_cmpxchg_mo(p, old, _new, CMM_SEQ_CST, CMM_RELAXED);
7e30abe3 39}
This page took 0.049083 seconds and 4 git commands to generate.