Subject: Re: Adding KASSERT() calls to "sys/sys/queue.h"
To: None <tech-kern@NetBSD.org>
From: Matthias Scheler <email@example.com>
Date: 06/17/2004 06:49:28
In article <20040616230954.GA1173@netbsd.org>,
Bill Studenmund <wrstuden@NetBSD.org> writes:
> I think it would be good to have such tests around. I'm not sure if they
> should be turned on with all the other queue debugging or with a second,
> additional control.
I would really like to see them enabled by the "DIAGNOSTIC" option because
they won't help much otherwise. It took me quite a while to find out
that PR kern/25868 is related to such a problem. With a KASSERT() the
system would have panic in the area of the buggy code immediately.
> I am concerned though about the use of a bare KASSERT() though. It is
> reasonable to use sys/queue.h macros in userland, which doesn't have a
> KASSERT() defined (AFAICT). So a second define to turn on the KASSERT
> would probably be best.
They could be guarded by "#ifdef _KERNEL".
Matthias Scheler http://scheler.de/~matthias/