From owner-svn-src-head@freebsd.org Fri Dec 14 19:48:43 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 A617F130B50A; Fri, 14 Dec 2018 19:48:43 +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 358168E408; Fri, 14 Dec 2018 19:48:43 +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 238DE441F; Fri, 14 Dec 2018 19:48:43 +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 wBEJmgr9060301; Fri, 14 Dec 2018 19:48:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBEJmg4K060300; Fri, 14 Dec 2018 19:48:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201812141948.wBEJmg4K060300@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:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342095 - 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: 342095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 358168E408 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.88)[-0.883,0] 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:48:44 -0000 Author: imp Date: Fri Dec 14 19:48:42 2018 New Revision: 342095 URL: https://svnweb.freebsd.org/changeset/base/342095 Log: atomic_cmpset return value is also an int. Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Fri Dec 14 19:14:51 2018 (r342094) +++ head/sys/mips/include/atomic.h Fri Dec 14 19:48:42 2018 (r342095) @@ -348,10 +348,10 @@ ATOMIC_STORE_LOAD(64) * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint32_t +static __inline int atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { - uint32_t ret; + int ret; __asm __volatile ( "1:\tll %0, %4\n\t" /* load old value */ @@ -375,7 +375,7 @@ atomic_cmpset_32(__volatile uint32_t *p, uint32_t cmpv * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint32_t +static __inline int atomic_cmpset_acq_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { int retval; @@ -385,7 +385,7 @@ atomic_cmpset_acq_32(__volatile uint32_t *p, uint32_t return (retval); } -static __inline uint32_t +static __inline int atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { mips_sync(); @@ -457,10 +457,10 @@ atomic_fetchadd_32(__volatile uint32_t *p, uint32_t v) * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint64_t +static __inline int atomic_cmpset_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { - uint64_t ret; + int ret; __asm __volatile ( "1:\n\t" @@ -485,7 +485,7 @@ atomic_cmpset_64(__volatile uint64_t *p, uint64_t cmpv * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline uint64_t +static __inline int atomic_cmpset_acq_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { int retval; @@ -495,7 +495,7 @@ atomic_cmpset_acq_64(__volatile uint64_t *p, uint64_t return (retval); } -static __inline uint64_t +static __inline int atomic_cmpset_rel_64(__volatile uint64_t *p, uint64_t cmpval, uint64_t newval) { mips_sync();