compile failure without WITNESS -- sys/sys/mbuf.h lacks #ifdef WITNESS

Matthias Andree matthias.andree at gmx.de
Wed Jul 21 03:19:44 PDT 2004


Hi,

I've had a kernel compile problem recently, WITNESS_WARN implicitly
declared and WARN_GIANTOK and WARN_SLEEPOK undefined.

I don't have the WITNESS option enabled for my kernel.

I've tracked this down to lines 311ff in sys/sys/mbuf.h, #define
MBUF_CHECKSLEEP(how)...

Changing these lines to:

#ifdef WITNESS
#define MBUF_CHECKSLEEP(how) do {					\
	if (how == M_WAITOK)						\
		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,		\
		    "Sleeping in \"%s\"", __func__);			\
} while(0)
#else
#define MBUF_CHECKSLEEP(how)
#endif

fixed my problem.

-- 
Matthias Andree


More information about the freebsd-current mailing list