From owner-cvs-sys Wed Oct 4 04:50:36 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id EAA11096 for cvs-sys-outgoing; Wed, 4 Oct 1995 04:50:36 -0700 Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id EAA11090 ; Wed, 4 Oct 1995 04:50:19 -0700 Received: (from peter@localhost) by jhome.DIALix.COM (8.6.12/8.6.9) id TAA06996; Wed, 4 Oct 1995 19:48:59 +0800 Date: Wed, 4 Oct 1995 19:48:59 +0800 (WST) From: Peter Wemm To: David Greenman cc: Julian Elischer , CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/linux linux_misc.c In-Reply-To: <199510041127.EAA00513@corbin.Root.COM> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk 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 > >> 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