Date: Thu, 20 Jun 2002 15:51:56 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Sam Leffler <sam@errno.com> Cc: freebsd-arch@freebsd.org Subject: Re: DIAGNOSTIC vs. INVARIANTS Message-ID: <Pine.BSF.4.21.0206201551410.32100-100000@InterJet.elischer.org> In-Reply-To: <124a01c2189b$72df9cd0$52557f42@errno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
yes.
On Thu, 20 Jun 2002, Sam Leffler wrote:
> It seems #ifdef DIAGNOSTIC is not used uniformly in the kernel.
> Specifically, it seems any code of the form:
>
> #ifdef DIAGNOSTIC
> if (some check)
> panic("some check failed...");
> #endif
>
> should instead be controlled by INVARIANTS as in
>
> KASSERT(some check, ("some check failed..."));
>
> I read DIAGNOSTIC to be intended to control inclusion of code that _prints
> diagnostic messages_ or similar and not code that does consistency checks.
>
> Comments?
>
> Sam
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-arch" in the body of the message
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0206201551410.32100-100000>
