kasserts behind invariants

Andriy Gapon avg at FreeBSD.org
Sat Dec 14 07:42:02 UTC 2013


on 14/12/2013 01:05 Sean Bruno said the following:
> In this specific instance, it would have been much better to simply
> panic if(condition) than silently allowing the vendor driver to do
> something stupid like initialize a mutex twice.

I like Solaris/illumos approach of having ASSERT and VERIFY macros.
ASSERT is compiled out when DEBUG is not set while VERIFY is always kept.

-- 
Andriy Gapon


More information about the freebsd-current mailing list