From owner-svn-src-head@freebsd.org Fri Dec 14 19:14: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 39A93130A0E5; Fri, 14 Dec 2018 19:14:52 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D36458D017; Fri, 14 Dec 2018 19:14:51 +0000 (UTC) (envelope-from imp@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 C51543E90; Fri, 14 Dec 2018 19:14:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBEJEpnj044241; Fri, 14 Dec 2018 19:14:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEJEp3W044240; Fri, 14 Dec 2018 19:14:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812141914.wBEJEp3W044240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 14 Dec 2018 19:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342094 - head/sys/mips/include X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/mips/include X-SVN-Commit-Revision: 342094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D36458D017 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.84 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.88)[-0.883,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 14 Dec 2018 19:14:52 -0000 Author: imp Date: Fri Dec 14 19:14:51 2018 New Revision: 342094 URL: https://svnweb.freebsd.org/changeset/base/342094 Log: 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. Reviewed by: cognet@ Differential Revision: https://reviews.freebsd.org/D18557 Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Fri Dec 14 18:50:32 2018 (r342093) +++ head/sys/mips/include/atomic.h Fri Dec 14 19:14:51 2018 (r342094) @@ -392,10 +392,10 @@ atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t 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" @@ -415,7 +415,7 @@ atomic_fcmpset_32(__volatile uint32_t *p, uint32_t *cm 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; @@ -425,7 +425,7 @@ atomic_fcmpset_acq_32(__volatile uint32_t *p, uint32_t 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(); @@ -502,10 +502,10 @@ atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t 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" @@ -526,7 +526,7 @@ atomic_fcmpset_64(__volatile uint64_t *p, uint64_t *cm 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; @@ -536,7 +536,7 @@ atomic_fcmpset_acq_64(__volatile uint64_t *p, uint64_t 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();