From owner-freebsd-arch Thu Jun 20 13:45:49 2002 Delivered-To: freebsd-arch@freebsd.org Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by hub.freebsd.org (Postfix) with ESMTP id AD80837B403 for ; Thu, 20 Jun 2002 13:45:45 -0700 (PDT) Received: from melange (melange.errno.com [66.127.85.82]) (authenticated bits=0) by ebb.errno.com (8.12.1/8.12.1) with ESMTP id g5KKjhr4018996 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 20 Jun 2002 13:45:44 -0700 (PDT)?g (envelope-from sam@errno.com)œ Message-ID: <124a01c2189b$72df9cd0$52557f42@errno.com> From: "Sam Leffler" To: Subject: DIAGNOSTIC vs. INVARIANTS Date: Thu, 20 Jun 2002 13:45:43 -0700 Organization: Errno Consulting MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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