Date: Tue, 5 Nov 2024 04:24:01 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 55c854cf0c6a - main - refcount: Avoid redefining KASSERT for userspace Message-ID: <202411050424.4A54O1uV066896@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=55c854cf0c6aacb60ed88c02522377b1b3fa134d commit 55c854cf0c6aacb60ed88c02522377b1b3fa134d Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-11-05 03:40:02 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-11-05 04:23:49 +0000 refcount: Avoid redefining KASSERT for userspace Just bring in systm.h unconditionally. Otherwise this definition of KASSERT conflicts with the one from kassert.h, specifically when including other headers which unconditionally include systm.h or kassert.h. A number of other kernel headers depend on this pollution, but ideally we'd only need kassert.h here. Reported by: Jenkins MFC after: 1 week --- sys/sys/refcount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/sys/refcount.h b/sys/sys/refcount.h index 212e8e516271..44588fe3c812 100644 --- a/sys/sys/refcount.h +++ b/sys/sys/refcount.h @@ -30,11 +30,9 @@ #include <machine/atomic.h> -#if defined(_KERNEL) || defined(_STANDALONE) #include <sys/systm.h> -#else +#if !defined(_KERNEL) && !defined(_STANDALONE) #include <stdbool.h> -#define KASSERT(exp, msg) /* */ #endif #define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411050424.4A54O1uV066896>