Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 1995 19:48:59 +0800 (WST)
From:      Peter Wemm <peter@jhome.DIALix.COM>
To:        David Greenman <davidg@Root.COM>
Cc:        Julian Elischer <julian@freefall.freebsd.org>, CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/i386/linux linux_misc.c 
Message-ID:  <Pine.BSF.3.91.951004193626.1120K-100000@jhome.DIALix.COM>
In-Reply-To: <199510041127.EAA00513@corbin.Root.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Oct 1995, David Greenman wrote:
> >On Wed, 4 Oct 1995, Julian Elischer wrote:
> >> julian      95/10/04 00:08:05
> >> 
> >>   Modified:    sys/i386/i386  trap.c
> >>                sys/i386/linux  linux_misc.c
> >>   Log:
> >>   Submitted by:	Juergen Lock <nox@jelal.hb.north.de>
> >>   Obtained from: other people on the net ?
> >>   
> >>   1. stepping over syscalls (gdb ni) sends you to DDB, and returned
> >>   to the wrong address afterwards, with or without DDB.  patch in
> >>   i386/i386/trap.c below.
> >>   
> >>   2. the linux emulator (modload'ed) still causes panics with DIAGNOSTIC,
> >>   re-applied a patch posted to one of the lists...
> >
> >BTW: #2 looks exactly like my patch that I posted some months ago on the 
> >lists..
> >
> >If I remember rightly, Terry complained about the changes that I made, 
> >saying that it's bad news having a dozen or so "return"s in the function 
> >all trying to keep track of the changing locking state, and I agree with 
> >him.  I rewrote it after cleaning it up, but never got a chance to do 
> >anything with it, as jhome lost it's filesystem...
> 
>    If you had changed it to contain too many goto's, I would have complained,
> too, especially since I'm the author of most of the current trap() function.
> :-)

:-)  I was only claiming the #2 patch to linux_misc.c.. I dont know who 
did the trap patch.

When I redid it before, I used one or two cleanup state variables or 
something like that, and did a goto to a single "cleanup-and-exit" point.

To me, the result looked better, but I've always admitted to being 
wierd..  :-)  I'm neither a goto-phile, or a goto-phobe, and dont generally 
dont use them, but error conditions are special cases that may warrant 
exceptions to my coding preferences.  IMHO, using gotos for *normal* flow 
of execution is a "bad" thing and to be avoided.

> -DG

I really dont want to fire up this argument again.. :-) I avoided it last
time, and this is the first time and (hopefully) the last time I'll voice 
my views on the subject.. :-)

Cheers,
-Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.951004193626.1120K-100000>