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
This commit is contained in:
Mark Johnston 2024-11-05 03:40:02 +00:00
parent 043999b1ae
commit 55c854cf0c

View File

@ -30,11 +30,9 @@
#include <machine/atomic.h> #include <machine/atomic.h>
#if defined(_KERNEL) || defined(_STANDALONE)
#include <sys/systm.h> #include <sys/systm.h>
#else #if !defined(_KERNEL) && !defined(_STANDALONE)
#include <stdbool.h> #include <stdbool.h>
#define KASSERT(exp, msg) /* */
#endif #endif
#define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0) #define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0)