From nobody Mon Aug 08 14:04:10 2022 X-Original-To: dev-commits-src-all@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 4M1dGz1YfHz4Y4bS; Mon, 8 Aug 2022 14:04:11 +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 4M1dGz10MJz3tT7; Mon, 8 Aug 2022 14:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659967451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgwLS+VcOdvk3ClW0rvRmpC7SuY/Qe8gbvYpQe7BdQU=; b=bW+Roio0UfcXFMpngvfxO3CysnDYKiEic7kq2g9vQmJpZOYfV2n7topyMMObb7i4OKJUYO bwkPcrrwt87zKXpaACKDumQNFauFCU5LvlWc+5LIfMV9/bPNljRSvke1yYG2QW5/oqnSxt +x5Qhbfdjq9BQj9hYJGX79LfjztYv4a50x+W2F2MRBOtOXn6GSBZ8Az6L7mDERnYoVS1y7 FxXUnn7qnKsuAV8LCx2d5450DB75NZSMwGwoj2oMg0b/mI0XCh+noKQDXZHgXOPihJBnYg ufauBlb+aw+4DNt1/ZjLhb+S4onvIJbKqJzhKCOI0tk9aNjJoZWwORwkBpdasQ== 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 4M1dGz0317ztgT; Mon, 8 Aug 2022 14:04:11 +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 278E4A1r088658; Mon, 8 Aug 2022 14:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 278E4ADf088657; Mon, 8 Aug 2022 14:04:10 GMT (envelope-from git) Date: Mon, 8 Aug 2022 14:04:10 GMT Message-Id: <202208081404.278E4ADf088657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 6be89cc88d63 - main - linuxkpi: atomic: Add atomic_fetch_inc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6be89cc88d63263b51bfb0271e2119cccbc86f16 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659967451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgwLS+VcOdvk3ClW0rvRmpC7SuY/Qe8gbvYpQe7BdQU=; b=fuprjm2kJayeKF0hnxqon063u8szTE62NQfVBHD1tzISr7VHba//n252VNSLALZxZAvzXj PzwLBQpRD+MiEoSLrq6m3z+qAlVZkjUHoLy92HMXNJ5BQfFyUVD1V8ocHy7NqhkYpWcRrZ BnvMIDOMyVhE+EiABfAjaNIHogfDShwu7KdiShGWciiTAu0JEuMzOPcI4PfvvRKmwGZogl yv6P/FUb4USivpNxh6Z9qrhdPUazNEr7uF4F38dqck/1xncQmo/RvztdH5K8iqIp7q9oNh INz/uKUCe1cW2k/2v0yJY83JrzLQZeYqpyqToshFFURoGJdcytvvuX8BS02Wgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659967451; a=rsa-sha256; cv=none; b=pBGFXS4xGh0D+DoGBCS9mfvjMtQYfDW2J6I5s6voMD/xT7vGR+xaa7dJTk4dY8ioxbt3ej GKe9x/oBrQnIP8FLOqgPAQAOFFhQYpeZBZNPTW/xG2aEax2zcZ2uqw1abko4VNEks0WbYY I4bdd/UBrbCDXXcwLp8HO6A2ZIq7EUwH2OkOxTaKBzDjA2A0n42vivevULXkewi3UBSZBO l5QA216kdnK1Heuc3ezw3LdLE5TxME9ftBCf777LVM7g9jCGfQdF2q4QzpioMnhDuALqTP gcA7jGg6nQard8JW9l1qz5QT9bKJQEDbZiu5P9qqYbvLbexWNHMiIQ4Y7cZEug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6be89cc88d63263b51bfb0271e2119cccbc86f16 commit 6be89cc88d63263b51bfb0271e2119cccbc86f16 Author: Emmanuel Vadot AuthorDate: 2022-07-26 08:00:42 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-08 13:22:34 +0000 linuxkpi: atomic: Add atomic_fetch_inc Reviewed by: hselasky Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35936 --- sys/compat/linuxkpi/common/include/asm/atomic.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/atomic.h b/sys/compat/linuxkpi/common/include/asm/atomic.h index 8c201ad6a101..7c7a2c4d4b92 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic.h @@ -307,6 +307,13 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \ return (c); \ } +static inline int +atomic_fetch_inc(atomic_t *v) +{ + + return ((atomic_inc_return(v) - 1)); +} + LINUX_ATOMIC_OP(or, |) LINUX_ATOMIC_OP(and, &) LINUX_ATOMIC_OP(andnot, &~)