[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: kernel assertions
From:       A JOSEPH KOSHY <koshy () india ! hp ! com>
Date:       1996-07-29 14:23:56
[Download RAW message or body]


>>>>>> "mh" == "Michael Hancock", "phk" == "Poul Henning-Kamp" >>>>>

mh>Any comments on introducing an assertion macro for kernel code that panics
	...
mh>could be called KASSERT or KERN_ASSERT.

phk> I like this idea.

Its been my experience that judicious use of ASSERTs goes a long way
in assuring code quality.  Even better is of course a thorough code review :-).

However, some of these checks should probably remain even in a production 
kernel since pathological situations do arise, and its better to abort than 
corrupt user data silently.

So we probably have two kinds of asserts here: one kind is thorough but
expensive (which could be removed using -DNDEBUG or whatever) and the other 
that is minimal and cheap.

Koshy

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic