Subject: Re: switch to two-argument KASSERT?
To: None <>
From: Daniel Carosone <>
List: tech-kern
Date: 01/14/2004 17:13:13
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 13, 2004 at 11:04:58PM -0600, David Young wrote:
> I believe that FreeBSD defines the macro like this,
> #define KASSERT(cond, complaint) if (!(cond)) panic complaint

As already noted elsewhere, I support this - but I'd suggest we use
something slightly different for the macro definition.

Specifically, I'd like to still see the asserted condition embedded in
the message. It saves having to dive into the source to find the
message string, rather than dive in looking for the assertion test as
now, just to get a basic interpretation. It also helps the message
text be simpler and more useful it supplements rather than
"translates" the test - otherwise you can wind up with two
obviously-equivalent forms of the same obscure condition.

Assertion messages are for a developer audience (and only enabled if
DIAGNOSTIC, right?) so they don't need to be too user-friendly by
hiding the condition code.

Again, this comes from experience with the equivalent in Java.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (NetBSD)