Date: Wed, 31 Jul 1996 23:50:38 +0900 (JST) From: Michael Hancock <michaelh@cet.co.jp> To: FreeBSD Hackers <Hackers@freebsd.org> Subject: Re: kernel assertions (Rev. 1) Message-ID: <Pine.SV4.3.93.960731232342.14875B-100000@parkplace.cet.co.jp> In-Reply-To: <199607310640.XAA02552@MindBender.HeadCandy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Jul 1996, Michael L. VanLoon -- HeadCandy.com wrote: > >The REQUIRE2 stuff can replace the > > > >#ifdef DIAGNOSTICS > > if (expr) > > panic(expl); > >#endif > > I prefer asserts to call "Debugger()", rather than "panic()", and > that's how I write my assertion macros. How are you supposed to debug > something if it panics? I'd be happy either way. The point I was trying to make was that REQUIRE2 could replace the "tentative looking" argument checking in the code that often manifests itself in the form above. REQUIRE2 would also hopefully induce people to consistently do simple argument checking, because there is no overhead in the production code. The REQUIRE1 assertions would remove the argument checking that's integrated with the real code, just leaving REAL code. They would then be reinstated at the top where they belong. These are level I checks because obviously the author thought they were important enough to integrate the argument checking logic with the code doing the real work. Let's go for HIGHER QUALITY!!! nuff, said. Regards, Mike Hancock
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.93.960731232342.14875B-100000>