From nobody Tue Aug 06 04:06:35 2024 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 4WdKVz6jD1z5SbT6; Tue, 06 Aug 2024 04:06:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKVz65h9z4kBd; Tue, 6 Aug 2024 04:06:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917195; 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=L0SCShTUwHO19Ua0eISUuzX3DEzBRCNLUeB3whw++us=; b=BFHBf1svUDEa4PAWGAJDx00uccrNkpOEn+qJlP7JLeaa/94VUgq307EiLPXuyW+GmAqFJj D/LhR7SUhTjYo8+ENkyDHGYt9dgBjyjcrbFuh55Ag/0tOVFKPOaTI/eUzGjQM6EM0do6vx MsihqBidOh1SUb05VW4injVJwG5w2hBcAQZkD/SB9TuAHiNsspEYYd7+UWWmHyWxDXJn5R k1UTOTsxAJ+vlf/XGh51+V0OKjAMk5FTE+JZ28A41QQ641KVlN3RD/WOjXep/+d+GnvOiD /l0lvxYPzZXOXceAUstGfh2EQfbkY2Qq1sUFn2UWy8+A6L8wuTYL4T67hOovgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917195; a=rsa-sha256; cv=none; b=QBaTJr87qZ6sD/zPiEXCrv55mK2QQaa+TaABkw28yqQBMmmCHkxIDgUCFHwyQR5tAlalTs uXd3orwDppY74PTVugRurCZaOaqES38nUQAvB31HemNL5zrXm3DTA2pQ7hI5gzUDzycU5o /1fwqtC63ju80oHU7waB2zb5W0i4CnG0VaireK8jE9GmPXZaY38rvThNxCdwkcq8KIevC4 Jk0tvRkzRbA+czLLt8s82N6/Ec3TPtgtzwpZdk4eIm9kto7o99XZm+tRlxVmA4kWTfrUja yh1Owx6aWtVCjtzCfSCNU6OOTtlU+ZFekq5OBSjenPLyegUBxGlN4ujArSf+FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917195; 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=L0SCShTUwHO19Ua0eISUuzX3DEzBRCNLUeB3whw++us=; b=IIoQ01R1UD3qz/qoanmcnhfHgMOd6MNUkPoxYzZth2wNuSxzCKOaVRstEvUUx29zJl9e4d jQh9QDWhei6dcFPt59r59s3T5xdpJLsa+4ROd4wYa7MrOCFy4XdAA+JmAtqeeD4XlFWyv9 TIbO8dIizET7QaLFgYkrS1u0c68t/skKX4ftzovPhpKq574ql2VzLz6D9pQnmKZpBsTMck 9wVR7EUml+FeKXoO2yo7l6JdYR+WMgUIBjTKpsDfwAu0irQkCxRjkZLtmkBS9SoI/MdzRp EfaRFIJXhj5mnnBZJ9Xl/wt0+GGS//pAXjq0U8NYMBFeSz2s5tgF3yx14h3vMg== 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 4WdKVz5k87zrb2; Tue, 6 Aug 2024 04:06:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47646Zrh004568; Tue, 6 Aug 2024 04:06:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646ZRw004565; Tue, 6 Aug 2024 04:06:35 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:35 GMT Message-Id: <202408060406.47646ZRw004565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6c32d89ecabe - main - kern_rangelock.c: add rl_e_is_rlock() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c32d89ecabeba8fe5ad79a33aa134412175856e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c32d89ecabeba8fe5ad79a33aa134412175856e commit 6c32d89ecabeba8fe5ad79a33aa134412175856e Author: Konstantin Belousov AuthorDate: 2023-08-18 17:59:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 kern_rangelock.c: add rl_e_is_rlock() Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 186a42caebf0..2ed26db49f19 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -134,6 +134,12 @@ rl_q_load(struct rl_q_entry **p) return ((struct rl_q_entry *)atomic_load_acq_ptr((uintptr_t *)p)); } +static bool +rl_e_is_rlock(const struct rl_q_entry *e) +{ + return ((e->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ); +} + void rangelock_unlock(struct rangelock *lock, void *cookie) {