On Mon, Nov 30, 2015 at 11:02 AM, Barret Rhoden <[email protected]>
wrote:

> On 2015-11-30 at 06:15 "'Davide Libenzi' via Akaros"
> <[email protected]> wrote:
> > I have found it useful, in the code I am writing, to have an assert
> > which throws an error(), instead of a panic() (which is a bit
> > extreme).
>
> As far as error vs panic goes, if it's a kernel bug, then please use
> panic.  It's heavy-weight, but it's something that must be fixed.  I'm
> not a fan of trying to continue after something has gone wrong, since
> we could trigger more permanent damage.
>

We can't panic if a userspace program provided us badly formatted data ☺

In general, we follow that rule too.  Most macros are uppercase.  Some
> aren't where the macro is a wrapper of some sort.  For example, some
> functions like printx and printk are macros, but the intended interface
> is to be a function; there's no "thread carefully" warning needed.
>
> I don't know if assert() requires the level of warning associated with
> macros, esp considering that assert() already exists and all of our
> existing code treats asserts and warns in lowercase.  It's not like
> someone is going to get confused by the lack of uppercase.
>

So, since it is in that file (assert.h), it should be lowercase as well?

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to