Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2018 18:56:51 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337433 - head/sys/riscv/include
Message-ID:  <201808071856.w77IupF9097802@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Tue Aug  7 18:56:51 2018
New Revision: 337433
URL: https://svnweb.freebsd.org/changeset/base/337433

Log:
  Implement atomic_swap_{int,long,ptr}(9).

Modified:
  head/sys/riscv/include/atomic.h

Modified: head/sys/riscv/include/atomic.h
==============================================================================
--- head/sys/riscv/include/atomic.h	Tue Aug  7 18:56:01 2018	(r337432)
+++ head/sys/riscv/include/atomic.h	Tue Aug  7 18:56:51 2018	(r337433)
@@ -412,6 +412,8 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val)
 	return (old);
 }
 
+#define	atomic_swap_int			atomic_swap_32
+
 #define	atomic_add_long			atomic_add_64
 #define	atomic_clear_long		atomic_clear_64
 #define	atomic_cmpset_long		atomic_cmpset_64
@@ -420,6 +422,7 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val)
 #define	atomic_readandclear_long	atomic_readandclear_64
 #define	atomic_set_long			atomic_set_64
 #define	atomic_subtract_long		atomic_subtract_64
+#define	atomic_swap_long		atomic_swap_64
 
 #define	atomic_add_ptr			atomic_add_64
 #define	atomic_clear_ptr		atomic_clear_64
@@ -429,6 +432,7 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val)
 #define	atomic_readandclear_ptr		atomic_readandclear_64
 #define	atomic_set_ptr			atomic_set_64
 #define	atomic_subtract_ptr		atomic_subtract_64
+#define	atomic_swap_ptr			atomic_swap_64
 
 ATOMIC_ACQ_REL(set, 64)
 ATOMIC_ACQ_REL(clear, 64)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808071856.w77IupF9097802>