Subject: Re: kpsignal2 panic
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 10/03/2003 23:28:28
On Friday, October 3, 2003, at 11:13 PM, Jaromir Dolecek wrote:
> Matt Thomas wrote:
>>> +
>>> + if (fdp == NULL) {
>>> + #ifdef DIAGNOSTIC
>>> + printf("kpsignal1: fdp NULL, proc %d flags
>>> %x\n",
>>> + p->p_pid, p->p_flag);
>>> + #endif
>>> + return;
>>> + }
>>
>> Looks good to me. (but you might to move the entire if inside the
>> #ifdef).
>
> Perhaps make it KASSERT().
For the most part, I dislike KASSERT(). It tells you it didn't like
something but you have no easy way to figure out what. A printf or
panic is very much superior in making the diagnosis.
--
Matt Thomas email: matt@3am-software.com
3am Software Foundry www: http://3am-software.com/bio/matt/
Cupertino, CA disclaimer: I avow all knowledge of this
message.