git: 55c854cf0c6a - main - refcount: Avoid redefining KASSERT for userspace
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Nov 2024 04:24:01 UTC
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)