Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 1999 19:23:38 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        Martin Cracauer <cracauer@cons.org>, Martin Cracauer <cracauer@FreeBSD.ORG>, 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>
In-Reply-To: <19990706170113.CDA7B78@overcee.netplex.com.au>; from Peter Wemm on Wed, Jul 07, 1999 at 01:01:13AM %2B0800
References:  <19990706182148.A23965@cons.org> <19990706170113.CDA7B78@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <cracauer@cons.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990706192338.A24460>