git: 4f8782840291 - main - riscv/atomic: Provide some additional aliases

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7a0e0d.404b4.60e16fe5__17388.0727890477$1786383901$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f87828402912a7e451fdbe53161c68faa489128

commit 4f87828402912a7e451fdbe53161c68faa489128
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-08-10 15:59:10 +0000
Commit:     Mark Johnston <[email protected]>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.