Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 1996 13:58:41 +0300 (EET DST)
From:      Jukka Antero Ukkonen <jau@aphrodite.funet.fi>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        hackers@freebsd.org
Subject:   Re: POSIX.4 signals + other POSIX.4 stuff to FreeBSD...
Message-ID:  <199607011058.NAA24561@aphrodite.funet.fi>
In-Reply-To: <199607010840.SAA18029@godzilla.zeta.org.au> from "Bruce Evans" at Jul 1, 96 06:40:26 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Bruce Evans:
> 
> >> >struct	sigaction {
> >> >    union {
> >> >....
> >> >	void	(*sa_handler) _P((int, ...));
> 
> >	then some" implementation. Those dots were put there just to keep
> >	the compiler quiet when I needed the BSD style extended argument
> >	list. They don't break anything really, but for reasons of strict
> 
> They break the possibility of compiling (all) applications with -mrtd on
> i386's, and they break implementations where the equivalent of -mrtd or
> some other complicated (efficient) arg passing convention is standard.

	How do you think one could compile a signal handler to assume
	there is the size of the argument list saved in the stack if the
	system does not use the same convention?
	Or how would one do the exact opposite thing using the simpler ret
	instruction when the size of the argument list has been saved in
	the stack? (The stack would be trashed and -fcaller-saves would
	certainly become a serious trouble.)
	If both the system and the signal handlers have been compiled to
	use the same calling convention the stack pointer will be modified
	correctly anyway independent of whether the calling method expects
	ret or rtd to be used.
	It is the fact that the system and the signal handler both use the
	same call/return method that counts, not whether the argument list
	is variable or not. The whole business is about the caller saving
	the correct size of the real parameter list in the stack when it
	is needed, not about the return from the called function becoming
	somehow different when the size of the argument list has been
	claimed variable in C. The prototype affects the caller.
	A system using rtd return convention would be expected to save the
	correct size of the argument list in the stack anyway. Right?

	BTW - As far as I know -mrtd has no meaning on iX86 machines. It is
	a valid option only for 680X0 family of processors.

> The kernel shouldn't use the user macros because it would become slower
> if the the user macros were fixed to actually meet their specification.

	Kernel could use it's own variations. The only thing that would
	be affected were that it were easier to change the real data type
	that is used represent sigset_t.


	Cheers,
		// jau
------
  /    Jukka A. Ukkonen,       FUNET / Centre for Scientific Computing
 /__   M.Sc. (sw-eng & cs)               Tel:   (Home) +358-0-6215280
   /   Internet: ukkonen@csc.fi                 (Work) +358-0-4573208
  v    Internet: jau@funet.fi                 (Mobile) +358-400-606671




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