abe73d4623ce06d69821d8fc7cd6fa28befc0810
1 // SPDX-FileCopyrightText: 2018 Michael Jeanson <mjeanson@efficios.com>
3 // SPDX-License-Identifier: MIT
6 * Atomic exchange operations for the RISC-V architecture.
8 * Let the compiler do it.
11 #ifndef _URCU_ARCH_UATOMIC_RISCV_H
12 #define _URCU_ARCH_UATOMIC_RISCV_H
14 #include <urcu/compiler.h>
15 #include <urcu/system.h>
18 * See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104831> for details.
20 * The following GCC patches are required to have a working Userspace RCU on
21 * the RISC-V architecture. The were introduced in GCC 14 and backported to
24 * - <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=dcd7b2f5f7233a04c8b14b362d0befa76e9654c0>
25 * - <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4990cf84c460f064d6281d0813f20b0ef20c7448>
26 * - <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d199d2e56da2379004e7e0457150409c0c99d3e6>
28 #ifdef URCU_GCC_VERSION
29 # if (URCU_GCC_VERSION < 130300)
30 # error "Implementations of some atomic operations of GCC < 13.3.0 for RISC-V are insufficient for sequential consistency. For this reason Userspace RCU is currently marked as 'broken' for RISC-V on these GCC versions."
38 #define UATOMIC_HAS_ATOMIC_BYTE
39 #define UATOMIC_HAS_ATOMIC_SHORT
45 #include <urcu/uatomic/generic.h>
47 #endif /* _URCU_ARCH_UATOMIC_RISCV_H */
This page took 0.034654 seconds and 5 git commands to generate.