From owner-svn-src-head@freebsd.org Mon Aug 6 09:44:55 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 31BEA1051A3A; Mon, 6 Aug 2018 09:44:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFC267148A; Mon, 6 Aug 2018 09:44:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 47DEB2601B1; Mon, 6 Aug 2018 11:44:53 +0200 (CEST) Subject: Re: svn commit: r337374 - head/sys/compat/linuxkpi/common/include/asm To: Mateusz Guzik Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808060840.w768e2gl023307@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <2cbeb61b-6d24-84ed-e9d4-5d91a79cbf05@selasky.org> Date: Mon, 6 Aug 2018 11:44:32 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Mon, 06 Aug 2018 09:44:55 -0000 On 08/06/18 11:33, Mateusz Guzik wrote: > This code is seriously inferior to atomic_fcmpset_long, which happens to > return the found value just like the linux atomic_long_cmpxchg would. > > The atomic_cmpset_* primitives should not be used if the target value is to > be inspected. Hi, The LinuxKPI has already has few places of atomic_cmpset_* currently. Can I assume that atomic_fcmpset_* is available for all platforms where atomic_cmpset_* is available? --HPS