git: 4f8782840291 - main - riscv/atomic: Provide some additional aliases
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Aug 2026 17:44:45 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=4f87828402912a7e451fdbe53161c68faa489128
commit 4f87828402912a7e451fdbe53161c68faa489128
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-08-10 15:59:10 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-08-10 17:44:36 +0000
riscv/atomic: Provide some additional aliases
These are already available and having them defined helps keep the KASAN
atomic(9) interceptors uniform.
Reviewed by: mhorne
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58680
---
sys/riscv/include/atomic.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h
index c90cb02c482c..7d21966102ac 100644
--- a/sys/riscv/include/atomic.h
+++ b/sys/riscv/include/atomic.h
@@ -106,6 +106,7 @@ atomic_fcmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \
ATOMIC_CMPSET_ACQ_REL(8);
ATOMIC_FCMPSET_ACQ_REL(8);
+#define atomic_load_acq_char atomic_load_acq_8
#define atomic_cmpset_char atomic_cmpset_8
#define atomic_cmpset_acq_char atomic_cmpset_acq_8
#define atomic_cmpset_rel_char atomic_cmpset_rel_8
@@ -302,6 +303,8 @@ atomic_testandset_32(volatile uint32_t *p, u_int val)
#define atomic_readandclear_int atomic_readandclear_32
#define atomic_set_int atomic_set_32
#define atomic_subtract_int atomic_subtract_32
+#define atomic_testandclear_int atomic_testandclear_32
+#define atomic_testandset_int atomic_testandset_32
ATOMIC_ACQ_REL(set, 32)
ATOMIC_ACQ_REL(clear, 32)