git: atomic(9): Add relaxed load/store variants from FreeBSD

Aaron LI aly at crater.dragonflybsd.org
Sat Jan 13 23:33:37 PST 2024


commit d42a763b067d6e9f0805fbc592ed727cec49df2c
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Jan 14 15:27:33 2024 +0800

    atomic(9): Add relaxed load/store variants from FreeBSD
    
    Obtained from FreeBSD.  However, the original atomic_store_ptr() macro
    was causing '-Wcast-qual' warnings, so I changed it based on the
    NetBSD's atomic_store_relaxed().
    
    Actually, I found NetBSD's version more clean, but we import the FreeBSD
    version to help import code/drivers in the future.
    
    Discussed-with: dillon

Summary of changes:
 share/man/man9/atomic.9         |  27 +++++----
 sys/cpu/x86_64/include/atomic.h |   3 +-
 sys/sys/atomic_common.h         | 131 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 15 deletions(-)
 create mode 100644 sys/sys/atomic_common.h

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d42a763b067d6e9f0805fbc592ed727cec49df2c


-- 
DragonFly BSD source repository


More information about the Commits mailing list