Date: Thu, 20 Jun 2002 13:45:43 -0700 From: "Sam Leffler" <sam@errno.com> To: <freebsd-arch@freebsd.org> Subject: DIAGNOSTIC vs. INVARIANTS Message-ID: <124a01c2189b$72df9cd0$52557f42@errno.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?124a01c2189b$72df9cd0$52557f42>