Re: kasserts behind invariants

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 14 Dec 2013 09:40:56 +0200
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
Received on Sat Dec 14 2013 - 06:42:02 UTC

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