From owner-cvs-all Tue Jul 6 10:24: 2 1999 Delivered-To: cvs-all@freebsd.org Received: from cons.org (knight.cons.org [194.233.237.195]) by hub.freebsd.org (Postfix) with ESMTP id 0B4E314C84; Tue, 6 Jul 1999 10:23:54 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id TAA24652; Tue, 6 Jul 1999 19:23:38 +0200 (CEST) Date: Tue, 6 Jul 1999 19:23:38 +0200 From: Martin Cracauer To: Peter Wemm Cc: Martin Cracauer , Martin Cracauer , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/i386 genassym.c machdep.c src/sys/i386/include frame.h src/sys/kern kern_sig.c src/sys/sys signal.h signalvar.h Message-ID: <19990706192338.A24460@cons.org> References: <19990706182148.A23965@cons.org> <19990706170113.CDA7B78@overcee.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990706170113.CDA7B78@overcee.netplex.com.au>; from Peter Wemm on Wed, Jul 07, 1999 at 01:01:13AM +0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In <19990706170113.CDA7B78@overcee.netplex.com.au>, Peter Wemm wrote: > > I would suggest that FreeBSD/alpha doesn't start using two conventions > > from start. You have few old applications to break. > > Only source compatability. Is there anything left in /usr/src that uses > the old-style args still? It looks like you've been through and zapped > the couple of places that did. No, I left old programs as they were. They aren't much and except gdb they're easy to change (IIRC, only libc_r, ntp, rpc.statd). [...] > > > I am thinking that the easiest way to get this to work will be to > > > additionally push a siginfo_t onto the stack for siginfo signals and > > > change the code argument to point to it and leave the sigcontext > > > pointer as is. > > > > I think it is easier to move the struct sigcontext into siginfo_t and > > pass a siginto_t everytime. The overhead is minimal, the siginfo_t is > > only a little larger than the struct sigcontext. It's a serious > > simplification. > > Hmm... since the MI __siginfo has sigcontext right at the beginning > we could use the siginfo_t * as a struct sigcontext * in the trampoline. > > Can we be sure si_sc (sigcontext) will remain the first item in __siginfo? A comment /* Don't move this or you'll break alpha */ will probably do it, unless an additional platform has different requirements. > The next question, what is the third signal handler argument used for in > SA_SIGINFO mode? Can it just be zeroed? Or point it to the sigcontext > explicitly? POSIX doesn't specify what the third argument is, except that the type is void*. Implementations usually use it to point to some larger data structures that contain "everything the signal handler might be interested in", which would be our 'struct sigcontext'. BDE and me thought it is better to push the struct sigcontext into siginfo_t, since it will be on the stack anyway and now the user has a type-save way to access it, instead of casting and following the void* that the first argument is. On FreeBSD/i386 the third argument points to the sigcontext that is inside the siginfo_t. > > I could give it a shot, but I don't have an alpha machine (I need root > > access and either a serial console or a on-site person to boot a > > know-good kernel on demand). > > Careful, you might get held to that. :-) I obviously lack some of the lower-level knowledge, but what could be a better way to gain it :-) Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message