Date: Tue, 13 Dec 2022 16:37:41 -0800 From: Gleb Smirnoff <glebius@freebsd.org> To: Mateusz Guzik <mjg@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 67e628b7a643 - main - kref: replace hand-rolled atomic ops with refcount API Message-ID: <Y5ka1WdfMY8fDVBB@FreeBSD.org> In-Reply-To: <202212130925.2BD9PNWE090002@gitrepo.freebsd.org> References: <202212130925.2BD9PNWE090002@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2022 at 09:25:23AM +0000, Mateusz Guzik wrote: M> The branch main has been updated by mjg: M> M> URL: https://cgit.FreeBSD.org/src/commit/?id=67e628b7a6432c1ab296b0c936dffc42df357d82 M> M> commit 67e628b7a6432c1ab296b0c936dffc42df357d82 M> Author: Mateusz Guzik <mjg@FreeBSD.org> M> AuthorDate: 2022-12-05 17:38:45 +0000 M> Commit: Mateusz Guzik <mjg@FreeBSD.org> M> CommitDate: 2022-12-13 09:24:57 +0000 M> M> kref: replace hand-rolled atomic ops with refcount API M> M> Sponsored by: Rubicon Communications, LLC ("Netgate") M> Differential Revision: https://reviews.freebsd.org/D37608 M> --- M> sys/compat/linuxkpi/common/include/linux/kref.h | 22 +++++++++++----------- M> 1 file changed, 11 insertions(+), 11 deletions(-) M> M> diff --git a/sys/compat/linuxkpi/common/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h M> index 3b5645bf139b..9a6814175223 100644 M> --- a/sys/compat/linuxkpi/common/include/linux/kref.h M> +++ b/sys/compat/linuxkpi/common/include/linux/kref.h M> @@ -44,35 +44,35 @@ M> M> struct kref { M> /* XXX In Linux this is a refcount_t */ M> - atomic_t refcount; M> + volatile u_int32_t refcount; M> }; A nitpick: use standard uint32_t instead of BSD u_int32_t in new code. -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y5ka1WdfMY8fDVBB>