From owner-svn-src-head@freebsd.org Tue Aug 7 18:56:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 557CC1067C91; Tue, 7 Aug 2018 18:56:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AB747C500; Tue, 7 Aug 2018 18:56:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFCD31FBE3; Tue, 7 Aug 2018 18:56:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w77IupEt097803; Tue, 7 Aug 2018 18:56:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w77IupF9097802; Tue, 7 Aug 2018 18:56:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201808071856.w77IupF9097802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 7 Aug 2018 18:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337433 - head/sys/riscv/include X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/riscv/include X-SVN-Commit-Revision: 337433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2018 18:56:52 -0000 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)