Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Dec 2013 09:40:56 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Sean Bruno <seanbru@yahoo-inc.com>
Cc:        Alfred Perlstein <bright@mu.org>, freebsd-current@FreeBSD.org
Subject:   Re: kasserts behind invariants
Message-ID:  <52AC0B88.5030403@FreeBSD.org>
In-Reply-To: <1386975951.37172.13.camel@powernoodle.corp.yahoo.com>
References:  <1386971425.37172.9.camel@powernoodle.corp.yahoo.com> <52AB8DA1.3000007@mu.org> <1386975951.37172.13.camel@powernoodle.corp.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52AC0B88.5030403>