Subject: Re: no listeners loaded [was: Re: CVS commit: src/sys/kern]
To: Elad Efrat <elad@NetBSD.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 09/14/2006 09:53:51
On Sep 14, 2006, at 10:47 AM, Elad Efrat wrote:

> YAMAMOTO Takashi wrote:
>
>> then, why not simply:
>> 	if (!listeners_have_been_loaded) {
>> 		KASSERT(SIMPLEQ_EMPTY(&scope->listenq));
>> 		return 0;
>> 	}
>>
>> if you have a reason, (eg. to avoid a cache fill?)
>> please add a comment.
>
> Why do we want to KASSERT it?
>
> IIRC, KASSERT will panic if DIAGNOSTIC, and by default DIAGNOSTIC
> is not set... I'm not sure I like the dependency on DIAGNOSTIC for
> this specific case.

This is actually a perfect use of DIAGNOSTIC / KASSERT.

>
> -e.
>
> -- 
> Elad Efrat

-- thorpej