From owner-freebsd-current Thu Sep 30 13:13:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 536BA14D7B for ; Thu, 30 Sep 1999 13:13:23 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo.feral.com (beppo [192.67.166.79]) by feral.com (8.8.7/8.8.7) with ESMTP id NAA13724; Thu, 30 Sep 1999 13:13:21 -0700 Date: Thu, 30 Sep 1999 13:13:13 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: Matthew Dillon Cc: current@FreeBSD.ORG Subject: Re: ASSERT macros in the kernel.... In-Reply-To: <199909302009.NAA13502@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :I don't seem to see (after not looking very hard) any ASSERT macros for > :the kernel in FreeBSD. It'd be pretty easy to add them, and they're > :awfully useful. They're different from INVARIANT support in that they > :encapsulate (and panic if the assertion is triggered) more inline types of > :conditions. > : > :Any opinions? > : > :-matt > > I don't understand what you want to do. KASSERT() is the standard > way to assert something in the kernel, but we do not want to bloat > the code unnecessarily so KASSERT()s only do something if INVARIANT > support has been turned on. > > If we need to panic on something whether or not invariant support has > been turned on, we currently just use a conditional and a panic. > > How would ASSERT be different from KASSERT() ? > > -Matt > >>I don't seem to see (after not looking very hard) any ASSERT macros for That's what it was- I grepped for ASSERT, but somehow missed KASSERT- that's sufficinet for me, I can live with INVARIANTS. Sorry- I'm a moron- never mind.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message