uatomic/x86: Remove redundant memory barriers
[urcu.git] / include / urcu / arch / aarch64.h
1 // SPDX-FileCopyrightText: 2010 Paul E. McKenney, IBM Corporation.
2 // SPDX-FileCopyrightText: 2009-2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 //
4 // SPDX-License-Identifier: LGPL-2.1-or-later
5
6 #ifndef _URCU_ARCH_AARCH64_H
7 #define _URCU_ARCH_AARCH64_H
8
9 /*
10 * arch/aarch64.h: definitions for aarch64 architecture
11 */
12
13 #include <urcu/compiler.h>
14 #include <urcu/config.h>
15 #include <urcu/syscall-compat.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 #include <stdlib.h>
22 #include <sys/time.h>
23
24 /*
25 * On Linux, define the membarrier system call number if not yet available in
26 * the system headers. aarch64 implements asm-generic/unistd.h system call
27 * numbers.
28 */
29 #if (defined(__linux__) && !defined(__NR_membarrier))
30 #define __NR_membarrier 283
31 #endif
32
33 /*
34 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
35 *
36 * Backported in RHEL7 gcc 4.8.5-11
37 */
38 #if defined(URCU_GCC_VERSION) && defined(__GNUC_RH_RELEASE__)
39 # if (URCU_GCC_VERSION == 40805) && (__GNUC_RH_RELEASE__ >= 11)
40 # define URCU_GCC_PATCHED_63293
41 # endif
42 #endif
43
44 #ifdef URCU_GCC_VERSION
45 # if URCU_GCC_VERSION < 50100 && !defined(URCU_GCC_PATCHED_63293)
46 # error Your gcc version performs unsafe access to deallocated stack
47 # endif
48 #endif
49
50 #define caa_cpu_relax() __asm__ __volatile__ ("yield" : : : "memory")
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #include <urcu/arch/generic.h>
57
58 #endif /* _URCU_ARCH_AARCH64_H */
This page took 0.033051 seconds and 5 git commands to generate.