Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2004 12:17:55 +0200
From:      Matthias Andree <matthias.andree@gmx.de>
To:        freebsd-current@freebsd.org
Subject:   compile failure without WITNESS -- sys/sys/mbuf.h lacks #ifdef WITNESS
Message-ID:  <20040721101755.GA78370@merlin.emma.line.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040721101755.GA78370>