From nobody Wed Oct 06 19:46:50 2021 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9A3CA17E4BAA; Wed, 6 Oct 2021 19:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HPlMZ3sNyz4kkX; Wed, 6 Oct 2021 19:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CB5025FDE; Wed, 6 Oct 2021 19:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 196JkoKv041552; Wed, 6 Oct 2021 19:46:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 196JkokB041551; Wed, 6 Oct 2021 19:46:50 GMT (envelope-from git) Date: Wed, 6 Oct 2021 19:46:50 GMT Message-Id: <202110061946.196JkokB041551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 18b756a7e525 - stable/12 - atomic_fcmpset* return int, not the type of *. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 18b756a7e525e4bd6cd2aa8de86e4a48a583366a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=18b756a7e525e4bd6cd2aa8de86e4a48a583366a commit 18b756a7e525e4bd6cd2aa8de86e4a48a583366a Author: Warner Losh AuthorDate: 2018-12-14 19:14:51 +0000 Commit: Kyle Evans CommitDate: 2021-10-06 19:45:59 +0000 atomic_fcmpset* return int, not the type of *. fcmpset returns true/false as a int, so make the return types and variables match the int to be consistent with other arch. (cherry picked from commit 2fb9d3808a3a0a8939502600cde69b04550d1e7d) --- sys/mips/include/atomic.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/mips/include/atomic.h b/sys/mips/include/atomic.h index 3643375351f5..0e014cd57ac4 100644 --- a/sys/mips/include/atomic.h +++ b/sys/mips/include/atomic.h @@ -406,10 +406,10 @@ atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) return (atomic_cmpset_32(p, cmpval, newval)); } -static __inline uint32_t +static __inline int atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -429,7 +429,7 @@ atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) return ret; } -static __inline uint32_t +static __inline int atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { int retval; @@ -439,7 +439,7 @@ atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) return (retval); } -static __inline uint32_t +static __inline int atomic_fcmpset_rel_32(__volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) { mips_sync(); @@ -516,10 +516,10 @@ atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) return (atomic_cmpset_64(p, cmpval, newval)); } -static __inline uint32_t +static __inline int atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -540,7 +540,7 @@ atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) return ret; } -static __inline uint64_t +static __inline int atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { int retval; @@ -550,7 +550,7 @@ atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) return (retval); } -static __inline uint64_t +static __inline int atomic_fcmpset_rel_64(__volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) { mips_sync();