Re: kasserts behind invariants

From: Alfred Perlstein <bright_at_mu.org>
Date: Fri, 13 Dec 2013 14:43:45 -0800
On 12/13/13 1:50 PM, Sean Bruno wrote:
> I guess this may have been argued before, but I don't see why we would
> want to hide specific things like:  sys/kern/subr_lock.c
>
> /* Check for double-init and zero object. */
> KASSERT(!lock_initalized(lock), ("lock \"%s\" %p already initialized",
>          name, lock));
>
> If I hadn't completely missed the fact that I had INVARIANTS activated,
> I'd never have found out why this vendor driver was being so completely
> stupid and crashing my machine.
>
> If I find things like this that I want old KASSERT behavior on (panic if
> true) and I don't want to run INVARIANTS, is that possible?

I don't understand the question, do you want to move it from INVARIANTS 
to under just a plain if(condition)?

-Alfred
Received on Fri Dec 13 2013 - 21:43:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC