Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



matthew green <mrg%eterna.com.au@localhost> writes:
>    > simonb%NetBSD.org@localhost wrote:
>    > 
>    > > > splclock()/splx() unmatch?
>    > > 
>    > > Yes indeed.  I was a bit hasty commiting that.
>    > > 
>    > > Please commit your fix.
>    > 
>    > Some people would hate goto (though I think it's okay for "break" case).
>    > Which is better?
>    
>    In general I don't like goto either, but really I think it's the
>    cleanest way for dealing with these error cases.
>
> i agree.  it's also very common in error recovery in our kernel and
> only slightly less so in userland..

A goto can be used somewhat like a "finally" clause in languages with
exceptions -- I think that's a reasonable usage.

Perry



Home | Main Index | Thread Index | Old Index